You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Alex Newman (JIRA)" <ji...@apache.org> on 2011/08/24 21:32:29 UTC
[jira] [Created] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Allow specification of Hive Database name when operating on Hive table
-----------------------------------------------------------------------
Key: SQOOP-322
URL: https://issues.apache.org/jira/browse/SQOOP-322
Project: Sqoop
Issue Type: New Feature
Reporter: Alex Newman
Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Reopened) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Jarcec Cecho reopened SQOOP-322:
--------------------------------------
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Alex Newman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100837#comment-13100837 ]
Alex Newman commented on SQOOP-322:
-----------------------------------
So I played around with this, and I have a patch which works. The user specifies a --hive-db=<db> and the HiveQL parts are modified appropriately. However, in the process of writing the patch, I realized that you can do this with the current code base.
sqoop import --connect jdbc:mysql://localhost/foo --table baz --hive-table=foo.baz --hive-import --create-hive-table
Does exactly what you hope it would do.
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Alex Newman (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159375#comment-13159375 ]
Alex Newman commented on SQOOP-322:
-----------------------------------
So nothing to see here?
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159378#comment-13159378 ]
Jarek Jarcec Cecho commented on SQOOP-322:
------------------------------------------
Yup, sorry for reopening this issue temporarily. Everything is working on CDH3U2 (hive 0.7.1).
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Alex Newman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Newman resolved SQOOP-322.
-------------------------------
Resolution: Not A Problem
I provided an example of how one can do this with the existing sqoop.
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Alex Newman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090425#comment-13090425 ]
Alex Newman commented on SQOOP-322:
-----------------------------------
I'd be willing to take this one. The only thing I wanted to throw out there, is the solution I was planning on creating would:
1. Create the database if it doesn't exist
2. Then it would import that data directly into the new database.
Alternative approaches that I think would be reasonable would be just to provide some easy way in HIVE to change the database of a table easily.
Another thing to consider is whether or not we should be creating databases(Step 1). In mysql land this would be odd, but it seems as though databases in hive are mostly syntactic sugar, as you can easily select/join between them.
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Jarcec Cecho resolved SQOOP-322.
--------------------------------------
Resolution: Not A Problem
Changing resolution field from "Resolved" to "Not a problem".
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Reopened) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Jarcec Cecho reopened SQOOP-322:
--------------------------------------
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Arvind Prabhakar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090433#comment-13090433 ]
Arvind Prabhakar commented on SQOOP-322:
----------------------------------------
Thanks Alex for taking this up.
I don't think we should be creating a database if it does not exist, which should be an error condition. The reason being that while in its current state the Hive databases are just a layer of namespace abstraction, going forward they are likely to evolve towards different administrative boundaries.
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Jarcec Cecho resolved SQOOP-322.
--------------------------------------
Resolution: Fixed
Excuse me, CHD3U2 (hive 0.7.1) is working with the dot notation. I was under false assumption that I'm using that version during my tests.
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Jarek Jarcec Cecho (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159321#comment-13159321 ]
Jarek Jarcec Cecho commented on SQOOP-322:
------------------------------------------
Hi Alex,
I wanted to ask on which hive version did you try the dot notation? (I mean database.table) I've tried both CDH3B4 (hive 0.7.0) and CDH3U2 (hive 0.7.1) versions and I'm getting following exception using proposed approach:
11/11/29 10:19:23 INFO hive.HiveImport: FAILED: Error in metadata: org.apache.hadoop.hive.ql.metadata.HiveException: [database.table]: is not a valid table name
11/11/29 10:19:23 INFO hive.HiveImport: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
11/11/29 10:19:23 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive exited with status 9
at com.cloudera.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:349)
at com.cloudera.sqoop.hive.HiveImport.executeScript(HiveImport.java:299)
at com.cloudera.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:395)
at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:456)
at com.cloudera.sqoop.Sqoop.run(Sqoop.java:146)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:182)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:221)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:230)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:239)
Would you mind to attach your patch meantime so that I use it?
Jarcec
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (SQOOP-322) Allow specification of Hive Database
name when operating on Hive table
Posted by "Arvind Prabhakar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SQOOP-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arvind Prabhakar reassigned SQOOP-322:
--------------------------------------
Assignee: Alex Newman
> Allow specification of Hive Database name when operating on Hive table
> -----------------------------------------------------------------------
>
> Key: SQOOP-322
> URL: https://issues.apache.org/jira/browse/SQOOP-322
> Project: Sqoop
> Issue Type: New Feature
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> Sqoop Hive-import does not allow the specification of the database within Hive in which the table is to be created or populated.
> Relevant issue: HIVE-2172
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira