Grokbase Groups Pig user June 2011
FAQ
Hi,

I have columns in HBase which contain names with long numbers and are stored
as bytes. I'm using pig 0.8.1 and I'm trying to load the data stored in
them. When scanning the table in the HBase shell the column name appears
like this:

group_info:\x00\x00\x00\x00\x00\x00\x00\x01

I need to escape the backslash otherwise it throws an error when trying to
use it in a column name so I tried loading it using:
LOAD 'hbase://SampleTable' USING
org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_info:\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01')

But no data is load.

Any pointers on how to achieve this?

PD: I'm using HBase 0.90.3.

Search Discussions

  • Dmitriy Ryaboy at Jun 24, 2011 at 10:43 pm
    I can change HBaseStorage to make it treat \x and \u the same way as
    PigStorage does.
    That would mean that anyone who actually has the string "\x00" in their key
    would need to do something like "\\\\x0" though.

    Open a jira?
    On Thu, Jun 23, 2011 at 11:25 AM, Juan Martin Pampliega wrote:

    Hi,

    I have columns in HBase which contain names with long numbers and are
    stored
    as bytes. I'm using pig 0.8.1 and I'm trying to load the data stored in
    them. When scanning the table in the HBase shell the column name appears
    like this:

    group_info:\x00\x00\x00\x00\x00\x00\x00\x01

    I need to escape the backslash otherwise it throws an error when trying to
    use it in a column name so I tried loading it using:
    LOAD 'hbase://SampleTable' USING

    org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_info:\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01')

    But no data is load.

    Any pointers on how to achieve this?

    PD: I'm using HBase 0.90.3.
  • Juan Martin Pampliega at Jun 27, 2011 at 2:19 pm
    I've registered into JIRA but I'm not sure where and how to open the jira
    ticket. Could you do it please?
    I'm a newbie at this, sory :).
    On Fri, Jun 24, 2011 at 7:43 PM, Dmitriy Ryaboy wrote:

    I can change HBaseStorage to make it treat \x and \u the same way as
    PigStorage does.
    That would mean that anyone who actually has the string "\x00" in their key
    would need to do something like "\\\\x0" though.

    Open a jira?

    On Thu, Jun 23, 2011 at 11:25 AM, Juan Martin Pampliega <
    jpampliega@gmail.com> wrote:
    Hi,

    I have columns in HBase which contain names with long numbers and are
    stored
    as bytes. I'm using pig 0.8.1 and I'm trying to load the data stored in
    them. When scanning the table in the HBase shell the column name appears
    like this:

    group_info:\x00\x00\x00\x00\x00\x00\x00\x01

    I need to escape the backslash otherwise it throws an error when trying to
    use it in a column name so I tried loading it using:
    LOAD 'hbase://SampleTable' USING

    org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_info:\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01')
    But no data is load.

    Any pointers on how to achieve this?

    PD: I'm using HBase 0.90.3.
  • Dmitriy Ryaboy at Jun 27, 2011 at 5:01 pm
    https://issues.apache.org/jira/browse/PIG-2145

    Hit the "watch" link to be notified when changes are made to the ticket.
    On Mon, Jun 27, 2011 at 7:19 AM, Juan Martin Pampliega wrote:

    I've registered into JIRA but I'm not sure where and how to open the jira
    ticket. Could you do it please?
    I'm a newbie at this, sory :).
    On Fri, Jun 24, 2011 at 7:43 PM, Dmitriy Ryaboy wrote:

    I can change HBaseStorage to make it treat \x and \u the same way as
    PigStorage does.
    That would mean that anyone who actually has the string "\x00" in their key
    would need to do something like "\\\\x0" though.

    Open a jira?

    On Thu, Jun 23, 2011 at 11:25 AM, Juan Martin Pampliega <
    jpampliega@gmail.com> wrote:
    Hi,

    I have columns in HBase which contain names with long numbers and are
    stored
    as bytes. I'm using pig 0.8.1 and I'm trying to load the data stored in
    them. When scanning the table in the HBase shell the column name
    appears
    like this:

    group_info:\x00\x00\x00\x00\x00\x00\x00\x01

    I need to escape the backslash otherwise it throws an error when trying to
    use it in a column name so I tried loading it using:
    LOAD 'hbase://SampleTable' USING
    org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_info:\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01')
    But no data is load.

    Any pointers on how to achieve this?

    PD: I'm using HBase 0.90.3.
  • Juan Martin Pampliega at Jun 27, 2011 at 5:52 pm
    Great.

    Thanks for all the help Dmitriy!
    On Mon, Jun 27, 2011 at 2:01 PM, Dmitriy Ryaboy wrote:

    https://issues.apache.org/jira/browse/PIG-2145

    Hit the "watch" link to be notified when changes are made to the ticket.

    On Mon, Jun 27, 2011 at 7:19 AM, Juan Martin Pampliega <
    jpampliega@gmail.com
    wrote:
    I've registered into JIRA but I'm not sure where and how to open the jira
    ticket. Could you do it please?
    I'm a newbie at this, sory :).

    On Fri, Jun 24, 2011 at 7:43 PM, Dmitriy Ryaboy <dvryaboy@gmail.com>
    wrote:
    I can change HBaseStorage to make it treat \x and \u the same way as
    PigStorage does.
    That would mean that anyone who actually has the string "\x00" in their key
    would need to do something like "\\\\x0" though.

    Open a jira?

    On Thu, Jun 23, 2011 at 11:25 AM, Juan Martin Pampliega <
    jpampliega@gmail.com> wrote:
    Hi,

    I have columns in HBase which contain names with long numbers and are
    stored
    as bytes. I'm using pig 0.8.1 and I'm trying to load the data stored
    in
    them. When scanning the table in the HBase shell the column name
    appears
    like this:

    group_info:\x00\x00\x00\x00\x00\x00\x00\x01

    I need to escape the backslash otherwise it throws an error when
    trying
    to
    use it in a column name so I tried loading it using:
    LOAD 'hbase://SampleTable' USING
    org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_info:\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01')
    But no data is load.

    Any pointers on how to achieve this?

    PD: I'm using HBase 0.90.3.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedJun 23, '11 at 6:25p
activeJun 27, '11 at 5:52p
posts5
users2
websitepig.apache.org

People

Translate

site design / logo © 2021 Grokbase