UNPKG

azure-arm-datalake-analytics

Version:

Microsoft Azure Data Lake Analytics Management Client Library for node

758 lines (728 loc) 30.2 kB
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ import { BaseResource } from 'ms-rest-azure'; import { CloudError } from 'ms-rest-azure'; import * as moment from 'moment'; export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; /** * @class * Initializes a new instance of the JobStatisticsVertexStage class. * @constructor * The Data Lake Analytics job statistics vertex stage information. * * @member {number} [dataRead] the amount of data read, in bytes. * @member {number} [dataReadCrossPod] the amount of data read across multiple * pods, in bytes. * @member {number} [dataReadIntraPod] the amount of data read in one pod, in * bytes. * @member {number} [dataToRead] the amount of data remaining to be read, in * bytes. * @member {number} [dataWritten] the amount of data written, in bytes. * @member {number} [duplicateDiscardCount] the number of duplicates that were * discarded. * @member {number} [failedCount] the number of failures that occured in this * stage. * @member {number} [maxVertexDataRead] the maximum amount of data read in a * single vertex, in bytes. * @member {number} [minVertexDataRead] the minimum amount of data read in a * single vertex, in bytes. * @member {number} [readFailureCount] the number of read failures in this * stage. * @member {number} [revocationCount] the number of vertices that were revoked * during this stage. * @member {number} [runningCount] the number of currently running vertices in * this stage. * @member {number} [scheduledCount] the number of currently scheduled vertices * in this stage * @member {string} [stageName] the name of this stage in job execution. * @member {number} [succeededCount] the number of vertices that succeeded in * this stage. * @member {number} [tempDataWritten] the amount of temporary data written, in * bytes. * @member {number} [totalCount] the total vertex count for this stage. * @member {moment.duration} [totalFailedTime] the amount of time that failed * vertices took up in this stage. * @member {number} [totalProgress] the current progress of this stage, as a * percentage. * @member {moment.duration} [totalSucceededTime] the amount of time all * successful vertices took in this stage. */ export interface JobStatisticsVertexStage { readonly dataRead?: number; readonly dataReadCrossPod?: number; readonly dataReadIntraPod?: number; readonly dataToRead?: number; readonly dataWritten?: number; readonly duplicateDiscardCount?: number; readonly failedCount?: number; readonly maxVertexDataRead?: number; readonly minVertexDataRead?: number; readonly readFailureCount?: number; readonly revocationCount?: number; readonly runningCount?: number; readonly scheduledCount?: number; readonly stageName?: string; readonly succeededCount?: number; readonly tempDataWritten?: number; readonly totalCount?: number; readonly totalFailedTime?: moment.Duration; readonly totalProgress?: number; readonly totalSucceededTime?: moment.Duration; } /** * @class * Initializes a new instance of the JobStatistics class. * @constructor * The Data Lake Analytics job execution statistics. * * @member {date} [lastUpdateTimeUtc] the last update time for the statistics. * @member {date} [finalizingTimeUtc] the job finalizing start time. * @member {array} [stages] the list of stages for the job. */ export interface JobStatistics { readonly lastUpdateTimeUtc?: Date; readonly finalizingTimeUtc?: Date; readonly stages?: JobStatisticsVertexStage[]; } /** * @class * Initializes a new instance of the JobDataPath class. * @constructor * A Data Lake Analytics job data path item. * * @member {uuid} [jobId] the id of the job this data is for. * @member {string} [command] the command that this job data relates to. * @member {array} [paths] the list of paths to all of the job data. */ export interface JobDataPath { readonly jobId?: string; readonly command?: string; readonly paths?: string[]; } /** * @class * Initializes a new instance of the JobStateAuditRecord class. * @constructor * The Data Lake Analytics job state audit records for tracking the lifecycle * of a job. * * @member {string} [newState] the new state the job is in. * @member {date} [timeStamp] the time stamp that the state change took place. * @member {string} [requestedByUser] the user who requests the change. * @member {string} [details] the details of the audit log. */ export interface JobStateAuditRecord { readonly newState?: string; readonly timeStamp?: Date; readonly requestedByUser?: string; readonly details?: string; } /** * @class * Initializes a new instance of the JobResource class. * @constructor * The Data Lake Analytics job resources. * * @member {string} [name] the name of the resource. * @member {string} [resourcePath] the path to the resource. * @member {string} [type] the job resource type. Possible values include: * 'VertexResource', 'JobManagerResource', 'StatisticsResource', * 'VertexResourceInUserFolder', 'JobManagerResourceInUserFolder', * 'StatisticsResourceInUserFolder' */ export interface JobResource { name?: string; resourcePath?: string; type?: string; } /** * @class * Initializes a new instance of the Diagnostics class. * @constructor * Error diagnostic information for failed jobs. * * @member {number} [columnNumber] the column where the error occured. * @member {number} [end] the ending index of the error. * @member {number} [lineNumber] the line number the error occured on. * @member {string} [message] the error message. * @member {string} [severity] the severity of the error. Possible values * include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', * 'UserWarning' * @member {number} [start] the starting index of the error. */ export interface Diagnostics { readonly columnNumber?: number; readonly end?: number; readonly lineNumber?: number; readonly message?: string; readonly severity?: string; readonly start?: number; } /** * @class * Initializes a new instance of the JobProperties class. * @constructor * The common Data Lake Analytics job properties. * * @member {string} [runtimeVersion] the runtime version of the Data Lake * Analytics engine to use for the specific type of job being run. * @member {string} script the script to run. Please note that the maximum * script size is 3 MB. * @member {string} type Polymorphic Discriminator */ export interface JobProperties { runtimeVersion?: string; script: string; type: string; } /** * @class * Initializes a new instance of the USqlJobProperties class. * @constructor * U-SQL job properties used when retrieving U-SQL jobs. * * @member {array} [resources] the list of resources that are required by the * job * @member {object} [statistics] the job specific statistics. * @member {date} [statistics.lastUpdateTimeUtc] the last update time for the * statistics. * @member {date} [statistics.finalizingTimeUtc] the job finalizing start time. * @member {array} [statistics.stages] the list of stages for the job. * @member {object} [debugData] the job specific debug data locations. * @member {uuid} [debugData.jobId] the id of the job this data is for. * @member {string} [debugData.command] the command that this job data relates * to. * @member {array} [debugData.paths] the list of paths to all of the job data. * @member {array} [diagnostics] the diagnostics for the job. * @member {string} [algebraFilePath] the algebra file path after the job has * completed * @member {moment.duration} [totalCompilationTime] the total time this job * spent compiling. This value should not be set by the user and will be * ignored if it is. * @member {moment.duration} [totalPauseTime] the total time this job spent * paused. This value should not be set by the user and will be ignored if it * is. * @member {moment.duration} [totalQueuedTime] the total time this job spent * queued. This value should not be set by the user and will be ignored if it * is. * @member {moment.duration} [totalRunningTime] the total time this job spent * executing. This value should not be set by the user and will be ignored if * it is. * @member {string} [rootProcessNodeId] the ID used to identify the job manager * coordinating job execution. This value should not be set by the user and * will be ignored if it is. * @member {string} [yarnApplicationId] the ID used to identify the yarn * application executing the job. This value should not be set by the user and * will be ignored if it is. * @member {number} [yarnApplicationTimeStamp] the timestamp (in ticks) for the * yarn application executing the job. This value should not be set by the user * and will be ignored if it is. * @member {string} [compileMode] the specific compilation mode for the job * used during execution. If this is not specified during submission, the * server will determine the optimal compilation mode. Possible values include: * 'Semantic', 'Full', 'SingleBox' */ export interface USqlJobProperties extends JobProperties { readonly resources?: JobResource[]; statistics?: JobStatistics; debugData?: JobDataPath; readonly diagnostics?: Diagnostics[]; readonly algebraFilePath?: string; readonly totalCompilationTime?: moment.Duration; readonly totalPauseTime?: moment.Duration; readonly totalQueuedTime?: moment.Duration; readonly totalRunningTime?: moment.Duration; readonly rootProcessNodeId?: string; readonly yarnApplicationId?: string; readonly yarnApplicationTimeStamp?: number; readonly compileMode?: string; } /** * @class * Initializes a new instance of the HiveJobProperties class. * @constructor * Hive job properties used when retrieving Hive jobs. * * @member {string} [logsLocation] the Hive logs location * @member {string} [outputLocation] the location of Hive job output files * (both execution output and results) * @member {number} [statementCount] the number of statements that will be run * based on the script * @member {number} [executedStatementCount] the number of statements that have * been run based on the script */ export interface HiveJobProperties extends JobProperties { readonly logsLocation?: string; readonly outputLocation?: string; readonly statementCount?: number; readonly executedStatementCount?: number; } /** * @class * Initializes a new instance of the CreateJobProperties class. * @constructor * The common Data Lake Analytics job properties for job submission. * * @member {string} [runtimeVersion] the runtime version of the Data Lake * Analytics engine to use for the specific type of job being run. * @member {string} script the script to run. Please note that the maximum * script size is 3 MB. * @member {string} type Polymorphic Discriminator */ export interface CreateJobProperties { runtimeVersion?: string; script: string; type: string; } /** * @class * Initializes a new instance of the CreateUSqlJobProperties class. * @constructor * U-SQL job properties used when submitting U-SQL jobs. * * @member {string} [compileMode] the specific compilation mode for the job * used during execution. If this is not specified during submission, the * server will determine the optimal compilation mode. Possible values include: * 'Semantic', 'Full', 'SingleBox' */ export interface CreateUSqlJobProperties extends CreateJobProperties { compileMode?: string; } /** * @class * Initializes a new instance of the JobInnerError class. * @constructor * The Data Lake Analytics job error details. * * @member {number} [diagnosticCode] the diagnostic error code. * @member {string} [severity] the severity level of the failure. Possible * values include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', * 'UserWarning' * @member {string} [details] the details of the error message. * @member {string} [component] the component that failed. * @member {string} [errorId] the specific identifier for the type of error * encountered in the job. * @member {string} [helpLink] the link to MSDN or Azure help for this type of * error, if any. * @member {string} [internalDiagnostics] the internal diagnostic stack trace * if the user requesting the job error details has sufficient permissions it * will be retrieved, otherwise it will be empty. * @member {string} [message] the user friendly error message for the failure. * @member {string} [resolution] the recommended resolution for the failure, if * any. * @member {string} [source] the ultimate source of the failure (usually either * SYSTEM or USER). * @member {string} [description] the error message description * @member {object} [innerError] the inner error of this specific job error * message, if any. */ export interface JobInnerError { readonly diagnosticCode?: number; readonly severity?: string; readonly details?: string; readonly component?: string; readonly errorId?: string; readonly helpLink?: string; readonly internalDiagnostics?: string; readonly message?: string; readonly resolution?: string; readonly source?: string; readonly description?: string; readonly innerError?: JobInnerError; } /** * @class * Initializes a new instance of the JobErrorDetails class. * @constructor * The Data Lake Analytics job error details. * * @member {string} [description] the error message description * @member {string} [details] the details of the error message. * @member {number} [endOffset] the end offset in the job where the error was * found. * @member {string} [errorId] the specific identifier for the type of error * encountered in the job. * @member {string} [filePath] the path to any supplemental error files, if * any. * @member {string} [helpLink] the link to MSDN or Azure help for this type of * error, if any. * @member {string} [internalDiagnostics] the internal diagnostic stack trace * if the user requesting the job error details has sufficient permissions it * will be retrieved, otherwise it will be empty. * @member {number} [lineNumber] the specific line number in the job where the * error occured. * @member {string} [message] the user friendly error message for the failure. * @member {string} [resolution] the recommended resolution for the failure, if * any. * @member {object} [innerError] the inner error of this specific job error * message, if any. * @member {number} [innerError.diagnosticCode] the diagnostic error code. * @member {string} [innerError.severity] the severity level of the failure. * Possible values include: 'Warning', 'Error', 'Info', 'SevereWarning', * 'Deprecated', 'UserWarning' * @member {string} [innerError.details] the details of the error message. * @member {string} [innerError.component] the component that failed. * @member {string} [innerError.errorId] the specific identifier for the type * of error encountered in the job. * @member {string} [innerError.helpLink] the link to MSDN or Azure help for * this type of error, if any. * @member {string} [innerError.internalDiagnostics] the internal diagnostic * stack trace if the user requesting the job error details has sufficient * permissions it will be retrieved, otherwise it will be empty. * @member {string} [innerError.message] the user friendly error message for * the failure. * @member {string} [innerError.resolution] the recommended resolution for the * failure, if any. * @member {string} [innerError.source] the ultimate source of the failure * (usually either SYSTEM or USER). * @member {string} [innerError.description] the error message description * @member {object} [innerError.innerError] the inner error of this specific * job error message, if any. * @member {string} [severity] the severity level of the failure. Possible * values include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', * 'UserWarning' * @member {string} [source] the ultimate source of the failure (usually either * SYSTEM or USER). * @member {number} [startOffset] the start offset in the job where the error * was found */ export interface JobErrorDetails { readonly description?: string; readonly details?: string; readonly endOffset?: number; readonly errorId?: string; readonly filePath?: string; readonly helpLink?: string; readonly internalDiagnostics?: string; readonly lineNumber?: number; readonly message?: string; readonly resolution?: string; readonly innerError?: JobInnerError; readonly severity?: string; readonly source?: string; readonly startOffset?: number; } /** * @class * Initializes a new instance of the JobRelationshipProperties class. * @constructor * Job relationship information properties including pipeline information, * correlation information, etc. * * @member {uuid} [pipelineId] the job relationship pipeline identifier (a * GUID). * @member {string} [pipelineName] the friendly name of the job relationship * pipeline, which does not need to be unique. * @member {string} [pipelineUri] the pipeline uri, unique, links to the * originating service for this pipeline. * @member {uuid} [runId] the run identifier (a GUID), unique identifier of the * iteration of this pipeline. * @member {uuid} recurrenceId the recurrence identifier (a GUID), unique per * activity/script, regardless of iterations. This is something to link * different occurrences of the same job together. * @member {string} [recurrenceName] the recurrence name, user friendly name * for the correlation between jobs. */ export interface JobRelationshipProperties { pipelineId?: string; pipelineName?: string; pipelineUri?: string; runId?: string; recurrenceId: string; recurrenceName?: string; } /** * @class * Initializes a new instance of the JobPipelineRunInformation class. * @constructor * Run info for a specific job pipeline. * * @member {uuid} [runId] the run identifier of an instance of pipeline * executions (a GUID). * @member {date} [lastSubmitTime] the time this instance was last submitted. */ export interface JobPipelineRunInformation { readonly runId?: string; readonly lastSubmitTime?: Date; } /** * @class * Initializes a new instance of the JobPipelineInformation class. * @constructor * Job Pipeline Information, showing the relationship of jobs and recurrences * of those jobs in a pipeline. * * @member {uuid} [pipelineId] the job relationship pipeline identifier (a * GUID). * @member {string} [pipelineName] the friendly name of the job relationship * pipeline, which does not need to be unique. * @member {string} [pipelineUri] the pipeline uri, unique, links to the * originating service for this pipeline. * @member {number} [numJobsFailed] the number of jobs in this pipeline that * have failed. * @member {number} [numJobsCanceled] the number of jobs in this pipeline that * have been canceled. * @member {number} [numJobsSucceeded] the number of jobs in this pipeline that * have succeeded. * @member {number} [auHoursFailed] the number of job execution hours that * resulted in failed jobs. * @member {number} [auHoursCanceled] the number of job execution hours that * resulted in canceled jobs. * @member {number} [auHoursSucceeded] the number of job execution hours that * resulted in successful jobs. * @member {date} [lastSubmitTime] the last time a job in this pipeline was * submitted. * @member {array} [runs] the list of recurrence identifiers representing each * run of this pipeline. * @member {array} [recurrences] the list of recurrence identifiers * representing each run of this pipeline. */ export interface JobPipelineInformation { readonly pipelineId?: string; readonly pipelineName?: string; readonly pipelineUri?: string; readonly numJobsFailed?: number; readonly numJobsCanceled?: number; readonly numJobsSucceeded?: number; readonly auHoursFailed?: number; readonly auHoursCanceled?: number; readonly auHoursSucceeded?: number; readonly lastSubmitTime?: Date; readonly runs?: JobPipelineRunInformation[]; readonly recurrences?: string[]; } /** * @class * Initializes a new instance of the JobRecurrenceInformation class. * @constructor * Recurrence job information for a specific recurrence. * * @member {uuid} [recurrenceId] the recurrence identifier (a GUID), unique per * activity/script, regardless of iterations. This is something to link * different occurrences of the same job together. * @member {string} [recurrenceName] the recurrence name, user friendly name * for the correlation between jobs. * @member {number} [numJobsFailed] the number of jobs in this recurrence that * have failed. * @member {number} [numJobsCanceled] the number of jobs in this recurrence * that have been canceled. * @member {number} [numJobsSucceeded] the number of jobs in this recurrence * that have succeeded. * @member {number} [auHoursFailed] the number of job execution hours that * resulted in failed jobs. * @member {number} [auHoursCanceled] the number of job execution hours that * resulted in canceled jobs. * @member {number} [auHoursSucceeded] the number of job execution hours that * resulted in successful jobs. * @member {date} [lastSubmitTime] the last time a job in this recurrence was * submitted. */ export interface JobRecurrenceInformation { readonly recurrenceId?: string; readonly recurrenceName?: string; readonly numJobsFailed?: number; readonly numJobsCanceled?: number; readonly numJobsSucceeded?: number; readonly auHoursFailed?: number; readonly auHoursCanceled?: number; readonly auHoursSucceeded?: number; readonly lastSubmitTime?: Date; } /** * @class * Initializes a new instance of the BaseJobParameters class. * @constructor * Data Lake Analytics Job Parameters base class for build and submit. * * @member {string} type the job type of the current job (Hive or USql). * Possible values include: 'USql', 'Hive' * @member {object} properties the job specific properties. * @member {string} [properties.runtimeVersion] the runtime version of the Data * Lake Analytics engine to use for the specific type of job being run. * @member {string} [properties.script] the script to run. Please note that the * maximum script size is 3 MB. * @member {string} [properties.type] Polymorphic Discriminator */ export interface BaseJobParameters { type: string; properties: CreateJobProperties; } /** * @class * Initializes a new instance of the CreateJobParameters class. * @constructor * The parameters used to submit a new Data Lake Analytics job. * * @member {string} name the friendly name of the job to submit. * @member {number} [degreeOfParallelism] the degree of parallelism to use for * this job. This must be greater than 0, if set to less than 0 it will default * to 1. Default value: 1 . * @member {number} [priority] the priority value to use for the current job. * Lower numbers have a higher priority. By default, a job has a priority of * 1000. This must be greater than 0. * @member {array} [logFilePatterns] the list of log file name patterns to find * in the logFolder. '*' is the only matching character allowed. Example * format: jobExecution*.log or *mylog*.txt * @member {object} [related] the recurring job relationship information * properties. * @member {uuid} [related.pipelineId] the job relationship pipeline identifier * (a GUID). * @member {string} [related.pipelineName] the friendly name of the job * relationship pipeline, which does not need to be unique. * @member {string} [related.pipelineUri] the pipeline uri, unique, links to * the originating service for this pipeline. * @member {uuid} [related.runId] the run identifier (a GUID), unique * identifier of the iteration of this pipeline. * @member {uuid} [related.recurrenceId] the recurrence identifier (a GUID), * unique per activity/script, regardless of iterations. This is something to * link different occurrences of the same job together. * @member {string} [related.recurrenceName] the recurrence name, user friendly * name for the correlation between jobs. */ export interface CreateJobParameters extends BaseJobParameters { name: string; degreeOfParallelism?: number; priority?: number; logFilePatterns?: string[]; related?: JobRelationshipProperties; } /** * @class * Initializes a new instance of the BuildJobParameters class. * @constructor * The parameters used to build a new Data Lake Analytics job. * * @member {string} [name] the friendly name of the job to build. */ export interface BuildJobParameters extends BaseJobParameters { name?: string; } /** * @class * Initializes a new instance of the JobInformationBasic class. * @constructor * The common Data Lake Analytics job information properties. * * @member {uuid} [jobId] the job's unique identifier (a GUID). * @member {string} name the friendly name of the job. * @member {string} type the job type of the current job (Hive or USql). * Possible values include: 'USql', 'Hive' * @member {string} [submitter] the user or account that submitted the job. * @member {number} [degreeOfParallelism] the degree of parallelism used for * this job. This must be greater than 0, if set to less than 0 it will default * to 1. Default value: 1 . * @member {number} [priority] the priority value for the current job. Lower * numbers have a higher priority. By default, a job has a priority of 1000. * This must be greater than 0. * @member {date} [submitTime] the time the job was submitted to the service. * @member {date} [startTime] the start time of the job. * @member {date} [endTime] the completion time of the job. * @member {string} [state] the job state. When the job is in the Ended state, * refer to Result and ErrorMessage for details. Possible values include: * 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', * 'Starting', 'Paused', 'WaitingForCapacity' * @member {string} [result] the result of job execution or the current result * of the running job. Possible values include: 'None', 'Succeeded', * 'Cancelled', 'Failed' * @member {string} [logFolder] the log folder path to use in the following * format: * adl://<accountName>.azuredatalakestore.net/system/jobservice/jobs/Usql/2016/03/13/17/18/5fe51957-93bc-4de0-8ddc-c5a4753b068b/logs/. * @member {array} [logFilePatterns] the list of log file name patterns to find * in the logFolder. '*' is the only matching character allowed. Example * format: jobExecution*.log or *mylog*.txt * @member {object} [related] the recurring job relationship information * properties. * @member {uuid} [related.pipelineId] the job relationship pipeline identifier * (a GUID). * @member {string} [related.pipelineName] the friendly name of the job * relationship pipeline, which does not need to be unique. * @member {string} [related.pipelineUri] the pipeline uri, unique, links to * the originating service for this pipeline. * @member {uuid} [related.runId] the run identifier (a GUID), unique * identifier of the iteration of this pipeline. * @member {uuid} [related.recurrenceId] the recurrence identifier (a GUID), * unique per activity/script, regardless of iterations. This is something to * link different occurrences of the same job together. * @member {string} [related.recurrenceName] the recurrence name, user friendly * name for the correlation between jobs. */ export interface JobInformationBasic { readonly jobId?: string; name: string; type: string; readonly submitter?: string; degreeOfParallelism?: number; priority?: number; readonly submitTime?: Date; readonly startTime?: Date; readonly endTime?: Date; readonly state?: string; readonly result?: string; readonly logFolder?: string; logFilePatterns?: string[]; related?: JobRelationshipProperties; } /** * @class * Initializes a new instance of the JobInformation class. * @constructor * The extended Data Lake Analytics job information properties returned when * retrieving a specific job. * * @member {array} [errorMessage] the error message details for the job, if the * job failed. * @member {array} [stateAuditRecords] the job state audit records, indicating * when various operations have been performed on this job. * @member {object} properties the job specific properties. * @member {string} [properties.runtimeVersion] the runtime version of the Data * Lake Analytics engine to use for the specific type of job being run. * @member {string} [properties.script] the script to run. Please note that the * maximum script size is 3 MB. * @member {string} [properties.type] Polymorphic Discriminator */ export interface JobInformation extends JobInformationBasic { readonly errorMessage?: JobErrorDetails[]; readonly stateAuditRecords?: JobStateAuditRecord[]; properties: JobProperties; } /** * @class * Initializes a new instance of the JobPipelineInformationListResult class. * @constructor * List of job pipeline information items. * * @member {string} [nextLink] the link (url) to the next page of results. */ export interface JobPipelineInformationListResult extends Array<JobPipelineInformation> { readonly nextLink?: string; } /** * @class * Initializes a new instance of the JobRecurrenceInformationListResult class. * @constructor * List of job recurrence information items. * * @member {string} [nextLink] the link (url) to the next page of results. */ export interface JobRecurrenceInformationListResult extends Array<JobRecurrenceInformation> { readonly nextLink?: string; } /** * @class * Initializes a new instance of the JobInfoListResult class. * @constructor * List of JobInfo items. * * @member {string} [nextLink] the link (url) to the next page of results. */ export interface JobInfoListResult extends Array<JobInformationBasic> { readonly nextLink?: string; }