Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # user >> Incorrectly setting TKey causes NPE (to nobody's surprise)


+
David Medinets 2012-06-26, 12:56
Copy link to this message
-
Re: Incorrectly setting TKey causes NPE (to nobody's surprise)
Is there a reason you're using the thrift classes?

On Tue, Jun 26, 2012 at 5:56 AM, David Medinets
<[EMAIL PROTECTED]> wrote:
> I did this:
>
> TKey tKey = new TKey();
> tKey.setRow(row_id.getBytes());
>
>
> TRange tRange = new TRange();
> trange.setStart(tKey);
>
> scan.setRange(tRange);
>
> Iterator iterator = scan.iterator();
> iterator.hasNext();
>
> This resulted in an NPE in:
>
> org.apache.accumulo.core.data.Key.rowColumnStringBuilder(Key.java:472)
>
> While I have no real objection to this NPE (my code is clearly
> deficient), I wonder if a more cogent error message is possible.
> Should there be guard statements somewhere to ensure a valid object?
+
Marc P. 2012-06-26, 13:03
+
Marc P. 2012-06-26, 13:09
+
David Medinets 2012-06-26, 13:17
+
Adam Fuchs 2012-06-26, 14:20
+
Marc P. 2012-06-26, 14:31
+
Adam Fuchs 2012-06-26, 15:30
+
David Medinets 2012-06-26, 16:20