You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Hans Uhlig (Created) (JIRA)" <ji...@apache.org> on 2011/11/19 05:44:52 UTC

[jira] [Created] (HIVE-2599) Support Composit/Compound Keys with HBaseStorageHandler

Support Composit/Compound Keys with HBaseStorageHandler
-------------------------------------------------------

                 Key: HIVE-2599
                 URL: https://issues.apache.org/jira/browse/HIVE-2599
             Project: Hive
          Issue Type: Improvement
          Components: HBase Handler
    Affects Versions: 0.8.0
            Reporter: Hans Uhlig


It would be really nice for hive to be able to understand composite keys from an underlying HBase schema. Currently we have to store key fields twice to be able to both key and make data available. I noticed John Sichi mentioned in HIVE-1228 that this would be a separate issue but I cant find any follow up. How feasible is this in the HBaseStorageHandler?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2599) Support Composit/Compound Keys with HBaseStorageHandler

Posted by "Swarnim Kulkarni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422237#comment-13422237 ] 

Swarnim Kulkarni commented on HIVE-2599:
----------------------------------------

If your composite keys are delimited by a separator, here is a possible way to query them in hive:

{noformat}
CREATE EXTERNAL TABLE hbase_table_1(key struct<a:string,b:string,c:string>, value string) 
ROW FORMAT DELIMITED
COLLECTION ITEMS TERMINATED BY '~'
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,test-family:test-qual")
TBLPROPERTIES ("hbase.table.name" = "SIMPLE_TABLE");
{noformat}

Basically what this means is that the composite key here should be mapped to a struct and we specifying that the keys in the composite key are separated by a "~". After doing this, querying for the individual keys in the composite keys should be as simple as:

{noformat}
select key.a,key.b,key.c from hbase_table_1;
{noformat}
                
> Support Composit/Compound Keys with HBaseStorageHandler
> -------------------------------------------------------
>
>                 Key: HIVE-2599
>                 URL: https://issues.apache.org/jira/browse/HIVE-2599
>             Project: Hive
>          Issue Type: Improvement
>          Components: HBase Handler
>    Affects Versions: 0.8.0
>            Reporter: Hans Uhlig
>
> It would be really nice for hive to be able to understand composite keys from an underlying HBase schema. Currently we have to store key fields twice to be able to both key and make data available. I noticed John Sichi mentioned in HIVE-1228 that this would be a separate issue but I cant find any follow up. How feasible is this in the HBaseStorageHandler?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2599) Support Composit/Compound Keys with HBaseStorageHandler

Posted by "Hans Uhlig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422361#comment-13422361 ] 

Hans Uhlig commented on HIVE-2599:
----------------------------------

Do I need to do this for all fields then? Any suggestions for binary?
                
> Support Composit/Compound Keys with HBaseStorageHandler
> -------------------------------------------------------
>
>                 Key: HIVE-2599
>                 URL: https://issues.apache.org/jira/browse/HIVE-2599
>             Project: Hive
>          Issue Type: Improvement
>          Components: HBase Handler
>    Affects Versions: 0.8.0
>            Reporter: Hans Uhlig
>
> It would be really nice for hive to be able to understand composite keys from an underlying HBase schema. Currently we have to store key fields twice to be able to both key and make data available. I noticed John Sichi mentioned in HIVE-1228 that this would be a separate issue but I cant find any follow up. How feasible is this in the HBaseStorageHandler?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-2599) Support Composit/Compound Keys with HBaseStorageHandler

Posted by "Swarnim Kulkarni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swarnim Kulkarni reassigned HIVE-2599:
--------------------------------------

    Assignee: Swarnim Kulkarni
    
> Support Composit/Compound Keys with HBaseStorageHandler
> -------------------------------------------------------
>
>                 Key: HIVE-2599
>                 URL: https://issues.apache.org/jira/browse/HIVE-2599
>             Project: Hive
>          Issue Type: Improvement
>          Components: HBase Handler
>    Affects Versions: 0.8.0
>            Reporter: Hans Uhlig
>            Assignee: Swarnim Kulkarni
>
> It would be really nice for hive to be able to understand composite keys from an underlying HBase schema. Currently we have to store key fields twice to be able to both key and make data available. I noticed John Sichi mentioned in HIVE-1228 that this would be a separate issue but I cant find any follow up. How feasible is this in the HBaseStorageHandler?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2599) Support Composit/Compound Keys with HBaseStorageHandler

Posted by "Swarnim Kulkarni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422396#comment-13422396 ] 

Swarnim Kulkarni commented on HIVE-2599:
----------------------------------------

For all parts of your key? yes. For binary, using ":key#b" in the columns mapping should work. 
                
> Support Composit/Compound Keys with HBaseStorageHandler
> -------------------------------------------------------
>
>                 Key: HIVE-2599
>                 URL: https://issues.apache.org/jira/browse/HIVE-2599
>             Project: Hive
>          Issue Type: Improvement
>          Components: HBase Handler
>    Affects Versions: 0.8.0
>            Reporter: Hans Uhlig
>
> It would be really nice for hive to be able to understand composite keys from an underlying HBase schema. Currently we have to store key fields twice to be able to both key and make data available. I noticed John Sichi mentioned in HIVE-1228 that this would be a separate issue but I cant find any follow up. How feasible is this in the HBaseStorageHandler?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira