From 67d0c20ebaa73836a91646e4ee910ed17ba16a73 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 13 Sep 2018 12:41:30 -0700 Subject: [PATCH] Generated from cc3a2ac1934c906c367746bfeac7aa3af341ac40 (#2667) Merge pull request #1 from hosunmsft/add_dop_percent_to_ADLA_job_api Support degreeOfParallelismPercent in DataLakeAnalytic jobs --- .../analytics/2016-11-01/job/models.go | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/services/datalake/analytics/2016-11-01/job/models.go b/services/datalake/analytics/2016-11-01/job/models.go index 97fd5e965e9d..9dd3f65bbb89 100644 --- a/services/datalake/analytics/2016-11-01/job/models.go +++ b/services/datalake/analytics/2016-11-01/job/models.go @@ -281,8 +281,10 @@ func (bjp *BuildJobParameters) UnmarshalJSON(body []byte) error { type CreateJobParameters struct { // Name - the friendly name of the job to submit. Name *string `json:"name,omitempty"` - // 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. + // DegreeOfParallelism - the degree of parallelism used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used. DegreeOfParallelism *int32 `json:"degreeOfParallelism,omitempty"` + // DegreeOfParallelismPercent - the degree of parallelism in percentage used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used for degreeOfParallelism. + DegreeOfParallelismPercent *float64 `json:"degreeOfParallelismPercent,omitempty"` // 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. Priority *int32 `json:"priority,omitempty"` // 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 @@ -322,6 +324,15 @@ func (cjp *CreateJobParameters) UnmarshalJSON(body []byte) error { } cjp.DegreeOfParallelism = °reeOfParallelism } + case "degreeOfParallelismPercent": + if v != nil { + var degreeOfParallelismPercent float64 + err = json.Unmarshal(*v, °reeOfParallelismPercent) + if err != nil { + return err + } + cjp.DegreeOfParallelismPercent = °reeOfParallelismPercent + } case "priority": if v != nil { var priority int32 @@ -746,8 +757,10 @@ type Information struct { Type TypeEnum `json:"type,omitempty"` // Submitter - the user or account that submitted the job. Submitter *string `json:"submitter,omitempty"` - // 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. + // DegreeOfParallelism - the degree of parallelism used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used. DegreeOfParallelism *int32 `json:"degreeOfParallelism,omitempty"` + // DegreeOfParallelismPercent - the degree of parallelism in percentage used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used for degreeOfParallelism. + DegreeOfParallelismPercent *float64 `json:"degreeOfParallelismPercent,omitempty"` // 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. Priority *int32 `json:"priority,omitempty"` // SubmitTime - the time the job was submitted to the service. @@ -848,6 +861,15 @@ func (i *Information) UnmarshalJSON(body []byte) error { } i.DegreeOfParallelism = °reeOfParallelism } + case "degreeOfParallelismPercent": + if v != nil { + var degreeOfParallelismPercent float64 + err = json.Unmarshal(*v, °reeOfParallelismPercent) + if err != nil { + return err + } + i.DegreeOfParallelismPercent = °reeOfParallelismPercent + } case "priority": if v != nil { var priority int32 @@ -945,8 +967,10 @@ type InformationBasic struct { Type TypeEnum `json:"type,omitempty"` // Submitter - the user or account that submitted the job. Submitter *string `json:"submitter,omitempty"` - // 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. + // DegreeOfParallelism - the degree of parallelism used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used. DegreeOfParallelism *int32 `json:"degreeOfParallelism,omitempty"` + // DegreeOfParallelismPercent - the degree of parallelism in percentage used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used for degreeOfParallelism. + DegreeOfParallelismPercent *float64 `json:"degreeOfParallelismPercent,omitempty"` // 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. Priority *int32 `json:"priority,omitempty"` // SubmitTime - the time the job was submitted to the service.