You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Shruti Joshi (JIRA)" <ji...@apache.org> on 2013/05/28 14:07:23 UTC

[jira] [Commented] (SQOOP-1038) Add support for composite keys in HBase import

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

Shruti Joshi commented on SQOOP-1038:
-------------------------------------

Hi Jarek,

I have done following changes in code:
1) While performing HBase import in Sqoop, if the row-key column or the column-family is null, a warning message will be logged and an IOException will be thrown to indicate failure.

2) To support composite-key table import in HBase, user will specify comma separated list of keys. The ‘isCompositeKey’ method will check if the specified row-key is a composite key.

3) The logic to write record data in HBase does not vary for composite-key or a single key table and hence I have created a new method to insert data in HBase which will be common for both the cases. 
(Please verify the method putRecordInHBase())

4) Added a new method getCompositeKey() to construct hbase row-key from attribute values belonging to the composite key.

5) Tested the code with both single and composite key tables. Also ran ‘ant checkstyle’ which results in successful build.


                
> Add support for composite keys in HBase import
> ----------------------------------------------
>
>                 Key: SQOOP-1038
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1038
>             Project: Sqoop
>          Issue Type: New Feature
>    Affects Versions: 1.4.3
>            Reporter: Shruti Joshi
>            Assignee: Shruti Joshi
>         Attachments: HBase sqoop import for table with composite key.docx, sqoop_trunk.patch
>
>
> Sqoop does not support importing data into hbase when table contains composite key.
> Ref: https://issues.cloudera.org/browse/SQOOP-107

--
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