You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "xieshiju (JIRA)" <ji...@apache.org> on 2015/02/03 15:08:36 UTC

[jira] [Commented] (SQOOP-1932) fix authorization failuare when the --hive-table option contaion a database name for import

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

xieshiju commented on SQOOP-1932:
---------------------------------

Sorry for the delay reply.
Thanks for your kind suggestion Jarek, I will fix the code quickly and provide this patch again and change the status to available. If no any other problems, do I need to create a review create a review board entry and link it to this Jira?

> fix authorization failuare when the --hive-table option contaion a database name for import
> -------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-1932
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1932
>             Project: Sqoop
>          Issue Type: Bug
>          Components: hive-integration
>    Affects Versions: 1.4.5
>         Environment: RedHat6.4 + Sqoop1.4.5 + Hive0.13 + DB2 10.5
>            Reporter: xieshiju
>            Assignee: xieshiju
>             Fix For: 1.4.6
>
>         Attachments: SQOOP-1932.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I create a new user user123 and a hive database DB1 in the hive using this user user, then execute command grant all on database DB1 to user user123. Following I ran a sqoop import command and want to import data from db2 table to hive table:
> ./sqoop import --connect 'jdbc:db2://XXXX:50000/XIEDB' --username XXXX --password XXXX --as-textfile --hive-import --hive-table DB1.hv_test --table DB3BOOK --split-by ID --num-mappers 1  
> I got below error:
> 14/12/19 23:00:09 INFO hive.HiveImport: Authorization failed:No privilege 'Create' found for outputs { database:default}. Use show grant to get more details.
> 14/12/19 23:00:09 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive exited with status 147
> 	at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:392)
> 	at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:341)
> 	at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:245)
> 	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:511)
> 	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)
> 	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 org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
> 	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
> 	at org.apache.sqoop.Sqoop.main(Sqoop.java:236)



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