Updated on 2024-08-10 GMT+08:00

WebHCat

  • The following uses the service IP address of WebHCat and the WebHCat HTTP port configured during the installation as an example.
  • You can perform the example operations only after kinit authentication is implemented on the installed client.
  • The examples of the HTTPS protocol are as follows. To use the HTTP protocol, you need to perform the following operations:
    1. Switch the RESTful API to the HTTP protocol. For details, see Configuring HTTPS/HTTP-based REST APIs.
    2. Delete --insecure from the example and replace HTTPS with HTTP, for example:

      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/status'

      is changed to

      curl -i -u : --negotiate 'http://10.64.35.144:9111/templeton/v1/status'

  • Before performing the operation, ensure that the curl in use is later than 7.34.0.

    You can run the following command to view the curl version:

    curl -V

  1. :version(GET)
    • Description

      Queries a list of response types supported by WebHCat.

    • URL

      https://www.myserver.com/templeton/:version

    • Parameter

      Parameter

      Description

      :version

      WebHCat version number. Currently, the version number must be v1.

    • Returned result

      Parameter

      Description

      responseTypes

      List of response types supported by WebHCat.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1'
  2. status (GET)
    • Description

      Obtains the status of the current server.

    • URL

      https://www.myserver.com/templeton/v1/status

    • Parameter

      None

    • Returned result

      Parameter

      Description

      status

      If the WebHCat connection is normal, OK is returned.

      version

      Character string, including the version number, for example, v1.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/status'
  3. version (GET)
    • Description

      Obtains the WebHCat version of the server.

    • URL

      https://www.myserver.com/templeton/v1/version

    • Parameter

      None

    • Returned result

      Parameter

      Description

      supportedVersions

      All supported versions.

      version

      WebHCat version of the server.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/version'
  4. version/hive (GET)
    • Description

      Obtains the Hive version of the server.

    • URL

      https://www.myserver.com/templeton/v1/version/hive

    • Parameter

      None

    • Returned result

      Parameter

      Description

      module

      Hive.

      version

      Hive version.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/version/hive'
  5. version/hadoop (GET)
    • Description

      Obtains the Hadoop version of the server.

    • URL

      https://www.myserver.com/templeton/v1/version/hadoop

    • Parameter

      None

    • Returned result

      Parameter

      Description

      module

      Hadoop.

      version

      Hadoop version.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/version/hadoop'
  6. ddl (POST)
    • Description

      Executes a DDL statement.

    • URL

      https://www.myserver.com/templeton/v1/ddl

    • Parameter

      Parameter

      Description

      exec

      HCatalog DDL statement to be executed.

      group

      User group used when DDL is used to create a table.

      permissions

      Permission used when DDL is used to create a table. The format is rwxr-xr-x.

    • Returned result

      Parameter

      Description

      stdout

      Standard output value during HCatalog execution. The value may be empty.

      stderr

      Error output during HCatalog execution. The value may be empty.

      exitcode

      Return value of HCatalog.

    • Example
      curl -i -u : --insecure --negotiate -d exec="show tables" 'https://10.64.35.144:9111/templeton/v1/ddl'
  7. ddl/database (GET)
    • Description

      Lists all databases.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database

    • Parameter

      Parameter

      Description

      like

      Regular expression used to match the database name.

    • Returned result

      Parameter

      Description

      databases

      Database name.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/ddl/database'
  8. ddl/database/:db (GET)
    • Description

      Obtains details about a specified database.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db

    • Parameter

      Parameter

      Description

      :db

      Database name.

    • Returned result

      Parameter

      Description

      location

      Database location.

      comment

      Database remarks. If there are no database remarks, the value is null.

      database

      Database name.

      owner

      Database owner.

      owertype

      Type of the database owner.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/ddl/database/default'
  9. ddl/database/:db (PUT)
    • Description

      Creates a database.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db

    • Parameter

      Parameter

      Description

      :db

      Database name.

      group

      User group used for creating the database.

      permission

      Permission used for creating the database.

      location

      Database location.

      comment

      Database remarks, for example, description.

      properties

      Database properties.

    • Returned result

      Parameter

      Description

      database

      Name of the newly created database.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{"location": "/tmp/a", "comment": "my db", "properties": {"a": "b"}}' 'https://10.64.35.144:9111/templeton/v1/ddl/database/db2'
  10. ddl/database/:db (DELETE)
    • Description

      Deletes a database.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db

    • Parameter

      Parameter

      Description

      :db

      Database name.

      ifExists

      If the specified database does not exist, Hive returns an error unless ifExists is set to true.

      option

      Set the parameter to cascade or restrict. If you set it to cascade, all data and definitions are cleared. If you set it to restrict, the table content is empty and the mode does not exist.

    • Returned result

      Parameter

      Description

      database

      Name of the deleted database.

    • Example
      curl -i -u : --insecure --negotiate -X DELETE 'https://10.64.35.144:9111/templeton/v1/ddl/database/db3?ifExists=true'
  11. ddl/database/:db/table (GET)
    • Description

      Lists all tables in the database.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table

    • Parameter

      Parameter

      Description

      :db

      Database name.

      like

      Regular expression used to match a table name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      tables

      List of tables in the database.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/ddl/database/default/table'
  12. ddl/database/:db/table/:table (GET)
    • Description

      Obtains details about a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      format

      The format is "format=extended". If you want to see additional information, use "table extended like".

    • Returned result

      Parameter

      Description

      columns

      Column name and type.

      database

      Database name.

      table

      Table name.

      partitioned

      Whether a table is a partition table. This parameter is available only when the table format is extended.

      location

      Table location. This parameter is available only when the table format is extended.

      outputformat

      Output format. This parameter is available only when the table format is extended.

      inputformat

      Input format. This parameter is available only when the table format is extended.

      owner

      Table owner. This parameter is available only when the table format is extended.

      partitionColumns

      Partition column. This parameter is available only when the table format is extended.

    • Example
      curl -i -u : --insecure --negotiate 'https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1?format=extended'
  13. ddl/database/:db/table/:table (PUT)
    • Description

      Creates a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      New table name.

      group

      User group used for creating the table.

      permissions

      Permission used for creating the table.

      external

      Allows you to specify a location so that Hive does not use the default location for this table.

      ifNotExists

      If this parameter is set to true, no error is reported if a table exists.

      comment

      Remarks.

      columns

      Column description, including the column name, type, and optional remarks.

      partitionedBy

      Partition column description, which is used to partition tables. The columns parameter is used to list the column name, type, and optional remarks.

      clusteredBy

      Bucket column description, including the columnNames, sortedBy, and numberOfBuckets parameters. The columnNames parameter includes columnName and sorting sequence (ASC indicates an ascending order, and DESC indicates a descending order).

      format

      Storage format. The parameters include rowFormat, storedAs, and storedBy.

      location

      HDFS path.

      tableProperties

      Table property names and values (name-value pairs).

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{"columns": [{"name": "id", "type": "int"}, {"name": "name","type": "string"}], "comment": "hello","format": {"storedAs": "orc"} }' 'https://10.64.35.144:9111/templeton/v1/ddl/database/db3/table/tbl1'
  14. ddl/database/:db/table/:table (POST)
    • Description

      Renames a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Existing table name.

      rename

      New table name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      New table name.

    • Example
      curl -i -u : --insecure --negotiate -d rename=table1 'https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/tbl1'
  15. ddl/database/:db/table/:table (DELETE)
    • Description

      Deletes a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      ifExists

      If this parameter is set to true, no error is reported.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

    • Example
      curl -i -u : --insecure --negotiate -X DELETE 'https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/table2?ifExists=true'
  16. ddl/database/:db/table/:existingtable/like/:newtable (PUT)
    • Description

      Creates a table that is the same as an existing table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:existingtable/like/:newtable

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :existingtable

      Existing table name.

      :newtable

      New table name.

      group

      User group used for creating the table.

      permissions

      Permission used for creating the table.

      external

      Allows you to specify a location so that Hive does not use the default location for this table.

      ifNotExists

      If this parameter is set to true, the Hive does not report an error if a table already exists.

      location

      HDFS path.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{"ifNotExists": "true"}' 'https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/like/tt1'
  17. ddl/database/:db/table/:table/partition(GET)
    • Description

      Lists information about all partitions of a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      partitions

      List of partition attribute values and partition names.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/x1/partition
  18. ddl/database/:db/table/:table/partition/:partition(GET)
    • Description

      Lists information about a specific partition of a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition/:partition

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      :partition

      Partition name. Exercise caution when decoding HTTP quote, for example, country=%27algeria%27.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      partition

      Partition name.

      partitioned

      If this parameter is set to true, the table is a partitioned table.

      location

      Storage path of the table.

      outputFormat

      Output format.

      columns

      Column name, type, and remarks.

      owner

      Owner.

      partitionColumns

      Partition column.

      inputFormat

      Input format.

      totalNumberFiles

      Number of files in a partition.

      totalFileSize

      Total size of files in a partition.

      maxFileSize

      Maximum file size.

      minFileSize

      Minimum file size.

      lastAccessTime

      Last access time.

      lastUpdateTime

      Last update time.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/x1/partition/dt=1
  19. ddl/database/:db/table/:table/partition/:partition(PUT)
    • Description

      Adds a table partition.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition/:partition

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      group

      User group used for creating a partition.

      permissions

      User permission used for creating a partition.

      location

      Storage location of the new partition.

      ifNotExists

      If this parameter is set to true, the system reports an error when the partition already exists.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      partitions

      Partition name.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{}' https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/x1/partition/dt=10
  20. ddl/database/:db/table/:table/partition/:partition(DELETE)
    • Description

      Deletes a table partition.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition/:partition

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      group

      User group used for deleting a new partition.

      permissions

      User permission used for deleting a new partition. The format is rwxrw-r-x.

      ifExists

      If the specified partition does not exist, the Hive reports an error, unless this parameter is set to true.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      partitions

      Partition name.

    • Example
      curl -i -u : --insecure --negotiate -X DELETE -HContent-type:application/json -d '{}' https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/x1/partition/dt=10
  21. ddl/database/:db/table/:table/column(GET)
    • Description

      Obtains a column list of a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/column

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      columns

      Column name and type.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/column
  22. ddl/database/:db/table/:table/column/:column(GET)
    • Description

      Obtains details about a column in a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/column/:column

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      :column

      Column name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      column

      Column name and type.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/column/id
  23. ddl/database/:db/table/:table/column/:column(PUT)
    • Description

      Adds a column to a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/column/:column

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      :column

      Column name.

      type

      Column type, for example, string and int.

      comment

      Column remarks, for example, description.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      column

      Column name.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{"type": "string", "comment": "new column"}'  https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/column/name
  24. ddl/database/:db/table/:table/property(GET)
    • Description

      Obtains properties of a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/property

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      properties

      Property.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/property
  25. ddl/database/:db/table/:table/property/:property(GET)
    • Description

      Obtains a specific property value of a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/property/:property

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      :property

      Property name.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      property

      Property list.

    • Example
      curl -i -u : --insecure --negotiate https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/property/last_modified_by
  26. ddl/database/:db/table/:table/property/:property(PUT)
    • Description

      Adds a property value to a table.

    • URL

      https://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/property/:property

    • Parameter

      Parameter

      Description

      :db

      Database name.

      :table

      Table name.

      :property

      Property name.

      value

      Property value.

    • Returned result

      Parameter

      Description

      database

      Database name.

      table

      Table name.

      property

      Property name.

    • Example
      curl -i -u : --insecure --negotiate -X PUT -HContent-type:application/json -d '{"value": "my value"}' https://10.64.35.144:9111/templeton/v1/ddl/database/default/table/t1/property/mykey
  27. mapreduce/jar(POST)
    • Description

      Executes a MapReduce job. Before executing a MapReduce job, upload the JAR file of the MapReduce job to HDFS.

    • URL

      https://www.myserver.com/templeton/v1/mapreduce/jar

    • Parameter

      Parameter

      Description

      jar

      JAR file of the MapReduce job to be executed.

      class

      Class of the MapReduce job to be executed.

      libjars

      JAR file names of classpath to be added, separated by commas (,).

      files

      Names of files to be copied to the MapReduce cluster, separated by commas (,).

      arg

      Input parameter received by the Main class.

      define

      This parameter is used to configure Hadoop in the define=NAME=VALUE format.

      statusdir

      WebHCat writes the status of the MapReduce task to statusdir. If this parameter is set, you need to manually delete it.

      enablelog

      If statusdir is set and enablelog is set to true, Hadoop task configurations and logs are collected to $statusdir/logs. Then, successful and failed attempts are recorded in the logs. The layout of the subdirectories in $statusdir/logs is as follows:

      logs/$job_id (directory for $job_id)

      logs/$job_id/job.xml.html

      logs/$job_id/$attempt_id (directory for $attempt_id)

      logs/$job_id/$attempt_id/stderr

      logs/$job_id/$attempt_id/stdout

      logs/$job_id/$attempt_id/syslog

      Only Hadoop 1.X is supported.

      callback

      Callback address after MapReduce job execution. Use $jobId to embed the job ID in the callback address. In the callback address, replace the $jobId with the job ID.

    • Returned result

      Parameter

      Description

      id

      Job ID, similar to job_201110132141_0001.

    • Example
      curl -i -u : --insecure --negotiate -d jar="/tmp/word.count-0.0.1-SNAPSHOT.jar" -d class=com.huawei.word.count.WD -d statusdir="/output" -d enablelog=true "https://10.64.35.144:9111/templeton/v1/mapreduce/jar"
  28. mapreduce/streaming(POST)
    • Description

      Submits a MapReduce job in Streaming mode.

    • URL

      https://www.myserver.com/templeton/v1/mapreduce/streaming

    • Parameter

      Parameter

      Description

      input

      Input path of Hadoop.

      output

      Output save path. If this parameter is not specified, WebHCat will store the output in a path that can be found by using queue resources.

      mapper

      Location of the mapper program.

      reducer

      Location of the reducer program.

      files

      Add HDFS files to the distributed cache.

      arg

      Set an argument.

      define

      Set Hadoop configuration variables in the define=NAME=VALUE format.

      cmdenv

      Set environment variables in the cmdenv=NAME=VALUE format.

      statusdir

      WebHCat writes the status of the MapReduce task to statusdir. If this parameter is set, you need to manually delete it.

      enablelog

      If statusdir is set and enablelog is set to true, Hadoop task configurations and logs are collected to $statusdir/logs. Then, successful and failed attempts are recorded in the logs. The layout of the subdirectories in $statusdir/logs is as follows:

      logs/$job_id (directory for $job_id)

      logs/$job_id/job.xml.html

      logs/$job_id/$attempt_id (directory for $attempt_id)

      logs/$job_id/$attempt_id/stderr

      logs/$job_id/$attempt_id/stdout

      logs/$job_id/$attempt_id/syslog

      Only Hadoop 1.X is supported.

      callback

      Callback address after MapReduce job execution. Use $jobId to embed the job ID in the callback address. In the callback address, replace the $jobId with the job ID.

    • Returned result

      Parameter

      Description

      id

      Job ID, similar to job_201110132141_0001.

    • Example
      curl -i -u : --insecure --negotiate -d input=/input -d output=/oooo -d mapper=/bin/cat -d reducer="/usr/bin/wc -w" -d statusdir="/output" 'https://10.64.35.144:9111/templeton/v1/mapreduce/streaming'

    Before using this API, ensure that the prerequisites are met. For details, see the Hive rule in the Development Specifications.

  29. /hive(POST)
    • Description

      Runs Hive commands.

    • URL

      https://www.myserver.com/templeton/v1/hive

    • Parameter

      Parameter

      Description

      execute

      Hive commands, including entire and short Hive commands.

      file

      HDFS file containing Hive commands.

      files

      Names of files to be copied to the MapReduce cluster, separated by commas (,).

      arg

      Set an argument.

      define

      Hive configuration. The format is define=key=value. When using the post statement, you need to configure the scratch dir of the instance. The WebHCat instance uses define=hive.exec.scratchdir=/tmp/hive-scratch, and the WebHCat1 instance uses define=hive.exec.scratchdir=/tmp/hive1-scratch. The same rule applies to other instances.

      statusdir

      WebHCat writes the status of the MapReduce task to statusdir. If this parameter is set, you need to manually delete it.

      enablelog

      If statusdir is set and enablelog is set to true, Hadoop task configurations and logs are collected to $statusdir/logs. Then, successful and failed attempts are recorded in the logs. The layout of the subdirectories in $statusdir/logs is as follows:

      logs/$job_id (directory for $job_id)

      logs/$job_id/job.xml.html

      logs/$job_id/$attempt_id (directory for $attempt_id)

      logs/$job_id/$attempt_id/stderr

      logs/$job_id/$attempt_id/stdout

      logs/$job_id/$attempt_id/syslog

      callback

      Callback address after MapReduce job execution. Use $jobId to embed the job ID in the callback address. In the callback address, replace the $jobId with the job ID.

    • Returned result

      Parameter

      Description

      id

      Job ID, similar to job_201110132141_0001.

    • Example
      curl -i -u : --insecure --negotiate -d execute="select count(*) from t1" -d define=hive.exec.scratchdir=/tmp/hive-scratch -d statusdir="/output" "https://10.64.35.144:9111/templeton/v1/hive"
  30. jobs(GET)
    • Description

      Obtains all job IDs.

    • URL

      https://www.myserver.com/templeton/v1/jobs

    • Parameter

      Parameter

      Description

      fields

      If this parameter is set to *, details about each job are returned. If this parameter is not set, only a job ID is returned. The parameter can only be set to *. If the parameter is set to another value, an exception occurs.

      jobid

      If jobid is set, only jobs whose lexicographic order is greater than jobid are returned. For example, if the value of jobid is job_201312091733_0001, only the job whose value is greater than the value can be returned. The number of returned jobs depends on the value of numrecords.

      numrecords

      If numrecords and jobid are set, the jobid list is sorted lexicographically. After jobid is returned, the maximum value of numrecords can be obtained. If jobid is not set but numrecords is set, the maximum value of numrecords can be obtained after the jobid list is sorted lexicographically. In contrast, if numrecords is not set but jobid is set, all jobs whose lexicographic orders are greater than jobid will be returned.

      showall

      If showall is set to true, the request will return all jobs the user has permission to view, not only the jobs belonging to the user.

    • Returned result

      Parameter

      Description

      id

      Job id

      detail

      If the value of showall is true, details are displayed. Otherwise, the value is null.

    • Example
      curl -i -u : --insecure --negotiate  "https://10.64.35.144:9111/templeton/v1/jobs"
  31. jobs/:jobid(GET)
    • Description

      Obtains information about a specified job.

    • URL

      https://www.myserver.com/templeton/v1/jobs/:jobid

    • Parameter

      Parameter

      Description

      jobid

      Job ID, received after a job is created.

    • Returned result

      Parameter

      Description

      status

      JSON object containing job status information.

      profile

      JSON object containing job information. WebHCat parses information in the JobProfile object. The object varies according to the Hadoop version.

      id

      Job ID.

      percentComplete

      Job completion percentage, for example, 75%. If the job is complete, the value is null.

      user

      User who created the job.

      callback

      Callback URL (if any).

      userargs

      Parameter argument and parameter value when a user submits a job.

      exitValue

      Exit value of the job.

    • Example
      curl -i -u : --insecure --negotiate  "https://10.64.35.144:9111/templeton/v1/jobs/job_1440386556001_0255"
  32. jobs/:jobid(DELETE)
    • Description

      Kills a job.

    • URL

      https://www.myserver.com/templeton/v1/jobs/:jobid

    • Parameter

      Parameter

      Description

      :jobid

      ID of the job to be deleted.

    • Returned result

      Parameter

      Description

      user

      User who submits a job.

      status

      JSON object containing job status information.

      profile

      JSON object containing job information. WebHCat parses information in the JobProfile object. The object varies according to the Hadoop version.

      id

      Job ID.

      callback

      Callback URL (if any).

    • Example
      curl -i -u : --insecure --negotiate -X DELETE  "https://10.64.35.143:9111/templeton/v1/jobs/job_1440386556001_0265"