You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Eugene Koifman (JIRA)" <ji...@apache.org> on 2014/10/24 06:44:33 UTC

[jira] [Commented] (HIVE-6940) [WebHCat]Update documentation for Templeton-Sqoop action

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

Eugene Koifman commented on HIVE-6940:
--------------------------------------

The comment about "-libjars" above is wrong.
When WebHCat is configured to auto-ship Sqoop tar file, the user/admin may place any necessary JDBC jars into an HDFS directory.  Then use "libdir" param when making the REST call to supply this directory path.  WebHCat will then make sure that the jars from this dir are are placed in lib/ of the exploded Sqoop tar on the remote node.

> [WebHCat]Update documentation for Templeton-Sqoop action
> --------------------------------------------------------
>
>                 Key: HIVE-6940
>                 URL: https://issues.apache.org/jira/browse/HIVE-6940
>             Project: Hive
>          Issue Type: Bug
>          Components: Documentation, WebHCat
>    Affects Versions: 0.14.0
>            Reporter: Shuaishuai Nie
>              Labels: TODOC14
>
> WebHCat documentation need to be updated based on the new feature introduced in HIVE-5072
> Here is some examples using the endpoint "templeton/v1/sqoop"
> example1: (passing Sqoop command directly)
> curl -s -d command="import --connect jdbc:sqlserver://localhost:4033;databaseName=SqoopDB;user=hadoop;password=password --table mytable --target-dir user/hadoop/importtable" -d statusdir="sqoop.output" 'http://localhost:50111/templeton/v1/sqoop?user.name=hadoop'
> example2: (passing source file which contains sqoop command)
> curl -s -d optionsfile="/sqoopcommand/command0.txt"  -d statusdir="sqoop.output" 'http://localhost:50111/templeton/v1/sqoop?user.name=hadoop'
> example3: (using --options-file in the middle of sqoop command to enable reuse part of Sqoop command like connection string)
> curl -s -d files="/sqoopcommand/command1.txt,/sqoopcommand/command2.txt" -d command="import --options-file command1.txt --options-file command2.txt" -d statusdir="sqoop.output" 'http://localhost:50111/templeton/v1/sqoop?user.name=hadoop'
> Also, for user to pass their JDBC driver jar, they can use the "-libjars" generic option in the Sqoop command. This is a functionality provided by Sqoop.
> Set of parameters can be passed to the endpoint:
> command 
> (Sqoop command string to run)
> optionsfile
> (Options file which contain Sqoop command need to run, each section in the Sqoop command separated by space should be a single line in the options file)
> files 
> (Comma seperated files to be copied to the map reduce cluster)
> statusdir 
> (A directory where WebHCat will write the status of the Sqoop job. If provided, it is the caller’s responsibility to remove this directory when done)
> callback 
> (Define a URL to be called upon job completion. You may embed a specific job ID into the URL using $jobId. This tag will be replaced in the callback URL with the job’s job ID. )
> enablelog
> (when set to "true", WebHCat will upload job log to statusdir. Need to define statusdir when enabled)
> All the above parameters are optional, but use have to provide either "command" or "optionsfile" in the command.



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