accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rukshan Chathuranga <rcruksha...@gmail.com>
Subject Re: How to add split point to table with valid key.
Date Sat, 13 Jun 2015 03:36:17 GMT
hi thapliyal,

here the code sample,

          try {
Collection<Text> list = op.listSplits("accumulo.metadata");
System.out.println(list.size());

ArrayList<Text> ll = new ArrayList<Text>(list);
System.out.println(ll.get(0));

AccumuloRowId id = new AccumuloRowId(new Key(ll.get(0)));
 } catch (TableNotFoundException | AccumuloSecurityException |
AccumuloException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

And output,

1
~
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at java.util.Arrays.copyOfRange(Arrays.java:2551)
at
mil.nga.giat.geowave.datastore.accumulo.AccumuloRowId.<init>(AccumuloRowId.java:35)
at
mil.nga.giat.geowave.datastore.accumulo.AccumuloRowId.<init>(AccumuloRowId.java:30)
at mil.nga.giat.geowave.service.healthimpl.Operation.main(Operation.java:54)


Thanks and Regards.


*Rukshan Chathuranga.*

*Department Of Computer Science & Engineering,*

*Faculty Of Engineering,*
*University Of Moratuwa. **Sri Lanka.*

*WEB: http://www.rukspot.com/ <http://rukspot.com/>*


On Sat, Jun 13, 2015 at 8:59 AM, Christopher <ctubbsii@apache.org> wrote:

> Can you clarify what you mean when you say you "try to create
> AccumuloRowId object". Can you share that part of your code, and the
> error message you received?
>
> --
> Christopher L Tubbs II
> http://gravatar.com/ctubbsii
>
>
> On Fri, Jun 12, 2015 at 11:25 PM, Rukshan Chathuranga
> <rcrukshan17@gmail.com> wrote:
> > hi thapliyal,
> >
> > yes. listspilts give me the list of split point keys. But when i try to
> > create AccumuloRowId object it give me an error saying invalid key.,
> >
> > any solutions?
> >
> > Thanks and regards.
> >
> >
> > Rukshan Chathuranga.
> > Department Of Computer Science & Engineering,
> > Faculty Of Engineering,
> > University Of Moratuwa. Sri Lanka.
> > WEB: http://www.rukspot.com/
> >
> >
> > On Sat, Jun 13, 2015 at 8:52 AM, vaibhav thapliyal
> > <vaibhav.thapliyal.91@gmail.com> wrote:
> >>
> >> Hi
> >>
> >> Did you try using listspilts()?
> >>
> >> Vaibhav
> >>
> >> On 13-Jun-2015 8:50 am, "Rukshan Chathuranga" <rcrukshan17@gmail.com>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I need to get the table split points and get the AccumuloRowId from
> that
> >>> key.
> >>>
> >>> Does anyone know how to do that?
> >>>
> >>> i already tried the
> >>>
> >>> TableOperations.addSplits(String tableName,
> >>> SortedSet<org.apache.hadoop.io.Text> partitionKeys)
> >>>
> >>> method. But it seems added splitpoint key are not valid.
> >>>
> >>> Thanks and regards.
> >>>
> >>> Rukshan Chathuranga.
> >>> Department Of Computer Science & Engineering,
> >>> Faculty Of Engineering,
> >>> University Of Moratuwa. Sri Lanka.
> >>> WEB: http://www.rukspot.com/
> >>>
> >
>

Mime
View raw message