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

Jarek Jarcec Cecho commented on SQOOP-2470:
-------------------------------------------

Looking at the patch [~aaditya.prodigy] - overall it looks good, couple of 
comments:

* Please clean up trailing whitespaces (I can see a lot of them when using 
{{git apply}} on the patch)
* Please do upload the patch to [review 
board|https://reviews.apache.org/dashboard/] next time
* The newly added test is failing for me:

{code}
Testcase: testIncrementalHiveAppendEmptyThenFull took 3.569 sec
        Caused an ERROR
java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: 
Hive exited with status 1
java.lang.RuntimeException: java.lang.RuntimeException: 
java.lang.RuntimeException: java.io.IOException: Hive exited with status 1
        at 
com.cloudera.sqoop.TestIncrementalImport.runJob(TestIncrementalImport.java:640)
        at 
com.cloudera.sqoop.TestIncrementalImport.runJob(TestIncrementalImport.java:619)
        at 
com.cloudera.sqoop.TestIncrementalImport.testIncrementalHiveAppendEmptyThenFull(TestIncrementalImport.java:1266)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: 
java.io.IOException: Hive exited with status 1
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:45)
        at 
com.cloudera.sqoop.TestIncrementalImport.runJob(TestIncrementalImport.java:635)
Caused by: java.lang.RuntimeException: java.io.IOException: Hive exited with 
status 1
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:616)
        at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:228)
        at org.apache.sqoop.tool.JobTool.run(JobTool.java:283)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
Caused by: java.io.IOException: Hive exited with status 1
        at 
org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:384)
        at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:308)
        at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:514)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
{code}

And I think that this might be relevant:

{code}
2015-08-10 08:11:22,012 (Thread-1044) [INFO - 
org.apache.sqoop.util.LoggingAsyncSink$LoggingThread.run(LoggingAsyncSink.java:85)]
 17c2
2015-08-10 08:11:22,012 (Thread-1044) [INFO - 
org.apache.sqoop.util.LoggingAsyncSink$LoggingThread.run(LoggingAsyncSink.java:85)]
 < LOAD DATA INPATH 
'file:/Users/jarcec/apache/sqoop/build/test/data/tmp/sqoop/warehouse/incrementalHiveAppendEmptyThenFull'
 INTO TABLE `incrementalHiveAppendEmptyThenFullhive`;
2015-08-10 08:11:22,012 (Thread-1044) [INFO - 
org.apache.sqoop.util.LoggingAsyncSink$LoggingThread.run(LoggingAsyncSink.java:85)]
 \ No newline at end of file
2015-08-10 08:11:22,012 (Thread-1044) [INFO - 
org.apache.sqoop.util.LoggingAsyncSink$LoggingThread.run(LoggingAsyncSink.java:85)]
 ---
2015-08-10 08:11:22,012 (Thread-1044) [INFO - 
org.apache.sqoop.util.LoggingAsyncSink$LoggingThread.run(LoggingAsyncSink.java:85)]
 > LOAD DATA INPATH 
'file:/Users/jarcec/apache/sqoop/build/test/data/sqoop/warehouse/incrementalHiveAppendEmptyThenFull'
 INTO TABLE `incrementalHiveAppendEmptyThenFullhive`;
2015-08-10 08:11:22,013 (main) [ERROR - 
org.apache.sqoop.tool.ImportTool.run(ImportTool.java:613)] Encountered 
IOException running import job: java.io.IOException: Hive exited with status 1
        at 
org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:384)
        at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:308)
        at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:514)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
        at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:228)
        at org.apache.sqoop.tool.JobTool.run(JobTool.java:283)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:45)
        at 
com.cloudera.sqoop.TestIncrementalImport.runJob(TestIncrementalImport.java:635)
        at 
com.cloudera.sqoop.TestIncrementalImport.runJob(TestIncrementalImport.java:619)
        at 
com.cloudera.sqoop.TestIncrementalImport.testIncrementalHiveAppendEmptyThenFull(TestIncrementalImport.java:1266)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at junit.framework.TestCase.runTest(TestCase.java:176)
        at junit.framework.TestCase.runBare(TestCase.java:141)
        at junit.framework.TestResult$1.protect(TestResult.java:122)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.framework.TestResult.run(TestResult.java:125)
        at junit.framework.TestCase.run(TestCase.java:129)
        at junit.framework.TestSuite.runTest(TestSuite.java:255)
        at junit.framework.TestSuite.run(TestSuite.java:250)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:535)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1182)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1033)
{code}

> Incremental Hive import with append not working after validation check for 
> --hive-import and --import 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-2470
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2470
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.4.6
>            Reporter: Aaditya Raj
>              Labels: sqoop
>         Attachments: SQOOP-2470.patch
>
>
> After validation check for --hive import and  append Jira item SQOOP-2282 , 
> hive incremental import with append rows stopped working. I noticed there 
> were no test cases to support hive incremental imports with append rows. In 
> this patch I have added one more condition to avoid this situation , also 
> added test cases to support this functionality. 



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

Reply via email to