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.