Hive
  1. Hive
  2. HIVE-6940

[WebHCat]Update documentation for Templeton-Sqoop action

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.14.0
    • Fix Version/s: None
    • Component/s: Documentation, WebHCat
    • Labels:

      Description

      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.

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Shuaishuai Nie
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development