[ 
https://issues.apache.org/jira/browse/PIG-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14621184#comment-14621184
 ] 

Rohini Palaniswamy commented on PIG-4620:
-----------------------------------------

Case 2 error is expected as you need to specify hbase. Without that it is taken 
as a path relative to fs.defaultFS working directory and paths can't have :

Case 1 error is most likely because you have hbase jars in the classpath which 
do not have support for namespace yet. If you look at 
http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java?revision=1573948&view=markup
  isLegalFullyQualifiedTableName method, it does check for NAMESPACE_DELIM 
which is : . So ensure you have hbase jars which support namespace in your pig 
classpath. You can run the pig script with -secretDebugCmd or -printCmdDebug 
(both are same) to get the classpath with which pig will be run. 

> Add namespace support to HBaseStorage
> -------------------------------------
>
>                 Key: PIG-4620
>                 URL: https://issues.apache.org/jira/browse/PIG-4620
>             Project: Pig
>          Issue Type: New Feature
>    Affects Versions: 0.15.0
>            Reporter: Andi Chirita
>            Assignee: Andi Chirita
>              Labels: hbase, patch
>         Attachments: HBaseStorageNamespace.patch
>
>
> Since version 0.96 HBase introduced namespace support.
> Apace Pig has recently updated the HBase dependency to 0.98.12 (PIG-4544)
> Currently there's no way to specify the namespace for a table.
> I suggest to implement it is using a '-namespace' option.
> {code}
> copy = STORE raw INTO 'hbase://SampleTableCopy'
>        USING org.apache.pig.backend.hadoop.hbase.HBaseStorage(
>        'info:first_name info:last_name friends:* info:*','-namespace 
> SampleNamespace');
> {code}
> We can't use the namespace in the hbase path as it will break the uri 
> validation : 'hbase://SampleNamespace:SampleTableCopy'
> The patch is available. I will look to extend the unittest for the namespace 
> option.
> Please review my changes and let me know if I can help with something.
> Kind regard,
> Andi



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to