HDInsightJobManagementClient icon

HDInsightJobManagementClient

The HDInsight Job Client

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "azure.local",
  "info": {
    "description": "The HDInsight Job Client.",
    "title": "HDInsightJobManagementClient",
    "version": "2018-11-01-preview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/hdinsight/data-plane/Microsoft.HDInsight/preview/2018-11-01-preview/job.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "hdinsight-job",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "UserNameParameter": {
      "description": "The user name used for running job.",
      "in": "query",
      "name": "user.name",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "client"
    },
    "clusterDnsNameParameter": {
      "description": "The cluster dns name against which the job management is to be.",
      "in": "path",
      "name": "clusterDnsName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "client",
      "x-ms-skip-url-encoding": true
    }
  },
  "paths": {
    "/templeton/v1/hive": {
      "post": {
        "consumes": [
          "application/text"
        ],
        "description": "Submits a Hive job to an HDInsight cluster.",
        "operationId": "Job_SubmitHiveJob",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The content of the Hive job request.",
            "in": "body",
            "name": "content",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobSubmissionJsonResponse"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Submits a Hive job to an HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "content": "execute=select%20querydwelltime%2B2%20from%20hivesampletable%20where%20clientid%20%3D%208&statusdir=2018-10-30T10-13-36-30513317-c398-4da0-a98c-57db43750f3a",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "job_1540456943299_0046"
                }
              }
            }
          }
        }
      }
    },
    "/templeton/v1/jobs": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "Gets the list of jobs from the specified HDInsight cluster.",
        "operationId": "Job_List",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "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.",
            "enum": [
              "true"
            ],
            "in": "query",
            "name": "showall",
            "required": true,
            "type": "string"
          },
          {
            "description": "If fields set to '*', the request will return full details of the job. Currently the value can only be '*'.",
            "enum": [
              "*"
            ],
            "in": "query",
            "name": "fields",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "items": {
                "$ref": "#/definitions/JobListJsonObject"
              },
              "readOnly": true,
              "type": "array"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Gets the list of jobs from the specified HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "fields": "*",
              "showall": "true",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": [
                  {
                    "detail": {
                      "callback": null,
                      "completed": null,
                      "exitValue": null,
                      "id": "job_1542085634998_0027",
                      "msg": null,
                      "parentId": null,
                      "percentComplete": null,
                      "profile": {
                        "jobFile": "/mapreducestaging/testuser11750/.staging/job_1542085634998_0027/job.xml",
                        "jobID": {
                          "id": 27,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0027",
                        "jobName": "TempletonControllerJob",
                        "queueName": "default",
                        "url": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0027/",
                        "user": "testuser11750"
                      },
                      "status": {
                        "cleanupProgress": 0,
                        "failureInfo": "NA",
                        "finishTime": 0,
                        "historyFile": "",
                        "jobACLs": {},
                        "jobComplete": false,
                        "jobFile": "/mapreducestaging/testuser11750/.staging/job_1542085634998_0027/job.xml",
                        "jobID": {
                          "id": 27,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0027",
                        "jobName": "TempletonControllerJob",
                        "jobPriority": "NORMAL",
                        "mapProgress": 0,
                        "neededMem": 0,
                        "numReservedSlots": 0,
                        "numUsedSlots": 0,
                        "priority": "NORMAL",
                        "queue": "default",
                        "reduceProgress": 0,
                        "reservedMem": 0,
                        "retired": false,
                        "runState": 4,
                        "schedulingInfo": "NA",
                        "setupProgress": 0,
                        "startTime": 1542088296429,
                        "state": "PREP",
                        "trackingUrl": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0027/",
                        "uber": false,
                        "usedMem": 0,
                        "username": "testuser11750"
                      },
                      "user": "testuser11750",
                      "userargs": {
                        "callback": null,
                        "define": [],
                        "enablelog": "false",
                        "execute": "select querydwelltime+2 from hivesampletable where clientid = 8",
                        "file": null,
                        "files": null,
                        "statusdir": null
                      }
                    },
                    "id": "job_1542085634998_0027"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/templeton/v1/jobs/{jobId}": {
      "delete": {
        "consumes": [
          "application/json"
        ],
        "description": "Initiates cancel on given running job in the specified HDInsight.",
        "operationId": "Job_Kill",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The id of the job.",
            "in": "path",
            "minLength": 1,
            "name": "jobId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobDetailRootJsonObject"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Initiates cancel on given running job in the specified HDInsight.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "jobId": "job_1542085634998_0007",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "callback": null,
                  "completed": null,
                  "exitValue": null,
                  "id": "job_1542085634998_0007",
                  "msg": null,
                  "parentId": null,
                  "percentComplete": null,
                  "profile": {
                    "jobFile": "/mapreducestaging/testuser11750/.staging/job_1542085634998_0007/job.xml",
                    "jobID": {
                      "id": 7,
                      "jtIdentifier": "1542085634998"
                    },
                    "jobId": "job_1542085634998_0007",
                    "jobName": "TempletonControllerJob",
                    "queueName": "default",
                    "url": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/cluster/app/application_1542085634998_0007",
                    "user": "testuser11750"
                  },
                  "status": {
                    "cleanupProgress": 0,
                    "failureInfo": "NA",
                    "finishTime": 1542087305443,
                    "historyFile": "",
                    "jobACLs": {},
                    "jobComplete": true,
                    "jobFile": "/mapreducestaging/testuser11750/.staging/job_1542085634998_0007/job.xml",
                    "jobID": {
                      "id": 7,
                      "jtIdentifier": "1542085634998"
                    },
                    "jobId": "job_1542085634998_0007",
                    "jobName": "TempletonControllerJob",
                    "jobPriority": "NORMAL",
                    "mapProgress": 0,
                    "neededMem": 0,
                    "numReservedSlots": 0,
                    "numUsedSlots": 0,
                    "priority": "NORMAL",
                    "queue": "default",
                    "reduceProgress": 0,
                    "reservedMem": 0,
                    "retired": false,
                    "runState": 5,
                    "schedulingInfo": "NA",
                    "setupProgress": 0,
                    "startTime": 1542087304445,
                    "state": "KILLED",
                    "trackingUrl": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/cluster/app/application_1542085634998_0007",
                    "uber": false,
                    "usedMem": 0,
                    "username": "testuser11750"
                  },
                  "user": "testuser11750",
                  "userargs": {
                    "arg": [
                      "10",
                      "1000"
                    ],
                    "callback": null,
                    "class": "pi",
                    "define": [
                      "mapreduce.map.maxattempts=10",
                      "mapreduce.reduce.maxattempts=10",
                      "mapreduce.task.timeout=60000"
                    ],
                    "enablejobreconnect": null,
                    "enablelog": "false",
                    "files": null,
                    "jar": "/example/jars/hadoop-mapreduce-examples.jar",
                    "libjars": null,
                    "statusdir": "2018-11-13T05-35-01-6f79af0f-6157-494a-a03e-eabb190a0c10"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "Gets job details from the specified HDInsight cluster.",
        "operationId": "Job_Get",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The id of the job.",
            "in": "path",
            "name": "jobId",
            "required": true,
            "type": "string"
          },
          {
            "description": "If fields set to '*', the request will return full details of the job. Currently the value can only be '*'.",
            "enum": [
              "*"
            ],
            "in": "query",
            "name": "fields",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobDetailRootJsonObject"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Gets job details from the specified HDInsight cluster": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "fields": "*",
              "jobId": "job_1542085634998_0024",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "callback": null,
                  "completed": "done",
                  "exitValue": 0,
                  "id": "job_1542085634998_0024",
                  "msg": null,
                  "parentId": null,
                  "percentComplete": null,
                  "profile": {
                    "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mr-history/done/2018/11/13/000000/job_1542085634998_0024_conf.xml",
                    "jobID": {
                      "id": 24,
                      "jtIdentifier": "1542085634998"
                    },
                    "jobId": "job_1542085634998_0024",
                    "jobName": "TempletonControllerJob",
                    "queueName": "default",
                    "url": null,
                    "user": "testuser11750"
                  },
                  "status": {
                    "cleanupProgress": 0,
                    "failureInfo": "NA",
                    "finishTime": 1542088277769,
                    "historyFile": "",
                    "jobACLs": {},
                    "jobComplete": true,
                    "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mr-history/done/2018/11/13/000000/job_1542085634998_0024_conf.xml",
                    "jobID": {
                      "id": 24,
                      "jtIdentifier": "1542085634998"
                    },
                    "jobId": "job_1542085634998_0024",
                    "jobName": "TempletonControllerJob",
                    "jobPriority": "NORMAL",
                    "mapProgress": 1,
                    "neededMem": 0,
                    "numReservedSlots": 0,
                    "numUsedSlots": 0,
                    "priority": "NORMAL",
                    "queue": "default",
                    "reduceProgress": 1,
                    "reservedMem": 0,
                    "retired": false,
                    "runState": 2,
                    "schedulingInfo": "NA",
                    "setupProgress": 0,
                    "startTime": 1542088206436,
                    "state": "SUCCEEDED",
                    "trackingUrl": "hn1-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:19888/jobhistory/job/job_1542085634998_0024",
                    "uber": false,
                    "usedMem": 0,
                    "username": "testuser11750"
                  },
                  "user": "testuser11750",
                  "userargs": {
                    "callback": null,
                    "define": [],
                    "enablejobreconnect": null,
                    "enablelog": "false",
                    "execute": "select querydwelltime+2 from hivesampletable where clientid = 8",
                    "file": null,
                    "files": null,
                    "statusdir": "2018-11-13T05-49-52-4418fce1-e92e-4732-bc12-f2a3b8ef4432"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/templeton/v1/jobs?op=LISTAFTERID": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "Gets numrecords Of Jobs after jobid from the specified HDInsight cluster.",
        "operationId": "Job_ListAfterJobId",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "JobId from where to list jobs.",
            "in": "query",
            "name": "jobid",
            "required": false,
            "type": "string"
          },
          {
            "description": "Number of jobs to fetch.",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "numrecords",
            "required": false,
            "type": "integer"
          },
          {
            "description": "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.",
            "enum": [
              "true"
            ],
            "in": "query",
            "name": "showall",
            "required": true,
            "type": "string"
          },
          {
            "description": "If fields set to '*', the request will return full details of the job. Currently the value can only be '*'.",
            "enum": [
              "*"
            ],
            "in": "query",
            "name": "fields",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "items": {
                "$ref": "#/definitions/JobListJsonObject"
              },
              "readOnly": true,
              "type": "array"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Gets numOfJobs after jobId from the specified HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "fields": "*",
              "jobId": "job_1542085634998_0029",
              "numrecords": 3,
              "showall": "true",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": [
                  {
                    "detail": {
                      "callback": null,
                      "completed": null,
                      "exitValue": null,
                      "id": "job_1542085634998_0028",
                      "msg": null,
                      "parentId": null,
                      "percentComplete": null,
                      "profile": {
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mapreducestaging/testuser11750/.staging/job_1542085634998_0028/job.xml",
                        "jobID": {
                          "id": 28,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0028",
                        "jobName": "TempletonControllerJob",
                        "queueName": "default",
                        "url": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0028/",
                        "user": "yarn"
                      },
                      "status": {
                        "cleanupProgress": 0,
                        "failureInfo": "NA",
                        "finishTime": 0,
                        "historyFile": "",
                        "jobACLs": {},
                        "jobComplete": false,
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mapreducestaging/testuser11750/.staging/job_1542085634998_0028/job.xml",
                        "jobID": {
                          "id": 28,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0028",
                        "jobName": "TempletonControllerJob",
                        "jobPriority": "NORMAL",
                        "mapProgress": 0,
                        "neededMem": 0,
                        "numReservedSlots": 0,
                        "numUsedSlots": 0,
                        "priority": "NORMAL",
                        "queue": "default",
                        "reduceProgress": 0,
                        "reservedMem": 0,
                        "retired": false,
                        "runState": 1,
                        "schedulingInfo": "NA",
                        "setupProgress": 1,
                        "startTime": 1542088315731,
                        "state": "RUNNING",
                        "trackingUrl": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0028/",
                        "uber": false,
                        "usedMem": 0,
                        "username": "yarn"
                      },
                      "user": "yarn",
                      "userargs": {
                        "callback": null,
                        "define": [],
                        "enablelog": "false",
                        "execute": "select querydwelltime+2 from hivesampletable where clientid = 8",
                        "file": null,
                        "files": null,
                        "statusdir": null
                      }
                    },
                    "id": "job_1542085634998_0028"
                  },
                  {
                    "detail": {
                      "callback": null,
                      "completed": null,
                      "exitValue": null,
                      "id": "job_1542085634998_0027",
                      "msg": null,
                      "parentId": null,
                      "percentComplete": null,
                      "profile": {
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mapreducestaging/testuser11750/.staging/job_1542085634998_0027/job.xml",
                        "jobID": {
                          "id": 27,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0027",
                        "jobName": "TempletonControllerJob",
                        "queueName": "default",
                        "url": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0027/",
                        "user": "yarn"
                      },
                      "status": {
                        "cleanupProgress": 0,
                        "failureInfo": "NA",
                        "finishTime": 0,
                        "historyFile": "",
                        "jobACLs": {},
                        "jobComplete": false,
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mapreducestaging/testuser11750/.staging/job_1542085634998_0027/job.xml",
                        "jobID": {
                          "id": 27,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0027",
                        "jobName": "TempletonControllerJob",
                        "jobPriority": "NORMAL",
                        "mapProgress": 0,
                        "neededMem": 0,
                        "numReservedSlots": 0,
                        "numUsedSlots": 0,
                        "priority": "NORMAL",
                        "queue": "default",
                        "reduceProgress": 0,
                        "reservedMem": 0,
                        "retired": false,
                        "runState": 1,
                        "schedulingInfo": "NA",
                        "setupProgress": 1,
                        "startTime": 1542088307280,
                        "state": "RUNNING",
                        "trackingUrl": "http://hn0-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:8088/proxy/application_1542085634998_0027/",
                        "uber": false,
                        "usedMem": 0,
                        "username": "yarn"
                      },
                      "user": "yarn",
                      "userargs": {
                        "callback": null,
                        "define": [],
                        "enablelog": "false",
                        "execute": "select querydwelltime+2 from hivesampletable where clientid = 8",
                        "file": null,
                        "files": null,
                        "statusdir": null
                      }
                    },
                    "id": "job_1542085634998_0027"
                  },
                  {
                    "detail": {
                      "callback": null,
                      "completed": null,
                      "exitValue": null,
                      "id": "job_1542085634998_0025",
                      "msg": null,
                      "parentId": "job_1542085634998_0023",
                      "percentComplete": null,
                      "profile": {
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mr-history/done/2018/11/13/000000/job_1542085634998_0025_conf.xml",
                        "jobID": {
                          "id": 25,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0025",
                        "jobName": "QuasiMonteCarlo",
                        "queueName": "default",
                        "url": null,
                        "user": "testuser11750"
                      },
                      "status": {
                        "cleanupProgress": 0,
                        "failureInfo": "NA",
                        "finishTime": 1542088250019,
                        "historyFile": "",
                        "jobACLs": {},
                        "jobComplete": true,
                        "jobFile": "wasb://testcontainer11549@testazureblob1114.blob.core.windows.net/mr-history/done/2018/11/13/000000/job_1542085634998_0025_conf.xml",
                        "jobID": {
                          "id": 25,
                          "jtIdentifier": "1542085634998"
                        },
                        "jobId": "job_1542085634998_0025",
                        "jobName": "QuasiMonteCarlo",
                        "jobPriority": "NORMAL",
                        "mapProgress": 1,
                        "neededMem": 0,
                        "numReservedSlots": 0,
                        "numUsedSlots": 0,
                        "priority": "NORMAL",
                        "queue": "default",
                        "reduceProgress": 1,
                        "reservedMem": 0,
                        "retired": false,
                        "runState": 2,
                        "schedulingInfo": "NA",
                        "setupProgress": 0,
                        "startTime": 1542088225363,
                        "state": "SUCCEEDED",
                        "trackingUrl": "hn1-testcl.422g4qa5a0lehgxxtnagxxuu2h.ex.internal.cloudapp.net:19888/jobhistory/job/job_1542085634998_0025",
                        "uber": false,
                        "usedMem": 0,
                        "username": "testuser11750"
                      },
                      "user": "testuser11750",
                      "userargs": {}
                    },
                    "id": "job_1542085634998_0025"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/templeton/v1/mapreduce/jar": {
      "post": {
        "consumes": [
          "text/plain"
        ],
        "description": "Submits a MapReduce job to an HDInsight cluster.",
        "operationId": "Job_SubmitMapReduceJob",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The content of the MapReduce job request.",
            "in": "body",
            "name": "content",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobSubmissionJsonResponse"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Submits a MapReduce job to an HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "content": "jar=%2Fexample%2Fjars%2Fhadoop-mapreduce-examples.jar&class=pi&arg=10&arg=1000&define=mapreduce.map.maxattempts%3D10&define=mapreduce.reduce.maxattempts%3D10&define=mapreduce.task.timeout%3D60000&statusdir=2018-10-30T10-12-29-595ef52d-583c-4b17-987b-675e4f8eea8f",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "job_1540456943299_0046"
                }
              }
            }
          }
        }
      }
    },
    "/templeton/v1/mapreduce/streaming": {
      "post": {
        "consumes": [
          "text/plain"
        ],
        "description": "Submits a MapReduce streaming job to an HDInsight cluster.",
        "operationId": "Job_SubmitMapReduceStreamingJob",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The content of the MapReduce job request.",
            "in": "body",
            "name": "content",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobSubmissionJsonResponse"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Submits a MapReduce streaming job to an HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "content": "input=%2Fexample%2Fdata%2Fgutenberg%2Fdavinci.txt&output=%2Fexample%2Fdata%2Fgutenberg%2Fwcount%2F3745c39c-0115-4735-a9eb-c57de9a29dcd&mapper=cat&reducer=wc&statusdir=2018-10-30T11-40-44-eb9dc5c1-99dd-4282-9d4a-a77c8ffb6b35",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "job_1540456943299_0046"
                }
              }
            }
          }
        }
      }
    },
    "/templeton/v1/pig": {
      "post": {
        "consumes": [
          "text/plain"
        ],
        "description": "Submits a Pig job to an HDInsight cluster.",
        "operationId": "Job_SubmitPigJob",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The content of the Pig job request.",
            "in": "body",
            "name": "content",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobSubmissionJsonResponse"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Submits a Pig job to an HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "content": "execute=LOGS%20%3D%20LOAD%20%27wasb%3A%2F%2F%2Fexample%2Fdata%2Fsample.log%27%3BLEVELS%20%3D%20foreach%20LOGS%20generate%20REGEX_EXTRACT%28%240%2C%20%27%28TRACE%7CDEBUG%7CINFO%7CWARN%7CERROR%7CFATAL%29%27%2C%201%29%20%20as%20LOGLEVEL%3BFILTEREDLEVELS%20%3D%20FILTER%20LEVELS%20by%20LOGLEVEL%20is%20not%20null%3BGROUPEDLEVELS%20%3D%20GROUP%20FILTEREDLEVELS%20by%20LOGLEVEL%3BFREQUENCIES%20%3D%20foreach%20GROUPEDLEVELS%20generate%20group%20as%20LOGLEVEL%2C%20COUNT%28FILTEREDLEVELS.LOGLEVEL%29%20as%20COUNT%3BRESULT%20%3D%20order%20FREQUENCIES%20by%20COUNT%20desc%3BDUMP%20RESULT%3B&statusdir=2018-10-30T12-44-24-bd642975-9a89-4480-aea7-3ee1f34016ec",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "job_1540456943299_0046"
                }
              }
            }
          }
        }
      }
    },
    "/templeton/v1/sqoop": {
      "post": {
        "consumes": [
          "text/plain"
        ],
        "description": "Submits a Sqoop job to an HDInsight cluster.",
        "operationId": "Job_SubmitSqoopJob",
        "parameters": [
          {
            "$ref": "#/parameters/UserNameParameter"
          },
          {
            "description": "The content of the Sqoop job request.",
            "in": "body",
            "name": "content",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/JobSubmissionJsonResponse"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Submits a Sqoop job to an HDInsight cluster.": {
            "parameters": {
              "clusterDnsName": "cluster.azurehdinsight.net",
              "content": "command=import%20--connect%20jdbc%3Asqlserver%3A%2F%2Fdongwwahdi.database.windows.net%3A1433%3Bdatabase%3DHdInsightJobTest%3Buser%3Ddongwwaadmin%3Bpassword%3DHDInsight123%21%3B%20--table%20dept%20--warehouse-dir%20%2Fuser%2Fadmin%2Fsqoop%2F25c8b9f9-dbc1-4096-aa42-45f2868ab782%20--hive-import%20-m%201%20--hive-table%20deptd3175062928d4170831ac17d2eefdaeb&statusdir=SqoopStatus",
              "user.name": "admin"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "job_1540456943299_0046"
                }
              }
            }
          }
        }
      }
    },
    "/ws/v1/cluster/apps/{appId}/state": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "Gets application state from the specified HDInsight cluster.",
        "operationId": "Job_GetAppState",
        "parameters": [
          {
            "description": "The id of the job.",
            "in": "path",
            "name": "appId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response definition.",
            "schema": {
              "$ref": "#/definitions/AppState"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/JobOperationsErrorResponse"
            }
          }
        },
        "tags": [
          "Job"
        ],
        "x-ms-examples": {
          "Gets application state from the specified HDInsight cluster.": {
            "parameters": {
              "appId": "application_1462754318084_0071",
              "clusterDnsName": "cluster.azurehdinsight.net"
            },
            "responses": {
              "200": {
                "body": {
                  "state": "ACCEPTED"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AppState": {
      "description": "The State of the application.",
      "properties": {
        "state": {
          "description": "The State of the application.",
          "enum": [
            "NEW",
            "NEW_SAVING",
            "SUBMITTED",
            "ACCEPTED",
            "RUNNING",
            "FINISHED",
            "FINISHING",
            "FAILED",
            "KILLED"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "ApplicationState"
          }
        }
      }
    },
    "JobACLs": {
      "description": "The object containing the job ACLs."
    },
    "JobDetailRootJsonObject": {
      "description": "The object containing the job details.",
      "properties": {
        "callback": {
          "description": "The callback URL, if any.",
          "type": "object"
        },
        "completed": {
          "description": "The string representing completed status, for example 'done'.",
          "type": "string"
        },
        "exitValue": {
          "description": "The job's exit value.",
          "format": "int32",
          "type": "integer"
        },
        "id": {
          "description": "The job ID.",
          "type": "string"
        },
        "msg": {
          "description": "The message returned.",
          "type": "object"
        },
        "parentId": {
          "description": "The parent job ID.",
          "type": "string"
        },
        "percentComplete": {
          "description": "The job completion percentage, for example '75% complete'.",
          "type": "string"
        },
        "profile": {
          "$ref": "#/definitions/Profile",
          "description": "The object containing the job profile information."
        },
        "status": {
          "$ref": "#/definitions/Status",
          "description": "The object containing the job status information."
        },
        "user": {
          "description": "The user name of the job creator.",
          "type": "string"
        },
        "userargs": {
          "$ref": "#/definitions/Userargs",
          "description": "The arguments passed in by the user."
        }
      }
    },
    "JobID": {
      "description": "The object with the Job ID.",
      "properties": {
        "id": {
          "description": "The job number.",
          "format": "int64",
          "type": "integer"
        },
        "jtIdentifier": {
          "description": "The jobTracker identifier.",
          "type": "string"
        }
      }
    },
    "JobListJsonObject": {
      "description": "The List Job operation response.",
      "properties": {
        "detail": {
          "$ref": "#/definitions/JobDetailRootJsonObject",
          "description": "The detail of the job."
        },
        "id": {
          "description": "The Id of the job.",
          "type": "string"
        }
      }
    },
    "JobOperationsErrorResponse": {
      "description": "Describes the format of Error response.",
      "properties": {
        "error": {
          "description": "Error message indicating why the operation failed.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "JobSubmissionJsonResponse": {
      "description": "The job submission json response.",
      "properties": {
        "id": {
          "description": "The Id of the created job.",
          "type": "string"
        }
      }
    },
    "Profile": {
      "description": "The object containing the job profile information.",
      "properties": {
        "jobFile": {
          "description": "The job configuration file.",
          "type": "string"
        },
        "jobID": {
          "$ref": "#/definitions/JobID",
          "description": "The ID of the job."
        },
        "jobId": {
          "description": "The full ID of the job.",
          "type": "string"
        },
        "jobName": {
          "description": "The user-specified job name.",
          "type": "string"
        },
        "queueName": {
          "description": "The name of the queue to which the job is submitted.",
          "type": "string"
        },
        "url": {
          "description": "The link to the web-ui for details of the job.",
          "type": "string"
        },
        "user": {
          "description": "The userid of the person who submitted the job.",
          "type": "string"
        }
      }
    },
    "Status": {
      "description": "Gets or sets the object containing the job status information.",
      "properties": {
        "cleanupProgress": {
          "description": "The progress made on the cleanup.",
          "format": "double",
          "type": "number"
        },
        "failureInfo": {
          "description": "The information about any failures that have occurred.",
          "type": "string"
        },
        "finishTime": {
          "description": "The time at which the job completed. It is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00.",
          "format": "int64",
          "type": "integer"
        },
        "historyFile": {
          "description": "The history file of the job.",
          "type": "string"
        },
        "jobACLs": {
          "$ref": "#/definitions/JobACLs",
          "description": "The ACLs of the job."
        },
        "jobComplete": {
          "description": "Whether or not the job has completed.",
          "type": "boolean"
        },
        "jobFile": {
          "description": "The job configuration file.",
          "type": "string"
        },
        "jobID": {
          "$ref": "#/definitions/JobID",
          "description": "The ID of the job."
        },
        "jobId": {
          "description": "The full ID of the job.",
          "type": "string"
        },
        "jobName": {
          "description": "The user-specified job name.",
          "type": "string"
        },
        "jobPriority": {
          "description": "The priority of the job.",
          "type": "string"
        },
        "mapProgress": {
          "description": "The progress made on the maps.",
          "format": "double",
          "type": "number"
        },
        "neededMem": {
          "description": "The amount of memory needed for the job.",
          "format": "int64",
          "type": "integer"
        },
        "numReservedSlots": {
          "description": "The number of slots reserved.",
          "format": "int32",
          "type": "integer"
        },
        "numUsedSlots": {
          "description": "The number of slots used for the job.",
          "format": "int32",
          "type": "integer"
        },
        "priority": {
          "description": "The priority of the job.",
          "type": "string"
        },
        "queue": {
          "description": "The job queue name.",
          "type": "string"
        },
        "reduceProgress": {
          "description": "The progress made on the reduces.",
          "format": "double",
          "type": "number"
        },
        "reservedMem": {
          "description": "The amount of memory reserved for the job.",
          "format": "int64",
          "type": "integer"
        },
        "retired": {
          "description": "Whether or not the job has been retired. ",
          "type": "boolean"
        },
        "runState": {
          "description": "The current state of the job.",
          "format": "int32",
          "type": "integer"
        },
        "schedulingInfo": {
          "description": "The information about the scheduling of the job.",
          "type": "string"
        },
        "setupProgress": {
          "description": "The progress made on the setup.",
          "format": "double",
          "type": "number"
        },
        "startTime": {
          "description": "The time at which the job started. It is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00.",
          "format": "int64",
          "type": "integer"
        },
        "state": {
          "description": "The state of the job.",
          "type": "string"
        },
        "trackingUrl": {
          "description": "The link to the web-ui for details of the job.",
          "type": "string"
        },
        "uber": {
          "description": "Whether job running in uber mode.",
          "type": "boolean"
        },
        "usedMem": {
          "description": "The amount of memory used by the job.",
          "format": "int64",
          "type": "integer"
        },
        "username": {
          "description": "The userid of the person who submitted the job.",
          "type": "string"
        }
      }
    },
    "Userargs": {
      "description": "Gets or sets the object containing the user arguments.",
      "properties": {
        "arg": {
          "description": "The list of args defined by the user.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "callback": {
          "description": "The callback URL, if any.",
          "type": "object"
        },
        "define": {
          "description": "The define properties defined by the user.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "enablelog": {
          "description": "Whether or not the user enabled logs.",
          "type": "string"
        },
        "execute": {
          "description": "The query defined by the user.",
          "type": "string"
        },
        "file": {
          "description": "The query file provided by the user.",
          "type": "object"
        },
        "files": {
          "description": "The files defined by the user.",
          "type": "object"
        },
        "jar": {
          "description": "The JAR file provided by the user.",
          "type": "string"
        },
        "statusdir": {
          "description": "The status directory defined by the user.",
          "type": "object"
        }
      }
    }
  },
  "x-ms-parameterized-host": {
    "hostTemplate": "{clusterDnsName}",
    "parameters": [
      {
        "$ref": "#/parameters/clusterDnsNameParameter"
      }
    ]
  }
}