You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by Rukshan Chathuranga <rc...@gmail.com> on 2015/06/13 05:19:55 UTC

How to add split point to table with valid key.

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/ <http://rukspot.com/>*

Re: How to add split point to table with valid key.

Posted by Eric Newton <er...@gmail.com>.
>
> mil.nga.giat.geowave.datastore.accumulo.AccumuloRowId...


Ah. This is a geowave specific class.  Hopefully someone in the geowave
community will see your message. If geowave has their own mailing list, you
may want to ask again there.

-Eric


On Fri, Jun 12, 2015 at 11:36 PM, Rukshan Chathuranga <rcrukshan17@gmail.com
> wrote:

> 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 <ct...@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
>> <rc...@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
>> > <va...@gmail.com> wrote:
>> >>
>> >> Hi
>> >>
>> >> Did you try using listspilts()?
>> >>
>> >> Vaibhav
>> >>
>> >> On 13-Jun-2015 8:50 am, "Rukshan Chathuranga" <rc...@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/
>> >>>
>> >
>>
>
>

Re: How to add split point to table with valid key.

Posted by Rukshan Chathuranga <rc...@gmail.com>.
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 <ct...@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
> <rc...@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
> > <va...@gmail.com> wrote:
> >>
> >> Hi
> >>
> >> Did you try using listspilts()?
> >>
> >> Vaibhav
> >>
> >> On 13-Jun-2015 8:50 am, "Rukshan Chathuranga" <rc...@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/
> >>>
> >
>

Re: How to add split point to table with valid key.

Posted by Christopher <ct...@apache.org>.
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
<rc...@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
> <va...@gmail.com> wrote:
>>
>> Hi
>>
>> Did you try using listspilts()?
>>
>> Vaibhav
>>
>> On 13-Jun-2015 8:50 am, "Rukshan Chathuranga" <rc...@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/
>>>
>

Re: How to add split point to table with valid key.

Posted by Rukshan Chathuranga <rc...@gmail.com>.
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/ <http://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" <rc...@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/ <http://rukspot.com/>*
>>
>>

Re: How to add split point to table with valid key.

Posted by vaibhav thapliyal <va...@gmail.com>.
Hi

Did you try using listspilts()?

Vaibhav
On 13-Jun-2015 8:50 am, "Rukshan Chathuranga" <rc...@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/ <http://rukspot.com/>*
>
>