You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Julian Wissmann <ju...@sdace.de> on 2014/10/13 11:48:52 UTC
Usage of CellUtil.getRowByte
Hi,
I'm in need of grabbing the row key from a coprocessor's scan. However I am
wondering what the best way for doing this would be.
I just came across the fact that Cell.getRow() has been deprecated and
relaced with CellUtil.getRowByte(). However looking at the Code gives me
the impression, that I won't be able to retreive the Key from getRowByte().
There also is KeyValue.getKey(), however the Javadoc for that states, that
it should generally not be used.
So I'm wondering what the best way going forward would be.
KeyValue.getKey() or something else, that I have not seen, so far.
Thanks!
Julian
Re: Usage of CellUtil.getRowByte
Posted by Ted Yu <yu...@gmail.com>.
Take a look at CellUtil#getCellKey() as well.
Cheers
On Mon, Oct 13, 2014 at 3:46 AM, Vikram Singh Chandel <
vikramsinghchandel@gmail.com> wrote:
> Hi Julian
>
> To get the rowKey you can use CellUtil class
>
> try String rowKey = Bytes.toString(CellUtil.cloneRow(kv));
>
> On Mon, Oct 13, 2014 at 3:18 PM, Julian Wissmann <julian.wissmann@sdace.de
> >
> wrote:
>
> > Hi,
> >
> > I'm in need of grabbing the row key from a coprocessor's scan. However I
> am
> > wondering what the best way for doing this would be.
> >
> > I just came across the fact that Cell.getRow() has been deprecated and
> > relaced with CellUtil.getRowByte(). However looking at the Code gives me
> > the impression, that I won't be able to retreive the Key from
> getRowByte().
> >
> > There also is KeyValue.getKey(), however the Javadoc for that states,
> that
> > it should generally not be used.
> >
> > So I'm wondering what the best way going forward would be.
> > KeyValue.getKey() or something else, that I have not seen, so far.
> >
> > Thanks!
> > Julian
> >
>
>
>
> --
> *Regards*
>
> *VIKRAM SINGH CHANDEL*
>
> Please do not print this email unless it is absolutely necessary,Reduce.
> Reuse. Recycle. Save our planet.
>
Re: Usage of CellUtil.getRowByte
Posted by Vikram Singh Chandel <vi...@gmail.com>.
Hi Julian
To get the rowKey you can use CellUtil class
try String rowKey = Bytes.toString(CellUtil.cloneRow(kv));
On Mon, Oct 13, 2014 at 3:18 PM, Julian Wissmann <ju...@sdace.de>
wrote:
> Hi,
>
> I'm in need of grabbing the row key from a coprocessor's scan. However I am
> wondering what the best way for doing this would be.
>
> I just came across the fact that Cell.getRow() has been deprecated and
> relaced with CellUtil.getRowByte(). However looking at the Code gives me
> the impression, that I won't be able to retreive the Key from getRowByte().
>
> There also is KeyValue.getKey(), however the Javadoc for that states, that
> it should generally not be used.
>
> So I'm wondering what the best way going forward would be.
> KeyValue.getKey() or something else, that I have not seen, so far.
>
> Thanks!
> Julian
>
--
*Regards*
*VIKRAM SINGH CHANDEL*
Please do not print this email unless it is absolutely necessary,Reduce.
Reuse. Recycle. Save our planet.