Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop, mail # dev - Review Request: Fix for SQOOP-1029


Copy link to this message
-
Re: Review Request: Fix for SQOOP-107
Jarek Cecho 2013-06-19, 20:50

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11041/#review22119
-----------------------------------------------------------
Hi Shruti,
the patch no longer applies on the HEAD of branch trunk. Would you mind rebasing it? I think that the culprit here is SQOOP-1083, where we split the HBase tests into multiple files, so the change should be rather straightforward.
src/java/org/apache/sqoop/hbase/ToStringPutTransformer.java
<https://reviews.apache.org/r/11041/#comment45520>

    Nit: Assuming that we are only iterating over the generated array, is there a reason why we need the compositeKeyAttributes defined as List? Shouldn't the array returned by the split() method be sufficient? I'm not quite sure what is the gain here to transform the Array into List.

src/test/com/cloudera/sqoop/hbase/HBaseImportTest.java
<https://reviews.apache.org/r/11041/#comment45533>

    The patch is calling getArvg method with parameter includeHadoopFlags set to true. As a result the returned array will contain couple -D properties defined at the beginning of the array and rest of the Sqoop parameters after that. As Sqoop requires to have all -D parameters prior all normal arguments putting --hbase-row-key at the begging of the array won't work and the test itself is failing. I've done following code change that make the test passing:
    
        argv[0]="-D";
        argv[1]="sqoop.hbase.add.row.key=true";
        System.arraycopy(otherArg, 0, argv, 2, otherArg.length);
        argv[argv.length - 2] = "--hbase-row-key";
        argv[argv.length - 1] = getColName(0)+","+getColName(1);
Jarcec

- Jarek Cecho
On June 19, 2013, 10:17 a.m., Shruti Joshi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11041/
> -----------------------------------------------------------
>
> (Updated June 19, 2013, 10:17 a.m.)
>
>
> Review request for Sqoop.
>
>
> Description
> -------
>
> Sqoop does not support importing data into hbase when table contains composite key.
>
>
> This addresses bug https://issues.cloudera.org/browse/SQOOP-107.
>     https://issues.apache.org/jira/browse/https://issues.cloudera.org/browse/SQOOP-107
>
>
> Diffs
> -----
>
>   src/docs/man/hbase-args.txt 7164e93
>   src/docs/user/hbase-args.txt 36b930b
>   src/docs/user/hbase.txt 24c8df8
>   src/java/org/apache/sqoop/hbase/HBasePutProcessor.java 6aca97f
>   src/java/org/apache/sqoop/hbase/ToStringPutTransformer.java 13c765c
>   src/test/com/cloudera/sqoop/hbase/HBaseImportTest.java d411f3d
>
> Diff: https://reviews.apache.org/r/11041/diff/
>
>
> Testing
> -------
>
> ant test (default) was a success.
>
>
> Thanks,
>
> Shruti Joshi
>
>