Support Drain SLA API (#88)

* Bringing thrift API up to date with Aurora 0.21.0.

* Adding support for SLA Drain Host API.
This commit is contained in:
Renan DelValle 2018-11-16 11:41:09 -08:00 committed by GitHub
parent a09a18ea3b
commit 2eaa60f681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 2842 additions and 1323 deletions

View file

@ -115,11 +115,13 @@ struct JobKey {
3: string name 3: string name
} }
// TODO(jly): Deprecated, remove in 0.21. See AURORA-1959.
/** A unique lock key. */ /** A unique lock key. */
union LockKey { union LockKey {
1: JobKey job 1: JobKey job
} }
// TODO(jly): Deprecated, remove in 0.21. See AURORA-1959.
/** A generic lock struct to facilitate context specific resource/operation serialization. */ /** A generic lock struct to facilitate context specific resource/operation serialization. */
struct Lock { struct Lock {
/** ID of the lock - unique per storage */ /** ID of the lock - unique per storage */
@ -238,6 +240,42 @@ union Resource {
5: i64 numGpus 5: i64 numGpus
} }
struct PartitionPolicy {
1: bool reschedule
2: optional i64 delaySecs
}
/** SLA requirements expressed as the percentage of instances to be RUNNING every durationSecs */
struct PercentageSlaPolicy {
/* The percentage of active instances required every `durationSecs`. */
1: double percentage
/** Minimum time duration a task needs to be `RUNNING` to be treated as active */
2: i64 durationSecs
}
/** SLA requirements expressed as the number of instances to be RUNNING every durationSecs */
struct CountSlaPolicy {
/** The number of active instances required every `durationSecs` */
1: i64 count
/** Minimum time duration a task needs to be `RUNNING` to be treated as active */
2: i64 durationSecs
}
/** SLA requirements to be delegated to an external coordinator */
struct CoordinatorSlaPolicy {
/** URL for the coordinator service that needs to be contacted for SLA checks */
1: string coordinatorUrl
/** Field in the Coordinator response json indicating if the action is allowed or not */
2: string statusKey
}
/** SLA requirements expressed in one of the many types */
union SlaPolicy {
1: PercentageSlaPolicy percentageSlaPolicy
2: CountSlaPolicy countSlaPolicy
3: CoordinatorSlaPolicy coordinatorSlaPolicy
}
/** Description of the tasks contained within a job. */ /** Description of the tasks contained within a job. */
struct TaskConfig { struct TaskConfig {
/** Job task belongs to. */ /** Job task belongs to. */
@ -246,12 +284,6 @@ struct TaskConfig {
/** contains the role component of JobKey */ /** contains the role component of JobKey */
17: Identity owner 17: Identity owner
7: bool isService 7: bool isService
// TODO(maxim): Deprecated. See AURORA-1707.
8: double numCpus
// TODO(maxim): Deprecated. See AURORA-1707.
9: i64 ramMb
// TODO(maxim): Deprecated. See AURORA-1707.
10: i64 diskMb
11: i32 priority 11: i32 priority
13: i32 maxTaskFailures 13: i32 maxTaskFailures
// TODO(mnurolahzade): Deprecated. See AURORA-1708. // TODO(mnurolahzade): Deprecated. See AURORA-1708.
@ -263,8 +295,6 @@ struct TaskConfig {
32: set<Resource> resources 32: set<Resource> resources
20: set<Constraint> constraints 20: set<Constraint> constraints
/** a list of named ports this task requests */
21: set<string> requestedPorts
/** Resources to retrieve with Mesos Fetcher */ /** Resources to retrieve with Mesos Fetcher */
33: optional set<MesosFetcherURI> mesosFetcherUris 33: optional set<MesosFetcherURI> mesosFetcherUris
/** /**
@ -278,6 +308,10 @@ struct TaskConfig {
25: optional ExecutorConfig executorConfig 25: optional ExecutorConfig executorConfig
/** Used to display additional details in the UI. */ /** Used to display additional details in the UI. */
27: optional set<Metadata> metadata 27: optional set<Metadata> metadata
/** Policy for how to deal with task partitions */
34: optional PartitionPolicy partitionPolicy
/** SLA requirements to be met during maintenance */
35: optional SlaPolicy slaPolicy
// This field is deliberately placed at the end to work around a bug in the immutable wrapper // This field is deliberately placed at the end to work around a bug in the immutable wrapper
// code generator. See AURORA-1185 for details. // code generator. See AURORA-1185 for details.
@ -286,15 +320,6 @@ struct TaskConfig {
} }
struct ResourceAggregate { struct ResourceAggregate {
// TODO(maxim): Deprecated. See AURORA-1707.
/** Number of CPU cores allotted. */
1: double numCpus
// TODO(maxim): Deprecated. See AURORA-1707.
/** Megabytes of RAM allotted. */
2: i64 ramMb
// TODO(maxim): Deprecated. See AURORA-1707.
/** Megabytes of disk space allotted. */
3: i64 diskMb
/** Aggregated resource values. */ /** Aggregated resource values. */
4: set<Resource> resources 4: set<Resource> resources
} }
@ -422,7 +447,11 @@ enum ScheduleStatus {
/** A fault in the task environment has caused the system to believe the task no longer exists. /** A fault in the task environment has caused the system to believe the task no longer exists.
* This can happen, for example, when a slave process disappears. * This can happen, for example, when a slave process disappears.
*/ */
LOST = 7 LOST = 7,
/**
* The task is currently partitioned and in an unknown state.
**/
PARTITIONED = 18
} }
// States that a task may be in while still considered active. // States that a task may be in while still considered active.
@ -434,6 +463,7 @@ const set<ScheduleStatus> ACTIVE_STATES = [ScheduleStatus.ASSIGNED,
ScheduleStatus.RESTARTING ScheduleStatus.RESTARTING
ScheduleStatus.RUNNING, ScheduleStatus.RUNNING,
ScheduleStatus.STARTING, ScheduleStatus.STARTING,
ScheduleStatus.PARTITIONED,
ScheduleStatus.THROTTLED] ScheduleStatus.THROTTLED]
// States that a task may be in while associated with a slave machine and non-terminal. // States that a task may be in while associated with a slave machine and non-terminal.
@ -443,6 +473,7 @@ const set<ScheduleStatus> SLAVE_ASSIGNED_STATES = [ScheduleStatus.ASSIGNED,
ScheduleStatus.PREEMPTING, ScheduleStatus.PREEMPTING,
ScheduleStatus.RESTARTING, ScheduleStatus.RESTARTING,
ScheduleStatus.RUNNING, ScheduleStatus.RUNNING,
ScheduleStatus.PARTITIONED,
ScheduleStatus.STARTING] ScheduleStatus.STARTING]
// States that a task may be in while in an active sandbox. // States that a task may be in while in an active sandbox.
@ -450,6 +481,7 @@ const set<ScheduleStatus> LIVE_STATES = [ScheduleStatus.KILLING,
ScheduleStatus.PREEMPTING, ScheduleStatus.PREEMPTING,
ScheduleStatus.RESTARTING, ScheduleStatus.RESTARTING,
ScheduleStatus.DRAINING, ScheduleStatus.DRAINING,
ScheduleStatus.PARTITIONED,
ScheduleStatus.RUNNING] ScheduleStatus.RUNNING]
// States a completed task may be in. // States a completed task may be in.
@ -518,6 +550,11 @@ struct ScheduledTask {
* this task. * this task.
*/ */
3: i32 failureCount 3: i32 failureCount
/**
* The number of partitions this task has accumulated over its lifetime.
*/
6: i32 timesPartitioned
/** State change history for this task. */ /** State change history for this task. */
4: list<TaskEvent> taskEvents 4: list<TaskEvent> taskEvents
/** /**
@ -619,7 +656,6 @@ const set<JobUpdateStatus> ACTIVE_JOB_UPDATE_STATES = [JobUpdateStatus.ROLLING_F
JobUpdateStatus.ROLL_BACK_PAUSED, JobUpdateStatus.ROLL_BACK_PAUSED,
JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE, JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE,
JobUpdateStatus.ROLL_BACK_AWAITING_PULSE] JobUpdateStatus.ROLL_BACK_AWAITING_PULSE]
/** States the job update can be in while waiting for a pulse. */ /** States the job update can be in while waiting for a pulse. */
const set<JobUpdateStatus> AWAITNG_PULSE_JOB_UPDATE_STATES = [JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE, const set<JobUpdateStatus> AWAITNG_PULSE_JOB_UPDATE_STATES = [JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE,
JobUpdateStatus.ROLL_BACK_AWAITING_PULSE] JobUpdateStatus.ROLL_BACK_AWAITING_PULSE]
@ -706,13 +742,19 @@ struct JobUpdateSettings {
*/ */
8: bool waitForBatchCompletion 8: bool waitForBatchCompletion
/** /**
* If set, requires external calls to pulseJobUpdate RPC within the specified rate for the * If set, requires external calls to pulseJobUpdate RPC within the specified rate for the
* update to make progress. If no pulses received within specified interval the update will * update to make progress. If no pulses received within specified interval the update will
* block. A blocked update is unable to continue but retains its current status. It may only get * block. A blocked update is unable to continue but retains its current status. It may only get
* unblocked by a fresh pulseJobUpdate call. * unblocked by a fresh pulseJobUpdate call.
*/ */
9: optional i32 blockIfNoPulsesAfterMs 9: optional i32 blockIfNoPulsesAfterMs
/**
* If true, updates will obey the SLA requirements of the tasks being updated. If the SLA policy
* differs between the old and new task configurations, updates will use the newest configuration.
*/
10: optional bool slaAware
} }
/** Event marking a state transition in job update lifecycle. */ /** Event marking a state transition in job update lifecycle. */
@ -743,6 +785,9 @@ struct JobInstanceUpdateEvent {
/** Job update action taken on the instance. */ /** Job update action taken on the instance. */
3: JobUpdateAction action 3: JobUpdateAction action
/** Optional message explaining the instance update event. */
4: optional string message
} }
/** Maps instance IDs to TaskConfigs it. */ /** Maps instance IDs to TaskConfigs it. */
@ -855,6 +900,13 @@ struct JobUpdateQuery {
7: i32 limit 7: i32 limit
} }
struct HostMaintenanceRequest {
1: string host
2: SlaPolicy defaultSlaPolicy
3: i64 timeoutSecs
4: i64 createdTimestampMs
}
struct ListBackupsResult { struct ListBackupsResult {
1: set<string> backups 1: set<string> backups
} }
@ -1039,7 +1091,6 @@ service ReadOnlyScheduler {
Response getJobUpdateSummaries(1: JobUpdateQuery jobUpdateQuery) Response getJobUpdateSummaries(1: JobUpdateQuery jobUpdateQuery)
/** Gets job update details. */ /** Gets job update details. */
// TODO(zmanji): `key` is deprecated, remove this with AURORA-1765
Response getJobUpdateDetails(2: JobUpdateQuery query) Response getJobUpdateDetails(2: JobUpdateQuery query)
/** Gets the diff between client (desired) and server (current) job states. */ /** Gets the diff between client (desired) and server (current) job states. */
@ -1192,6 +1243,12 @@ service AuroraAdmin extends AuroraSchedulerManager {
/** Set the given hosts back into serving mode. */ /** Set the given hosts back into serving mode. */
Response endMaintenance(1: Hosts hosts) Response endMaintenance(1: Hosts hosts)
/**
* Ask scheduler to put hosts into DRAINING mode and move scheduled tasks off of the hosts
* such that its SLA requirements are satisfied. Use defaultSlaPolicy if it is not set for a task.
**/
Response slaDrainHosts(1: Hosts hosts, 2: SlaPolicy defaultSlaPolicy, 3: i64 timeoutSecs)
/** Start a storage snapshot and block until it completes. */ /** Start a storage snapshot and block until it completes. */
Response snapshot() Response snapshot()

View file

@ -554,6 +554,37 @@ func main() {
fmt.Print(result.String()) fmt.Print(result.String())
case "SLADrainHosts":
fmt.Println("Setting hosts to DRAINING using SLA aware draining")
if hostList == "" {
log.Fatal("No hosts specified to drain")
}
hosts := strings.Split(hostList, ",")
policy := aurora.SlaPolicy{PercentageSlaPolicy: &aurora.PercentageSlaPolicy{Percentage: 50.0}}
result, err := r.SLADrainHosts(&policy, 30, hosts...)
if err != nil {
log.Fatalf("error: %+v\n", err.Error())
}
// Monitor change to DRAINING and DRAINED mode
hostResult, err := monitor.HostMaintenance(
hosts,
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
5,
10)
if err != nil {
for host, ok := range hostResult {
if !ok {
fmt.Printf("Host %s did not transtion into desired mode(s)\n", host)
}
}
log.Fatalf("error: %+v\n", err.Error())
}
fmt.Print(result.String())
case "endMaintenance": case "endMaintenance":
fmt.Println("Setting hosts to ACTIVE") fmt.Println("Setting hosts to ACTIVE")
if hostList == "" { if hostList == "" {

View file

@ -146,19 +146,19 @@ func main() {
fmt.Fprintln(os.Stderr, "CreateJob requires 1 args") fmt.Fprintln(os.Stderr, "CreateJob requires 1 args")
flag.Usage() flag.Usage()
} }
arg163 := flag.Arg(1) arg162 := flag.Arg(1)
mbTrans164 := thrift.NewTMemoryBufferLen(len(arg163)) mbTrans163 := thrift.NewTMemoryBufferLen(len(arg162))
defer mbTrans164.Close() defer mbTrans163.Close()
_, err165 := mbTrans164.WriteString(arg163) _, err164 := mbTrans163.WriteString(arg162)
if err165 != nil { if err164 != nil {
Usage() Usage()
return return
} }
factory166 := thrift.NewTSimpleJSONProtocolFactory() factory165 := thrift.NewTSimpleJSONProtocolFactory()
jsProt167 := factory166.GetProtocol(mbTrans164) jsProt166 := factory165.GetProtocol(mbTrans163)
argvalue0 := aurora.NewJobConfiguration() argvalue0 := aurora.NewJobConfiguration()
err168 := argvalue0.Read(jsProt167) err167 := argvalue0.Read(jsProt166)
if err168 != nil { if err167 != nil {
Usage() Usage()
return return
} }
@ -171,19 +171,19 @@ func main() {
fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args") fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args")
flag.Usage() flag.Usage()
} }
arg169 := flag.Arg(1) arg168 := flag.Arg(1)
mbTrans170 := thrift.NewTMemoryBufferLen(len(arg169)) mbTrans169 := thrift.NewTMemoryBufferLen(len(arg168))
defer mbTrans170.Close() defer mbTrans169.Close()
_, err171 := mbTrans170.WriteString(arg169) _, err170 := mbTrans169.WriteString(arg168)
if err171 != nil { if err170 != nil {
Usage() Usage()
return return
} }
factory172 := thrift.NewTSimpleJSONProtocolFactory() factory171 := thrift.NewTSimpleJSONProtocolFactory()
jsProt173 := factory172.GetProtocol(mbTrans170) jsProt172 := factory171.GetProtocol(mbTrans169)
argvalue0 := aurora.NewJobConfiguration() argvalue0 := aurora.NewJobConfiguration()
err174 := argvalue0.Read(jsProt173) err173 := argvalue0.Read(jsProt172)
if err174 != nil { if err173 != nil {
Usage() Usage()
return return
} }
@ -196,19 +196,19 @@ func main() {
fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args") fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args")
flag.Usage() flag.Usage()
} }
arg175 := flag.Arg(1) arg174 := flag.Arg(1)
mbTrans176 := thrift.NewTMemoryBufferLen(len(arg175)) mbTrans175 := thrift.NewTMemoryBufferLen(len(arg174))
defer mbTrans176.Close() defer mbTrans175.Close()
_, err177 := mbTrans176.WriteString(arg175) _, err176 := mbTrans175.WriteString(arg174)
if err177 != nil { if err176 != nil {
Usage() Usage()
return return
} }
factory178 := thrift.NewTSimpleJSONProtocolFactory() factory177 := thrift.NewTSimpleJSONProtocolFactory()
jsProt179 := factory178.GetProtocol(mbTrans176) jsProt178 := factory177.GetProtocol(mbTrans175)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err180 := argvalue0.Read(jsProt179) err179 := argvalue0.Read(jsProt178)
if err180 != nil { if err179 != nil {
Usage() Usage()
return return
} }
@ -221,19 +221,19 @@ func main() {
fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args") fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args")
flag.Usage() flag.Usage()
} }
arg181 := flag.Arg(1) arg180 := flag.Arg(1)
mbTrans182 := thrift.NewTMemoryBufferLen(len(arg181)) mbTrans181 := thrift.NewTMemoryBufferLen(len(arg180))
defer mbTrans182.Close() defer mbTrans181.Close()
_, err183 := mbTrans182.WriteString(arg181) _, err182 := mbTrans181.WriteString(arg180)
if err183 != nil { if err182 != nil {
Usage() Usage()
return return
} }
factory184 := thrift.NewTSimpleJSONProtocolFactory() factory183 := thrift.NewTSimpleJSONProtocolFactory()
jsProt185 := factory184.GetProtocol(mbTrans182) jsProt184 := factory183.GetProtocol(mbTrans181)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err186 := argvalue0.Read(jsProt185) err185 := argvalue0.Read(jsProt184)
if err186 != nil { if err185 != nil {
Usage() Usage()
return return
} }
@ -246,36 +246,36 @@ func main() {
fmt.Fprintln(os.Stderr, "RestartShards requires 2 args") fmt.Fprintln(os.Stderr, "RestartShards requires 2 args")
flag.Usage() flag.Usage()
} }
arg187 := flag.Arg(1) arg186 := flag.Arg(1)
mbTrans188 := thrift.NewTMemoryBufferLen(len(arg187)) mbTrans187 := thrift.NewTMemoryBufferLen(len(arg186))
defer mbTrans188.Close() defer mbTrans187.Close()
_, err189 := mbTrans188.WriteString(arg187) _, err188 := mbTrans187.WriteString(arg186)
if err189 != nil { if err188 != nil {
Usage() Usage()
return return
} }
factory190 := thrift.NewTSimpleJSONProtocolFactory() factory189 := thrift.NewTSimpleJSONProtocolFactory()
jsProt191 := factory190.GetProtocol(mbTrans188) jsProt190 := factory189.GetProtocol(mbTrans187)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err192 := argvalue0.Read(jsProt191) err191 := argvalue0.Read(jsProt190)
if err192 != nil { if err191 != nil {
Usage() Usage()
return return
} }
value0 := argvalue0 value0 := argvalue0
arg193 := flag.Arg(2) arg192 := flag.Arg(2)
mbTrans194 := thrift.NewTMemoryBufferLen(len(arg193)) mbTrans193 := thrift.NewTMemoryBufferLen(len(arg192))
defer mbTrans194.Close() defer mbTrans193.Close()
_, err195 := mbTrans194.WriteString(arg193) _, err194 := mbTrans193.WriteString(arg192)
if err195 != nil { if err194 != nil {
Usage() Usage()
return return
} }
factory196 := thrift.NewTSimpleJSONProtocolFactory() factory195 := thrift.NewTSimpleJSONProtocolFactory()
jsProt197 := factory196.GetProtocol(mbTrans194) jsProt196 := factory195.GetProtocol(mbTrans193)
containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs() containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs()
err198 := containerStruct1.ReadField2(jsProt197) err197 := containerStruct1.ReadField2(jsProt196)
if err198 != nil { if err197 != nil {
Usage() Usage()
return return
} }
@ -289,36 +289,36 @@ func main() {
fmt.Fprintln(os.Stderr, "KillTasks requires 3 args") fmt.Fprintln(os.Stderr, "KillTasks requires 3 args")
flag.Usage() flag.Usage()
} }
arg199 := flag.Arg(1) arg198 := flag.Arg(1)
mbTrans200 := thrift.NewTMemoryBufferLen(len(arg199)) mbTrans199 := thrift.NewTMemoryBufferLen(len(arg198))
defer mbTrans200.Close() defer mbTrans199.Close()
_, err201 := mbTrans200.WriteString(arg199) _, err200 := mbTrans199.WriteString(arg198)
if err201 != nil { if err200 != nil {
Usage() Usage()
return return
} }
factory202 := thrift.NewTSimpleJSONProtocolFactory() factory201 := thrift.NewTSimpleJSONProtocolFactory()
jsProt203 := factory202.GetProtocol(mbTrans200) jsProt202 := factory201.GetProtocol(mbTrans199)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err204 := argvalue0.Read(jsProt203) err203 := argvalue0.Read(jsProt202)
if err204 != nil { if err203 != nil {
Usage() Usage()
return return
} }
value0 := argvalue0 value0 := argvalue0
arg205 := flag.Arg(2) arg204 := flag.Arg(2)
mbTrans206 := thrift.NewTMemoryBufferLen(len(arg205)) mbTrans205 := thrift.NewTMemoryBufferLen(len(arg204))
defer mbTrans206.Close() defer mbTrans205.Close()
_, err207 := mbTrans206.WriteString(arg205) _, err206 := mbTrans205.WriteString(arg204)
if err207 != nil { if err206 != nil {
Usage() Usage()
return return
} }
factory208 := thrift.NewTSimpleJSONProtocolFactory() factory207 := thrift.NewTSimpleJSONProtocolFactory()
jsProt209 := factory208.GetProtocol(mbTrans206) jsProt208 := factory207.GetProtocol(mbTrans205)
containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs() containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs()
err210 := containerStruct1.ReadField2(jsProt209) err209 := containerStruct1.ReadField2(jsProt208)
if err210 != nil { if err209 != nil {
Usage() Usage()
return return
} }
@ -334,25 +334,25 @@ func main() {
fmt.Fprintln(os.Stderr, "AddInstances requires 2 args") fmt.Fprintln(os.Stderr, "AddInstances requires 2 args")
flag.Usage() flag.Usage()
} }
arg212 := flag.Arg(1) arg211 := flag.Arg(1)
mbTrans213 := thrift.NewTMemoryBufferLen(len(arg212)) mbTrans212 := thrift.NewTMemoryBufferLen(len(arg211))
defer mbTrans213.Close() defer mbTrans212.Close()
_, err214 := mbTrans213.WriteString(arg212) _, err213 := mbTrans212.WriteString(arg211)
if err214 != nil { if err213 != nil {
Usage() Usage()
return return
} }
factory215 := thrift.NewTSimpleJSONProtocolFactory() factory214 := thrift.NewTSimpleJSONProtocolFactory()
jsProt216 := factory215.GetProtocol(mbTrans213) jsProt215 := factory214.GetProtocol(mbTrans212)
argvalue0 := aurora.NewInstanceKey() argvalue0 := aurora.NewInstanceKey()
err217 := argvalue0.Read(jsProt216) err216 := argvalue0.Read(jsProt215)
if err217 != nil { if err216 != nil {
Usage() Usage()
return return
} }
value0 := argvalue0 value0 := argvalue0
tmp1, err218 := (strconv.Atoi(flag.Arg(2))) tmp1, err217 := (strconv.Atoi(flag.Arg(2)))
if err218 != nil { if err217 != nil {
Usage() Usage()
return return
} }
@ -366,19 +366,19 @@ func main() {
fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args") fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args")
flag.Usage() flag.Usage()
} }
arg219 := flag.Arg(1) arg218 := flag.Arg(1)
mbTrans220 := thrift.NewTMemoryBufferLen(len(arg219)) mbTrans219 := thrift.NewTMemoryBufferLen(len(arg218))
defer mbTrans220.Close() defer mbTrans219.Close()
_, err221 := mbTrans220.WriteString(arg219) _, err220 := mbTrans219.WriteString(arg218)
if err221 != nil { if err220 != nil {
Usage() Usage()
return return
} }
factory222 := thrift.NewTSimpleJSONProtocolFactory() factory221 := thrift.NewTSimpleJSONProtocolFactory()
jsProt223 := factory222.GetProtocol(mbTrans220) jsProt222 := factory221.GetProtocol(mbTrans219)
argvalue0 := aurora.NewJobConfiguration() argvalue0 := aurora.NewJobConfiguration()
err224 := argvalue0.Read(jsProt223) err223 := argvalue0.Read(jsProt222)
if err224 != nil { if err223 != nil {
Usage() Usage()
return return
} }
@ -391,19 +391,19 @@ func main() {
fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args") fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args")
flag.Usage() flag.Usage()
} }
arg225 := flag.Arg(1) arg224 := flag.Arg(1)
mbTrans226 := thrift.NewTMemoryBufferLen(len(arg225)) mbTrans225 := thrift.NewTMemoryBufferLen(len(arg224))
defer mbTrans226.Close() defer mbTrans225.Close()
_, err227 := mbTrans226.WriteString(arg225) _, err226 := mbTrans225.WriteString(arg224)
if err227 != nil { if err226 != nil {
Usage() Usage()
return return
} }
factory228 := thrift.NewTSimpleJSONProtocolFactory() factory227 := thrift.NewTSimpleJSONProtocolFactory()
jsProt229 := factory228.GetProtocol(mbTrans226) jsProt228 := factory227.GetProtocol(mbTrans225)
argvalue0 := aurora.NewJobUpdateRequest() argvalue0 := aurora.NewJobUpdateRequest()
err230 := argvalue0.Read(jsProt229) err229 := argvalue0.Read(jsProt228)
if err230 != nil { if err229 != nil {
Usage() Usage()
return return
} }
@ -418,19 +418,19 @@ func main() {
fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args") fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args")
flag.Usage() flag.Usage()
} }
arg232 := flag.Arg(1) arg231 := flag.Arg(1)
mbTrans233 := thrift.NewTMemoryBufferLen(len(arg232)) mbTrans232 := thrift.NewTMemoryBufferLen(len(arg231))
defer mbTrans233.Close() defer mbTrans232.Close()
_, err234 := mbTrans233.WriteString(arg232) _, err233 := mbTrans232.WriteString(arg231)
if err234 != nil { if err233 != nil {
Usage() Usage()
return return
} }
factory235 := thrift.NewTSimpleJSONProtocolFactory() factory234 := thrift.NewTSimpleJSONProtocolFactory()
jsProt236 := factory235.GetProtocol(mbTrans233) jsProt235 := factory234.GetProtocol(mbTrans232)
argvalue0 := aurora.NewJobUpdateKey() argvalue0 := aurora.NewJobUpdateKey()
err237 := argvalue0.Read(jsProt236) err236 := argvalue0.Read(jsProt235)
if err237 != nil { if err236 != nil {
Usage() Usage()
return return
} }
@ -445,19 +445,19 @@ func main() {
fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args") fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args")
flag.Usage() flag.Usage()
} }
arg239 := flag.Arg(1) arg238 := flag.Arg(1)
mbTrans240 := thrift.NewTMemoryBufferLen(len(arg239)) mbTrans239 := thrift.NewTMemoryBufferLen(len(arg238))
defer mbTrans240.Close() defer mbTrans239.Close()
_, err241 := mbTrans240.WriteString(arg239) _, err240 := mbTrans239.WriteString(arg238)
if err241 != nil { if err240 != nil {
Usage() Usage()
return return
} }
factory242 := thrift.NewTSimpleJSONProtocolFactory() factory241 := thrift.NewTSimpleJSONProtocolFactory()
jsProt243 := factory242.GetProtocol(mbTrans240) jsProt242 := factory241.GetProtocol(mbTrans239)
argvalue0 := aurora.NewJobUpdateKey() argvalue0 := aurora.NewJobUpdateKey()
err244 := argvalue0.Read(jsProt243) err243 := argvalue0.Read(jsProt242)
if err244 != nil { if err243 != nil {
Usage() Usage()
return return
} }
@ -472,19 +472,19 @@ func main() {
fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args") fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args")
flag.Usage() flag.Usage()
} }
arg246 := flag.Arg(1) arg245 := flag.Arg(1)
mbTrans247 := thrift.NewTMemoryBufferLen(len(arg246)) mbTrans246 := thrift.NewTMemoryBufferLen(len(arg245))
defer mbTrans247.Close() defer mbTrans246.Close()
_, err248 := mbTrans247.WriteString(arg246) _, err247 := mbTrans246.WriteString(arg245)
if err248 != nil { if err247 != nil {
Usage() Usage()
return return
} }
factory249 := thrift.NewTSimpleJSONProtocolFactory() factory248 := thrift.NewTSimpleJSONProtocolFactory()
jsProt250 := factory249.GetProtocol(mbTrans247) jsProt249 := factory248.GetProtocol(mbTrans246)
argvalue0 := aurora.NewJobUpdateKey() argvalue0 := aurora.NewJobUpdateKey()
err251 := argvalue0.Read(jsProt250) err250 := argvalue0.Read(jsProt249)
if err251 != nil { if err250 != nil {
Usage() Usage()
return return
} }
@ -499,19 +499,19 @@ func main() {
fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args") fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args")
flag.Usage() flag.Usage()
} }
arg253 := flag.Arg(1) arg252 := flag.Arg(1)
mbTrans254 := thrift.NewTMemoryBufferLen(len(arg253)) mbTrans253 := thrift.NewTMemoryBufferLen(len(arg252))
defer mbTrans254.Close() defer mbTrans253.Close()
_, err255 := mbTrans254.WriteString(arg253) _, err254 := mbTrans253.WriteString(arg252)
if err255 != nil { if err254 != nil {
Usage() Usage()
return return
} }
factory256 := thrift.NewTSimpleJSONProtocolFactory() factory255 := thrift.NewTSimpleJSONProtocolFactory()
jsProt257 := factory256.GetProtocol(mbTrans254) jsProt256 := factory255.GetProtocol(mbTrans253)
argvalue0 := aurora.NewJobUpdateKey() argvalue0 := aurora.NewJobUpdateKey()
err258 := argvalue0.Read(jsProt257) err257 := argvalue0.Read(jsProt256)
if err258 != nil { if err257 != nil {
Usage() Usage()
return return
} }
@ -526,19 +526,19 @@ func main() {
fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args") fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args")
flag.Usage() flag.Usage()
} }
arg260 := flag.Arg(1) arg259 := flag.Arg(1)
mbTrans261 := thrift.NewTMemoryBufferLen(len(arg260)) mbTrans260 := thrift.NewTMemoryBufferLen(len(arg259))
defer mbTrans261.Close() defer mbTrans260.Close()
_, err262 := mbTrans261.WriteString(arg260) _, err261 := mbTrans260.WriteString(arg259)
if err262 != nil { if err261 != nil {
Usage() Usage()
return return
} }
factory263 := thrift.NewTSimpleJSONProtocolFactory() factory262 := thrift.NewTSimpleJSONProtocolFactory()
jsProt264 := factory263.GetProtocol(mbTrans261) jsProt263 := factory262.GetProtocol(mbTrans260)
argvalue0 := aurora.NewJobUpdateKey() argvalue0 := aurora.NewJobUpdateKey()
err265 := argvalue0.Read(jsProt264) err264 := argvalue0.Read(jsProt263)
if err265 != nil { if err264 != nil {
Usage() Usage()
return return
} }
@ -569,19 +569,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args")
flag.Usage() flag.Usage()
} }
arg267 := flag.Arg(1) arg266 := flag.Arg(1)
mbTrans268 := thrift.NewTMemoryBufferLen(len(arg267)) mbTrans267 := thrift.NewTMemoryBufferLen(len(arg266))
defer mbTrans268.Close() defer mbTrans267.Close()
_, err269 := mbTrans268.WriteString(arg267) _, err268 := mbTrans267.WriteString(arg266)
if err269 != nil { if err268 != nil {
Usage() Usage()
return return
} }
factory270 := thrift.NewTSimpleJSONProtocolFactory() factory269 := thrift.NewTSimpleJSONProtocolFactory()
jsProt271 := factory270.GetProtocol(mbTrans268) jsProt270 := factory269.GetProtocol(mbTrans267)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err272 := argvalue0.Read(jsProt271) err271 := argvalue0.Read(jsProt270)
if err272 != nil { if err271 != nil {
Usage() Usage()
return return
} }
@ -594,19 +594,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args")
flag.Usage() flag.Usage()
} }
arg273 := flag.Arg(1) arg272 := flag.Arg(1)
mbTrans274 := thrift.NewTMemoryBufferLen(len(arg273)) mbTrans273 := thrift.NewTMemoryBufferLen(len(arg272))
defer mbTrans274.Close() defer mbTrans273.Close()
_, err275 := mbTrans274.WriteString(arg273) _, err274 := mbTrans273.WriteString(arg272)
if err275 != nil { if err274 != nil {
Usage() Usage()
return return
} }
factory276 := thrift.NewTSimpleJSONProtocolFactory() factory275 := thrift.NewTSimpleJSONProtocolFactory()
jsProt277 := factory276.GetProtocol(mbTrans274) jsProt276 := factory275.GetProtocol(mbTrans273)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err278 := argvalue0.Read(jsProt277) err277 := argvalue0.Read(jsProt276)
if err278 != nil { if err277 != nil {
Usage() Usage()
return return
} }
@ -619,19 +619,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args")
flag.Usage() flag.Usage()
} }
arg279 := flag.Arg(1) arg278 := flag.Arg(1)
mbTrans280 := thrift.NewTMemoryBufferLen(len(arg279)) mbTrans279 := thrift.NewTMemoryBufferLen(len(arg278))
defer mbTrans280.Close() defer mbTrans279.Close()
_, err281 := mbTrans280.WriteString(arg279) _, err280 := mbTrans279.WriteString(arg278)
if err281 != nil { if err280 != nil {
Usage() Usage()
return return
} }
factory282 := thrift.NewTSimpleJSONProtocolFactory() factory281 := thrift.NewTSimpleJSONProtocolFactory()
jsProt283 := factory282.GetProtocol(mbTrans280) jsProt282 := factory281.GetProtocol(mbTrans279)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err284 := argvalue0.Read(jsProt283) err283 := argvalue0.Read(jsProt282)
if err284 != nil { if err283 != nil {
Usage() Usage()
return return
} }
@ -644,19 +644,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args")
flag.Usage() flag.Usage()
} }
arg285 := flag.Arg(1) arg284 := flag.Arg(1)
mbTrans286 := thrift.NewTMemoryBufferLen(len(arg285)) mbTrans285 := thrift.NewTMemoryBufferLen(len(arg284))
defer mbTrans286.Close() defer mbTrans285.Close()
_, err287 := mbTrans286.WriteString(arg285) _, err286 := mbTrans285.WriteString(arg284)
if err287 != nil { if err286 != nil {
Usage() Usage()
return return
} }
factory288 := thrift.NewTSimpleJSONProtocolFactory() factory287 := thrift.NewTSimpleJSONProtocolFactory()
jsProt289 := factory288.GetProtocol(mbTrans286) jsProt288 := factory287.GetProtocol(mbTrans285)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err290 := argvalue0.Read(jsProt289) err289 := argvalue0.Read(jsProt288)
if err290 != nil { if err289 != nil {
Usage() Usage()
return return
} }
@ -689,19 +689,19 @@ func main() {
fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args")
flag.Usage() flag.Usage()
} }
arg293 := flag.Arg(1) arg292 := flag.Arg(1)
mbTrans294 := thrift.NewTMemoryBufferLen(len(arg293)) mbTrans293 := thrift.NewTMemoryBufferLen(len(arg292))
defer mbTrans294.Close() defer mbTrans293.Close()
_, err295 := mbTrans294.WriteString(arg293) _, err294 := mbTrans293.WriteString(arg292)
if err295 != nil { if err294 != nil {
Usage() Usage()
return return
} }
factory296 := thrift.NewTSimpleJSONProtocolFactory() factory295 := thrift.NewTSimpleJSONProtocolFactory()
jsProt297 := factory296.GetProtocol(mbTrans294) jsProt296 := factory295.GetProtocol(mbTrans293)
argvalue0 := aurora.NewJobConfiguration() argvalue0 := aurora.NewJobConfiguration()
err298 := argvalue0.Read(jsProt297) err297 := argvalue0.Read(jsProt296)
if err298 != nil { if err297 != nil {
Usage() Usage()
return return
} }
@ -714,19 +714,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args")
flag.Usage() flag.Usage()
} }
arg299 := flag.Arg(1) arg298 := flag.Arg(1)
mbTrans300 := thrift.NewTMemoryBufferLen(len(arg299)) mbTrans299 := thrift.NewTMemoryBufferLen(len(arg298))
defer mbTrans300.Close() defer mbTrans299.Close()
_, err301 := mbTrans300.WriteString(arg299) _, err300 := mbTrans299.WriteString(arg298)
if err301 != nil { if err300 != nil {
Usage() Usage()
return return
} }
factory302 := thrift.NewTSimpleJSONProtocolFactory() factory301 := thrift.NewTSimpleJSONProtocolFactory()
jsProt303 := factory302.GetProtocol(mbTrans300) jsProt302 := factory301.GetProtocol(mbTrans299)
argvalue0 := aurora.NewJobUpdateQuery() argvalue0 := aurora.NewJobUpdateQuery()
err304 := argvalue0.Read(jsProt303) err303 := argvalue0.Read(jsProt302)
if err304 != nil { if err303 != nil {
Usage() Usage()
return return
} }
@ -739,19 +739,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args")
flag.Usage() flag.Usage()
} }
arg305 := flag.Arg(1) arg304 := flag.Arg(1)
mbTrans306 := thrift.NewTMemoryBufferLen(len(arg305)) mbTrans305 := thrift.NewTMemoryBufferLen(len(arg304))
defer mbTrans306.Close() defer mbTrans305.Close()
_, err307 := mbTrans306.WriteString(arg305) _, err306 := mbTrans305.WriteString(arg304)
if err307 != nil { if err306 != nil {
Usage() Usage()
return return
} }
factory308 := thrift.NewTSimpleJSONProtocolFactory() factory307 := thrift.NewTSimpleJSONProtocolFactory()
jsProt309 := factory308.GetProtocol(mbTrans306) jsProt308 := factory307.GetProtocol(mbTrans305)
argvalue0 := aurora.NewJobUpdateQuery() argvalue0 := aurora.NewJobUpdateQuery()
err310 := argvalue0.Read(jsProt309) err309 := argvalue0.Read(jsProt308)
if err310 != nil { if err309 != nil {
Usage() Usage()
return return
} }
@ -764,19 +764,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args")
flag.Usage() flag.Usage()
} }
arg311 := flag.Arg(1) arg310 := flag.Arg(1)
mbTrans312 := thrift.NewTMemoryBufferLen(len(arg311)) mbTrans311 := thrift.NewTMemoryBufferLen(len(arg310))
defer mbTrans312.Close() defer mbTrans311.Close()
_, err313 := mbTrans312.WriteString(arg311) _, err312 := mbTrans311.WriteString(arg310)
if err313 != nil { if err312 != nil {
Usage() Usage()
return return
} }
factory314 := thrift.NewTSimpleJSONProtocolFactory() factory313 := thrift.NewTSimpleJSONProtocolFactory()
jsProt315 := factory314.GetProtocol(mbTrans312) jsProt314 := factory313.GetProtocol(mbTrans311)
argvalue0 := aurora.NewJobUpdateRequest() argvalue0 := aurora.NewJobUpdateRequest()
err316 := argvalue0.Read(jsProt315) err315 := argvalue0.Read(jsProt314)
if err316 != nil { if err315 != nil {
Usage() Usage()
return return
} }

View file

@ -74,6 +74,15 @@ type AuroraAdmin interface {
// Parameters: // Parameters:
// - Hosts // - Hosts
EndMaintenance(hosts *Hosts) (r *Response, err error) EndMaintenance(hosts *Hosts) (r *Response, err error)
// Ask scheduler to put hosts into DRAINING mode and move scheduled tasks off of the hosts
// such that its SLA requirements are satisfied. Use defaultSlaPolicy if it is not set for a task.
//
//
// Parameters:
// - Hosts
// - DefaultSlaPolicy
// - TimeoutSecs
SlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (r *Response, err error)
// Start a storage snapshot and block until it completes. // Start a storage snapshot and block until it completes.
Snapshot() (r *Response, err error) Snapshot() (r *Response, err error)
// Tell scheduler to trigger an explicit task reconciliation with the given settings. // Tell scheduler to trigger an explicit task reconciliation with the given settings.
@ -158,16 +167,16 @@ func (p *AuroraAdminClient) recvSetQuota() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error317 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error316 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error318 error var error317 error
error318, err = error317.Read(iprot) error317, err = error316.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error318 err = error317
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -241,16 +250,16 @@ func (p *AuroraAdminClient) recvForceTaskState() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error319 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error318 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error320 error var error319 error
error320, err = error319.Read(iprot) error319, err = error318.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error320 err = error319
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -315,16 +324,16 @@ func (p *AuroraAdminClient) recvPerformBackup() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error321 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error320 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error322 error var error321 error
error322, err = error321.Read(iprot) error321, err = error320.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error322 err = error321
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -389,16 +398,16 @@ func (p *AuroraAdminClient) recvListBackups() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error323 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error322 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error324 error var error323 error
error324, err = error323.Read(iprot) error323, err = error322.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error324 err = error323
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -468,16 +477,16 @@ func (p *AuroraAdminClient) recvStageRecovery() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error325 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error324 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error326 error var error325 error
error326, err = error325.Read(iprot) error325, err = error324.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error326 err = error325
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -547,16 +556,16 @@ func (p *AuroraAdminClient) recvQueryRecovery() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error327 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error326 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error328 error var error327 error
error328, err = error327.Read(iprot) error327, err = error326.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error328 err = error327
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -626,16 +635,16 @@ func (p *AuroraAdminClient) recvDeleteRecoveryTasks() (value *Response, err erro
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error329 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error328 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error330 error var error329 error
error330, err = error329.Read(iprot) error329, err = error328.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error330 err = error329
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -700,16 +709,16 @@ func (p *AuroraAdminClient) recvCommitRecovery() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error331 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error330 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error332 error var error331 error
error332, err = error331.Read(iprot) error331, err = error330.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error332 err = error331
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -774,16 +783,16 @@ func (p *AuroraAdminClient) recvUnloadRecovery() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error333 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error332 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error334 error var error333 error
error334, err = error333.Read(iprot) error333, err = error332.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error334 err = error333
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -853,16 +862,16 @@ func (p *AuroraAdminClient) recvStartMaintenance() (value *Response, err error)
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error335 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error334 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error336 error var error335 error
error336, err = error335.Read(iprot) error335, err = error334.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error336 err = error335
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -932,16 +941,16 @@ func (p *AuroraAdminClient) recvDrainHosts() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error337 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error336 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error338 error var error337 error
error338, err = error337.Read(iprot) error337, err = error336.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error338 err = error337
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1011,16 +1020,16 @@ func (p *AuroraAdminClient) recvMaintenanceStatus() (value *Response, err error)
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error339 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error338 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error340 error var error339 error
error340, err = error339.Read(iprot) error339, err = error338.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error340 err = error339
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1090,16 +1099,16 @@ func (p *AuroraAdminClient) recvEndMaintenance() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error341 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error340 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error342 error var error341 error
error342, err = error341.Read(iprot) error341, err = error340.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error342 err = error341
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1117,6 +1126,91 @@ func (p *AuroraAdminClient) recvEndMaintenance() (value *Response, err error) {
return return
} }
// Ask scheduler to put hosts into DRAINING mode and move scheduled tasks off of the hosts
// such that its SLA requirements are satisfied. Use defaultSlaPolicy if it is not set for a task.
//
//
// Parameters:
// - Hosts
// - DefaultSlaPolicy
// - TimeoutSecs
func (p *AuroraAdminClient) SlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (r *Response, err error) {
if err = p.sendSlaDrainHosts(hosts, defaultSlaPolicy, timeoutSecs); err != nil {
return
}
return p.recvSlaDrainHosts()
}
func (p *AuroraAdminClient) sendSlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (err error) {
oprot := p.OutputProtocol
if oprot == nil {
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
p.OutputProtocol = oprot
}
p.SeqId++
if err = oprot.WriteMessageBegin("slaDrainHosts", thrift.CALL, p.SeqId); err != nil {
return
}
args := AuroraAdminSlaDrainHostsArgs{
Hosts: hosts,
DefaultSlaPolicy: defaultSlaPolicy,
TimeoutSecs: timeoutSecs,
}
if err = args.Write(oprot); err != nil {
return
}
if err = oprot.WriteMessageEnd(); err != nil {
return
}
return oprot.Flush()
}
func (p *AuroraAdminClient) recvSlaDrainHosts() (value *Response, err error) {
iprot := p.InputProtocol
if iprot == nil {
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
p.InputProtocol = iprot
}
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
if err != nil {
return
}
if method != "slaDrainHosts" {
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "slaDrainHosts failed: wrong method name")
return
}
if p.SeqId != seqId {
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "slaDrainHosts failed: out of sequence response")
return
}
if mTypeId == thrift.EXCEPTION {
error342 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error343 error
error343, err = error342.Read(iprot)
if err != nil {
return
}
if err = iprot.ReadMessageEnd(); err != nil {
return
}
err = error343
return
}
if mTypeId != thrift.REPLY {
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "slaDrainHosts failed: invalid message type")
return
}
result := AuroraAdminSlaDrainHostsResult{}
if err = result.Read(iprot); err != nil {
return
}
if err = iprot.ReadMessageEnd(); err != nil {
return
}
value = result.GetSuccess()
return
}
// Start a storage snapshot and block until it completes. // Start a storage snapshot and block until it completes.
func (p *AuroraAdminClient) Snapshot() (r *Response, err error) { func (p *AuroraAdminClient) Snapshot() (r *Response, err error) {
if err = p.sendSnapshot(); err != nil { if err = p.sendSnapshot(); err != nil {
@ -1164,16 +1258,16 @@ func (p *AuroraAdminClient) recvSnapshot() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error343 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error344 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error344 error var error345 error
error344, err = error343.Read(iprot) error345, err = error344.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error344 err = error345
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1243,16 +1337,16 @@ func (p *AuroraAdminClient) recvTriggerExplicitTaskReconciliation() (value *Resp
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error345 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error346 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error346 error var error347 error
error346, err = error345.Read(iprot) error347, err = error346.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error346 err = error347
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1317,16 +1411,16 @@ func (p *AuroraAdminClient) recvTriggerImplicitTaskReconciliation() (value *Resp
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error347 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error348 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error348 error var error349 error
error348, err = error347.Read(iprot) error349, err = error348.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error348 err = error349
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1398,16 +1492,16 @@ func (p *AuroraAdminClient) recvPruneTasks() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error349 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error350 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error350 error var error351 error
error350, err = error349.Read(iprot) error351, err = error350.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error350 err = error351
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1430,25 +1524,26 @@ type AuroraAdminProcessor struct {
} }
func NewAuroraAdminProcessor(handler AuroraAdmin) *AuroraAdminProcessor { func NewAuroraAdminProcessor(handler AuroraAdmin) *AuroraAdminProcessor {
self351 := &AuroraAdminProcessor{NewAuroraSchedulerManagerProcessor(handler)} self352 := &AuroraAdminProcessor{NewAuroraSchedulerManagerProcessor(handler)}
self351.AddToProcessorMap("setQuota", &auroraAdminProcessorSetQuota{handler: handler}) self352.AddToProcessorMap("setQuota", &auroraAdminProcessorSetQuota{handler: handler})
self351.AddToProcessorMap("forceTaskState", &auroraAdminProcessorForceTaskState{handler: handler}) self352.AddToProcessorMap("forceTaskState", &auroraAdminProcessorForceTaskState{handler: handler})
self351.AddToProcessorMap("performBackup", &auroraAdminProcessorPerformBackup{handler: handler}) self352.AddToProcessorMap("performBackup", &auroraAdminProcessorPerformBackup{handler: handler})
self351.AddToProcessorMap("listBackups", &auroraAdminProcessorListBackups{handler: handler}) self352.AddToProcessorMap("listBackups", &auroraAdminProcessorListBackups{handler: handler})
self351.AddToProcessorMap("stageRecovery", &auroraAdminProcessorStageRecovery{handler: handler}) self352.AddToProcessorMap("stageRecovery", &auroraAdminProcessorStageRecovery{handler: handler})
self351.AddToProcessorMap("queryRecovery", &auroraAdminProcessorQueryRecovery{handler: handler}) self352.AddToProcessorMap("queryRecovery", &auroraAdminProcessorQueryRecovery{handler: handler})
self351.AddToProcessorMap("deleteRecoveryTasks", &auroraAdminProcessorDeleteRecoveryTasks{handler: handler}) self352.AddToProcessorMap("deleteRecoveryTasks", &auroraAdminProcessorDeleteRecoveryTasks{handler: handler})
self351.AddToProcessorMap("commitRecovery", &auroraAdminProcessorCommitRecovery{handler: handler}) self352.AddToProcessorMap("commitRecovery", &auroraAdminProcessorCommitRecovery{handler: handler})
self351.AddToProcessorMap("unloadRecovery", &auroraAdminProcessorUnloadRecovery{handler: handler}) self352.AddToProcessorMap("unloadRecovery", &auroraAdminProcessorUnloadRecovery{handler: handler})
self351.AddToProcessorMap("startMaintenance", &auroraAdminProcessorStartMaintenance{handler: handler}) self352.AddToProcessorMap("startMaintenance", &auroraAdminProcessorStartMaintenance{handler: handler})
self351.AddToProcessorMap("drainHosts", &auroraAdminProcessorDrainHosts{handler: handler}) self352.AddToProcessorMap("drainHosts", &auroraAdminProcessorDrainHosts{handler: handler})
self351.AddToProcessorMap("maintenanceStatus", &auroraAdminProcessorMaintenanceStatus{handler: handler}) self352.AddToProcessorMap("maintenanceStatus", &auroraAdminProcessorMaintenanceStatus{handler: handler})
self351.AddToProcessorMap("endMaintenance", &auroraAdminProcessorEndMaintenance{handler: handler}) self352.AddToProcessorMap("endMaintenance", &auroraAdminProcessorEndMaintenance{handler: handler})
self351.AddToProcessorMap("snapshot", &auroraAdminProcessorSnapshot{handler: handler}) self352.AddToProcessorMap("slaDrainHosts", &auroraAdminProcessorSlaDrainHosts{handler: handler})
self351.AddToProcessorMap("triggerExplicitTaskReconciliation", &auroraAdminProcessorTriggerExplicitTaskReconciliation{handler: handler}) self352.AddToProcessorMap("snapshot", &auroraAdminProcessorSnapshot{handler: handler})
self351.AddToProcessorMap("triggerImplicitTaskReconciliation", &auroraAdminProcessorTriggerImplicitTaskReconciliation{handler: handler}) self352.AddToProcessorMap("triggerExplicitTaskReconciliation", &auroraAdminProcessorTriggerExplicitTaskReconciliation{handler: handler})
self351.AddToProcessorMap("pruneTasks", &auroraAdminProcessorPruneTasks{handler: handler}) self352.AddToProcessorMap("triggerImplicitTaskReconciliation", &auroraAdminProcessorTriggerImplicitTaskReconciliation{handler: handler})
return self351 self352.AddToProcessorMap("pruneTasks", &auroraAdminProcessorPruneTasks{handler: handler})
return self352
} }
type auroraAdminProcessorSetQuota struct { type auroraAdminProcessorSetQuota struct {
@ -2075,6 +2170,54 @@ func (p *auroraAdminProcessorEndMaintenance) Process(seqId int32, iprot, oprot t
return true, err return true, err
} }
type auroraAdminProcessorSlaDrainHosts struct {
handler AuroraAdmin
}
func (p *auroraAdminProcessorSlaDrainHosts) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
args := AuroraAdminSlaDrainHostsArgs{}
if err = args.Read(iprot); err != nil {
iprot.ReadMessageEnd()
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId)
x.Write(oprot)
oprot.WriteMessageEnd()
oprot.Flush()
return false, err
}
iprot.ReadMessageEnd()
result := AuroraAdminSlaDrainHostsResult{}
var retval *Response
var err2 error
if retval, err2 = p.handler.SlaDrainHosts(args.Hosts, args.DefaultSlaPolicy, args.TimeoutSecs); err2 != nil {
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing slaDrainHosts: "+err2.Error())
oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId)
x.Write(oprot)
oprot.WriteMessageEnd()
oprot.Flush()
return true, err2
} else {
result.Success = retval
}
if err2 = oprot.WriteMessageBegin("slaDrainHosts", thrift.REPLY, seqId); err2 != nil {
err = err2
}
if err2 = result.Write(oprot); err == nil && err2 != nil {
err = err2
}
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
err = err2
}
if err2 = oprot.Flush(); err == nil && err2 != nil {
err = err2
}
if err != nil {
return
}
return true, err
}
type auroraAdminProcessorSnapshot struct { type auroraAdminProcessorSnapshot struct {
handler AuroraAdmin handler AuroraAdmin
} }
@ -4740,6 +4883,284 @@ func (p *AuroraAdminEndMaintenanceResult) String() string {
return fmt.Sprintf("AuroraAdminEndMaintenanceResult(%+v)", *p) return fmt.Sprintf("AuroraAdminEndMaintenanceResult(%+v)", *p)
} }
// Attributes:
// - Hosts
// - DefaultSlaPolicy
// - TimeoutSecs
type AuroraAdminSlaDrainHostsArgs struct {
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
DefaultSlaPolicy *SlaPolicy `thrift:"defaultSlaPolicy,2" json:"defaultSlaPolicy"`
TimeoutSecs int64 `thrift:"timeoutSecs,3" json:"timeoutSecs"`
}
func NewAuroraAdminSlaDrainHostsArgs() *AuroraAdminSlaDrainHostsArgs {
return &AuroraAdminSlaDrainHostsArgs{}
}
var AuroraAdminSlaDrainHostsArgs_Hosts_DEFAULT *Hosts
func (p *AuroraAdminSlaDrainHostsArgs) GetHosts() *Hosts {
if !p.IsSetHosts() {
return AuroraAdminSlaDrainHostsArgs_Hosts_DEFAULT
}
return p.Hosts
}
var AuroraAdminSlaDrainHostsArgs_DefaultSlaPolicy_DEFAULT *SlaPolicy
func (p *AuroraAdminSlaDrainHostsArgs) GetDefaultSlaPolicy() *SlaPolicy {
if !p.IsSetDefaultSlaPolicy() {
return AuroraAdminSlaDrainHostsArgs_DefaultSlaPolicy_DEFAULT
}
return p.DefaultSlaPolicy
}
func (p *AuroraAdminSlaDrainHostsArgs) GetTimeoutSecs() int64 {
return p.TimeoutSecs
}
func (p *AuroraAdminSlaDrainHostsArgs) IsSetHosts() bool {
return p.Hosts != nil
}
func (p *AuroraAdminSlaDrainHostsArgs) IsSetDefaultSlaPolicy() bool {
return p.DefaultSlaPolicy != nil
}
func (p *AuroraAdminSlaDrainHostsArgs) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 1:
if err := p.readField1(iprot); err != nil {
return err
}
case 2:
if err := p.readField2(iprot); err != nil {
return err
}
case 3:
if err := p.readField3(iprot); err != nil {
return err
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsArgs) readField1(iprot thrift.TProtocol) error {
p.Hosts = &Hosts{}
if err := p.Hosts.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsArgs) readField2(iprot thrift.TProtocol) error {
p.DefaultSlaPolicy = &SlaPolicy{}
if err := p.DefaultSlaPolicy.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsArgs) readField3(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
p.TimeoutSecs = v
}
return nil
}
func (p *AuroraAdminSlaDrainHostsArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("slaDrainHosts_args"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := p.writeField2(oprot); err != nil {
return err
}
if err := p.writeField3(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
}
if err := p.Hosts.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
}
return err
}
func (p *AuroraAdminSlaDrainHostsArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("defaultSlaPolicy", thrift.STRUCT, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:defaultSlaPolicy: ", p), err)
}
if err := p.DefaultSlaPolicy.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err)
}
return err
}
func (p *AuroraAdminSlaDrainHostsArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err)
}
if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err)
}
return err
}
func (p *AuroraAdminSlaDrainHostsArgs) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("AuroraAdminSlaDrainHostsArgs(%+v)", *p)
}
// Attributes:
// - Success
type AuroraAdminSlaDrainHostsResult struct {
Success *Response `thrift:"success,0" json:"success,omitempty"`
}
func NewAuroraAdminSlaDrainHostsResult() *AuroraAdminSlaDrainHostsResult {
return &AuroraAdminSlaDrainHostsResult{}
}
var AuroraAdminSlaDrainHostsResult_Success_DEFAULT *Response
func (p *AuroraAdminSlaDrainHostsResult) GetSuccess() *Response {
if !p.IsSetSuccess() {
return AuroraAdminSlaDrainHostsResult_Success_DEFAULT
}
return p.Success
}
func (p *AuroraAdminSlaDrainHostsResult) IsSetSuccess() bool {
return p.Success != nil
}
func (p *AuroraAdminSlaDrainHostsResult) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
if err != nil {
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
}
if fieldTypeId == thrift.STOP {
break
}
switch fieldId {
case 0:
if err := p.readField0(iprot); err != nil {
return err
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
}
}
if err := iprot.ReadFieldEnd(); err != nil {
return err
}
}
if err := iprot.ReadStructEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsResult) readField0(iprot thrift.TProtocol) error {
p.Success = &Response{}
if err := p.Success.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsResult) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("slaDrainHosts_result"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField0(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
func (p *AuroraAdminSlaDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) {
if p.IsSetSuccess() {
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
}
if err := p.Success.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
}
}
return err
}
func (p *AuroraAdminSlaDrainHostsResult) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("AuroraAdminSlaDrainHostsResult(%+v)", *p)
}
type AuroraAdminSnapshotArgs struct { type AuroraAdminSnapshotArgs struct {
} }

View file

@ -171,16 +171,16 @@ func (p *AuroraSchedulerManagerClient) recvCreateJob() (value *Response, err err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error132 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error131 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error133 error var error132 error
error133, err = error132.Read(iprot) error132, err = error131.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error133 err = error132
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -252,16 +252,16 @@ func (p *AuroraSchedulerManagerClient) recvScheduleCronJob() (value *Response, e
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error134 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error133 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error135 error var error134 error
error135, err = error134.Read(iprot) error134, err = error133.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error135 err = error134
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -332,16 +332,16 @@ func (p *AuroraSchedulerManagerClient) recvDescheduleCronJob() (value *Response,
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error136 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error135 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error137 error var error136 error
error137, err = error136.Read(iprot) error136, err = error135.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error137 err = error136
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -412,16 +412,16 @@ func (p *AuroraSchedulerManagerClient) recvStartCronJob() (value *Response, err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error138 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error137 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error139 error var error138 error
error139, err = error138.Read(iprot) error138, err = error137.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error139 err = error138
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -493,16 +493,16 @@ func (p *AuroraSchedulerManagerClient) recvRestartShards() (value *Response, err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error140 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error139 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error141 error var error140 error
error141, err = error140.Read(iprot) error140, err = error139.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error141 err = error140
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -576,16 +576,16 @@ func (p *AuroraSchedulerManagerClient) recvKillTasks() (value *Response, err err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error142 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error141 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error143 error var error142 error
error143, err = error142.Read(iprot) error142, err = error141.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error143 err = error142
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -657,16 +657,16 @@ func (p *AuroraSchedulerManagerClient) recvAddInstances() (value *Response, err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error144 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error143 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error145 error var error144 error
error145, err = error144.Read(iprot) error144, err = error143.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error145 err = error144
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -737,16 +737,16 @@ func (p *AuroraSchedulerManagerClient) recvReplaceCronTemplate() (value *Respons
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error146 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error145 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error147 error var error146 error
error147, err = error146.Read(iprot) error146, err = error145.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error147 err = error146
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -818,16 +818,16 @@ func (p *AuroraSchedulerManagerClient) recvStartJobUpdate() (value *Response, er
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error148 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error147 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error149 error var error148 error
error149, err = error148.Read(iprot) error148, err = error147.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error149 err = error148
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -899,16 +899,16 @@ func (p *AuroraSchedulerManagerClient) recvPauseJobUpdate() (value *Response, er
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error150 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error149 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error151 error var error150 error
error151, err = error150.Read(iprot) error150, err = error149.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error151 err = error150
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -980,16 +980,16 @@ func (p *AuroraSchedulerManagerClient) recvResumeJobUpdate() (value *Response, e
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error152 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error151 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error153 error var error152 error
error153, err = error152.Read(iprot) error152, err = error151.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error153 err = error152
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1061,16 +1061,16 @@ func (p *AuroraSchedulerManagerClient) recvAbortJobUpdate() (value *Response, er
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error154 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error153 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error155 error var error154 error
error155, err = error154.Read(iprot) error154, err = error153.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error155 err = error154
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1142,16 +1142,16 @@ func (p *AuroraSchedulerManagerClient) recvRollbackJobUpdate() (value *Response,
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error156 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error155 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error157 error var error156 error
error157, err = error156.Read(iprot) error156, err = error155.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error157 err = error156
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1223,16 +1223,16 @@ func (p *AuroraSchedulerManagerClient) recvPulseJobUpdate() (value *Response, er
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error158 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error157 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error159 error var error158 error
error159, err = error158.Read(iprot) error158, err = error157.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error159 err = error158
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1255,22 +1255,22 @@ type AuroraSchedulerManagerProcessor struct {
} }
func NewAuroraSchedulerManagerProcessor(handler AuroraSchedulerManager) *AuroraSchedulerManagerProcessor { func NewAuroraSchedulerManagerProcessor(handler AuroraSchedulerManager) *AuroraSchedulerManagerProcessor {
self160 := &AuroraSchedulerManagerProcessor{NewReadOnlySchedulerProcessor(handler)} self159 := &AuroraSchedulerManagerProcessor{NewReadOnlySchedulerProcessor(handler)}
self160.AddToProcessorMap("createJob", &auroraSchedulerManagerProcessorCreateJob{handler: handler}) self159.AddToProcessorMap("createJob", &auroraSchedulerManagerProcessorCreateJob{handler: handler})
self160.AddToProcessorMap("scheduleCronJob", &auroraSchedulerManagerProcessorScheduleCronJob{handler: handler}) self159.AddToProcessorMap("scheduleCronJob", &auroraSchedulerManagerProcessorScheduleCronJob{handler: handler})
self160.AddToProcessorMap("descheduleCronJob", &auroraSchedulerManagerProcessorDescheduleCronJob{handler: handler}) self159.AddToProcessorMap("descheduleCronJob", &auroraSchedulerManagerProcessorDescheduleCronJob{handler: handler})
self160.AddToProcessorMap("startCronJob", &auroraSchedulerManagerProcessorStartCronJob{handler: handler}) self159.AddToProcessorMap("startCronJob", &auroraSchedulerManagerProcessorStartCronJob{handler: handler})
self160.AddToProcessorMap("restartShards", &auroraSchedulerManagerProcessorRestartShards{handler: handler}) self159.AddToProcessorMap("restartShards", &auroraSchedulerManagerProcessorRestartShards{handler: handler})
self160.AddToProcessorMap("killTasks", &auroraSchedulerManagerProcessorKillTasks{handler: handler}) self159.AddToProcessorMap("killTasks", &auroraSchedulerManagerProcessorKillTasks{handler: handler})
self160.AddToProcessorMap("addInstances", &auroraSchedulerManagerProcessorAddInstances{handler: handler}) self159.AddToProcessorMap("addInstances", &auroraSchedulerManagerProcessorAddInstances{handler: handler})
self160.AddToProcessorMap("replaceCronTemplate", &auroraSchedulerManagerProcessorReplaceCronTemplate{handler: handler}) self159.AddToProcessorMap("replaceCronTemplate", &auroraSchedulerManagerProcessorReplaceCronTemplate{handler: handler})
self160.AddToProcessorMap("startJobUpdate", &auroraSchedulerManagerProcessorStartJobUpdate{handler: handler}) self159.AddToProcessorMap("startJobUpdate", &auroraSchedulerManagerProcessorStartJobUpdate{handler: handler})
self160.AddToProcessorMap("pauseJobUpdate", &auroraSchedulerManagerProcessorPauseJobUpdate{handler: handler}) self159.AddToProcessorMap("pauseJobUpdate", &auroraSchedulerManagerProcessorPauseJobUpdate{handler: handler})
self160.AddToProcessorMap("resumeJobUpdate", &auroraSchedulerManagerProcessorResumeJobUpdate{handler: handler}) self159.AddToProcessorMap("resumeJobUpdate", &auroraSchedulerManagerProcessorResumeJobUpdate{handler: handler})
self160.AddToProcessorMap("abortJobUpdate", &auroraSchedulerManagerProcessorAbortJobUpdate{handler: handler}) self159.AddToProcessorMap("abortJobUpdate", &auroraSchedulerManagerProcessorAbortJobUpdate{handler: handler})
self160.AddToProcessorMap("rollbackJobUpdate", &auroraSchedulerManagerProcessorRollbackJobUpdate{handler: handler}) self159.AddToProcessorMap("rollbackJobUpdate", &auroraSchedulerManagerProcessorRollbackJobUpdate{handler: handler})
self160.AddToProcessorMap("pulseJobUpdate", &auroraSchedulerManagerProcessorPulseJobUpdate{handler: handler}) self159.AddToProcessorMap("pulseJobUpdate", &auroraSchedulerManagerProcessorPulseJobUpdate{handler: handler})
return self160 return self159
} }
type auroraSchedulerManagerProcessorCreateJob struct { type auroraSchedulerManagerProcessorCreateJob struct {
@ -2832,13 +2832,13 @@ func (p *AuroraSchedulerManagerRestartShardsArgs) readField3(iprot thrift.TProto
tSet := make(map[int32]bool, size) tSet := make(map[int32]bool, size)
p.ShardIds = tSet p.ShardIds = tSet
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
var _elem161 int32 var _elem160 int32
if v, err := iprot.ReadI32(); err != nil { if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err) return thrift.PrependError("error reading field 0: ", err)
} else { } else {
_elem161 = v _elem160 = v
} }
p.ShardIds[_elem161] = true p.ShardIds[_elem160] = true
} }
if err := iprot.ReadSetEnd(); err != nil { if err := iprot.ReadSetEnd(); err != nil {
return thrift.PrependError("error reading set end: ", err) return thrift.PrependError("error reading set end: ", err)
@ -3099,13 +3099,13 @@ func (p *AuroraSchedulerManagerKillTasksArgs) readField5(iprot thrift.TProtocol)
tSet := make(map[int32]bool, size) tSet := make(map[int32]bool, size)
p.Instances = tSet p.Instances = tSet
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
var _elem162 int32 var _elem161 int32
if v, err := iprot.ReadI32(); err != nil { if v, err := iprot.ReadI32(); err != nil {
return thrift.PrependError("error reading field 0: ", err) return thrift.PrependError("error reading field 0: ", err)
} else { } else {
_elem162 = v _elem161 = v
} }
p.Instances[_elem162] = true p.Instances[_elem161] = true
} }
if err := iprot.ReadSetEnd(); err != nil { if err := iprot.ReadSetEnd(); err != nil {
return thrift.PrependError("error reading set end: ", err) return thrift.PrependError("error reading set end: ", err)

View file

@ -41,6 +41,7 @@ func init() {
12: true, 12: true,
2: true, 2: true,
1: true, 1: true,
18: true,
16: true, 16: true,
} }
@ -51,6 +52,7 @@ func init() {
13: true, 13: true,
12: true, 12: true,
2: true, 2: true,
18: true,
1: true, 1: true,
} }
@ -59,6 +61,7 @@ func init() {
13: true, 13: true,
12: true, 12: true,
17: true, 17: true,
18: true,
2: true, 2: true,
} }

View file

@ -150,19 +150,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args")
flag.Usage() flag.Usage()
} }
arg82 := flag.Arg(1) arg81 := flag.Arg(1)
mbTrans83 := thrift.NewTMemoryBufferLen(len(arg82)) mbTrans82 := thrift.NewTMemoryBufferLen(len(arg81))
defer mbTrans83.Close() defer mbTrans82.Close()
_, err84 := mbTrans83.WriteString(arg82) _, err83 := mbTrans82.WriteString(arg81)
if err84 != nil { if err83 != nil {
Usage() Usage()
return return
} }
factory85 := thrift.NewTSimpleJSONProtocolFactory() factory84 := thrift.NewTSimpleJSONProtocolFactory()
jsProt86 := factory85.GetProtocol(mbTrans83) jsProt85 := factory84.GetProtocol(mbTrans82)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err87 := argvalue0.Read(jsProt86) err86 := argvalue0.Read(jsProt85)
if err87 != nil { if err86 != nil {
Usage() Usage()
return return
} }
@ -175,19 +175,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args")
flag.Usage() flag.Usage()
} }
arg88 := flag.Arg(1) arg87 := flag.Arg(1)
mbTrans89 := thrift.NewTMemoryBufferLen(len(arg88)) mbTrans88 := thrift.NewTMemoryBufferLen(len(arg87))
defer mbTrans89.Close() defer mbTrans88.Close()
_, err90 := mbTrans89.WriteString(arg88) _, err89 := mbTrans88.WriteString(arg87)
if err90 != nil { if err89 != nil {
Usage() Usage()
return return
} }
factory91 := thrift.NewTSimpleJSONProtocolFactory() factory90 := thrift.NewTSimpleJSONProtocolFactory()
jsProt92 := factory91.GetProtocol(mbTrans89) jsProt91 := factory90.GetProtocol(mbTrans88)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err93 := argvalue0.Read(jsProt92) err92 := argvalue0.Read(jsProt91)
if err93 != nil { if err92 != nil {
Usage() Usage()
return return
} }
@ -200,19 +200,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args")
flag.Usage() flag.Usage()
} }
arg94 := flag.Arg(1) arg93 := flag.Arg(1)
mbTrans95 := thrift.NewTMemoryBufferLen(len(arg94)) mbTrans94 := thrift.NewTMemoryBufferLen(len(arg93))
defer mbTrans95.Close() defer mbTrans94.Close()
_, err96 := mbTrans95.WriteString(arg94) _, err95 := mbTrans94.WriteString(arg93)
if err96 != nil { if err95 != nil {
Usage() Usage()
return return
} }
factory97 := thrift.NewTSimpleJSONProtocolFactory() factory96 := thrift.NewTSimpleJSONProtocolFactory()
jsProt98 := factory97.GetProtocol(mbTrans95) jsProt97 := factory96.GetProtocol(mbTrans94)
argvalue0 := aurora.NewTaskQuery() argvalue0 := aurora.NewTaskQuery()
err99 := argvalue0.Read(jsProt98) err98 := argvalue0.Read(jsProt97)
if err99 != nil { if err98 != nil {
Usage() Usage()
return return
} }
@ -225,19 +225,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args")
flag.Usage() flag.Usage()
} }
arg100 := flag.Arg(1) arg99 := flag.Arg(1)
mbTrans101 := thrift.NewTMemoryBufferLen(len(arg100)) mbTrans100 := thrift.NewTMemoryBufferLen(len(arg99))
defer mbTrans101.Close() defer mbTrans100.Close()
_, err102 := mbTrans101.WriteString(arg100) _, err101 := mbTrans100.WriteString(arg99)
if err102 != nil { if err101 != nil {
Usage() Usage()
return return
} }
factory103 := thrift.NewTSimpleJSONProtocolFactory() factory102 := thrift.NewTSimpleJSONProtocolFactory()
jsProt104 := factory103.GetProtocol(mbTrans101) jsProt103 := factory102.GetProtocol(mbTrans100)
argvalue0 := aurora.NewJobKey() argvalue0 := aurora.NewJobKey()
err105 := argvalue0.Read(jsProt104) err104 := argvalue0.Read(jsProt103)
if err105 != nil { if err104 != nil {
Usage() Usage()
return return
} }
@ -270,19 +270,19 @@ func main() {
fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args")
flag.Usage() flag.Usage()
} }
arg108 := flag.Arg(1) arg107 := flag.Arg(1)
mbTrans109 := thrift.NewTMemoryBufferLen(len(arg108)) mbTrans108 := thrift.NewTMemoryBufferLen(len(arg107))
defer mbTrans109.Close() defer mbTrans108.Close()
_, err110 := mbTrans109.WriteString(arg108) _, err109 := mbTrans108.WriteString(arg107)
if err110 != nil { if err109 != nil {
Usage() Usage()
return return
} }
factory111 := thrift.NewTSimpleJSONProtocolFactory() factory110 := thrift.NewTSimpleJSONProtocolFactory()
jsProt112 := factory111.GetProtocol(mbTrans109) jsProt111 := factory110.GetProtocol(mbTrans108)
argvalue0 := aurora.NewJobConfiguration() argvalue0 := aurora.NewJobConfiguration()
err113 := argvalue0.Read(jsProt112) err112 := argvalue0.Read(jsProt111)
if err113 != nil { if err112 != nil {
Usage() Usage()
return return
} }
@ -295,19 +295,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args")
flag.Usage() flag.Usage()
} }
arg114 := flag.Arg(1) arg113 := flag.Arg(1)
mbTrans115 := thrift.NewTMemoryBufferLen(len(arg114)) mbTrans114 := thrift.NewTMemoryBufferLen(len(arg113))
defer mbTrans115.Close() defer mbTrans114.Close()
_, err116 := mbTrans115.WriteString(arg114) _, err115 := mbTrans114.WriteString(arg113)
if err116 != nil { if err115 != nil {
Usage() Usage()
return return
} }
factory117 := thrift.NewTSimpleJSONProtocolFactory() factory116 := thrift.NewTSimpleJSONProtocolFactory()
jsProt118 := factory117.GetProtocol(mbTrans115) jsProt117 := factory116.GetProtocol(mbTrans114)
argvalue0 := aurora.NewJobUpdateQuery() argvalue0 := aurora.NewJobUpdateQuery()
err119 := argvalue0.Read(jsProt118) err118 := argvalue0.Read(jsProt117)
if err119 != nil { if err118 != nil {
Usage() Usage()
return return
} }
@ -320,19 +320,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args")
flag.Usage() flag.Usage()
} }
arg120 := flag.Arg(1) arg119 := flag.Arg(1)
mbTrans121 := thrift.NewTMemoryBufferLen(len(arg120)) mbTrans120 := thrift.NewTMemoryBufferLen(len(arg119))
defer mbTrans121.Close() defer mbTrans120.Close()
_, err122 := mbTrans121.WriteString(arg120) _, err121 := mbTrans120.WriteString(arg119)
if err122 != nil { if err121 != nil {
Usage() Usage()
return return
} }
factory123 := thrift.NewTSimpleJSONProtocolFactory() factory122 := thrift.NewTSimpleJSONProtocolFactory()
jsProt124 := factory123.GetProtocol(mbTrans121) jsProt123 := factory122.GetProtocol(mbTrans120)
argvalue0 := aurora.NewJobUpdateQuery() argvalue0 := aurora.NewJobUpdateQuery()
err125 := argvalue0.Read(jsProt124) err124 := argvalue0.Read(jsProt123)
if err125 != nil { if err124 != nil {
Usage() Usage()
return return
} }
@ -345,19 +345,19 @@ func main() {
fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args")
flag.Usage() flag.Usage()
} }
arg126 := flag.Arg(1) arg125 := flag.Arg(1)
mbTrans127 := thrift.NewTMemoryBufferLen(len(arg126)) mbTrans126 := thrift.NewTMemoryBufferLen(len(arg125))
defer mbTrans127.Close() defer mbTrans126.Close()
_, err128 := mbTrans127.WriteString(arg126) _, err127 := mbTrans126.WriteString(arg125)
if err128 != nil { if err127 != nil {
Usage() Usage()
return return
} }
factory129 := thrift.NewTSimpleJSONProtocolFactory() factory128 := thrift.NewTSimpleJSONProtocolFactory()
jsProt130 := factory129.GetProtocol(mbTrans127) jsProt129 := factory128.GetProtocol(mbTrans126)
argvalue0 := aurora.NewJobUpdateRequest() argvalue0 := aurora.NewJobUpdateRequest()
err131 := argvalue0.Read(jsProt130) err130 := argvalue0.Read(jsProt129)
if err131 != nil { if err130 != nil {
Usage() Usage()
return return
} }

View file

@ -152,16 +152,16 @@ func (p *ReadOnlySchedulerClient) recvGetRoleSummary() (value *Response, err err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error53 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error52 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error54 error var error53 error
error54, err = error53.Read(iprot) error53, err = error52.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error54 err = error53
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -231,16 +231,16 @@ func (p *ReadOnlySchedulerClient) recvGetJobSummary() (value *Response, err erro
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error55 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error54 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error56 error var error55 error
error56, err = error55.Read(iprot) error55, err = error54.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error56 err = error55
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -310,16 +310,16 @@ func (p *ReadOnlySchedulerClient) recvGetTasksStatus() (value *Response, err err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error57 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error56 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error58 error var error57 error
error58, err = error57.Read(iprot) error57, err = error56.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error58 err = error57
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -390,16 +390,16 @@ func (p *ReadOnlySchedulerClient) recvGetTasksWithoutConfigs() (value *Response,
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error59 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error58 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error60 error var error59 error
error60, err = error59.Read(iprot) error59, err = error58.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error60 err = error59
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -469,16 +469,16 @@ func (p *ReadOnlySchedulerClient) recvGetPendingReason() (value *Response, err e
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error61 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error60 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error62 error var error61 error
error62, err = error61.Read(iprot) error61, err = error60.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error62 err = error61
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -548,16 +548,16 @@ func (p *ReadOnlySchedulerClient) recvGetConfigSummary() (value *Response, err e
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error63 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error62 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error64 error var error63 error
error64, err = error63.Read(iprot) error63, err = error62.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error64 err = error63
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -628,16 +628,16 @@ func (p *ReadOnlySchedulerClient) recvGetJobs() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error65 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error64 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error66 error var error65 error
error66, err = error65.Read(iprot) error65, err = error64.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error66 err = error65
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -707,16 +707,16 @@ func (p *ReadOnlySchedulerClient) recvGetQuota() (value *Response, err error) {
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error67 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error66 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error68 error var error67 error
error68, err = error67.Read(iprot) error67, err = error66.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error68 err = error67
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -787,16 +787,16 @@ func (p *ReadOnlySchedulerClient) recvPopulateJobConfig() (value *Response, err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error69 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error68 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error70 error var error69 error
error70, err = error69.Read(iprot) error69, err = error68.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error70 err = error69
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -866,16 +866,16 @@ func (p *ReadOnlySchedulerClient) recvGetJobUpdateSummaries() (value *Response,
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error71 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error70 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error72 error var error71 error
error72, err = error71.Read(iprot) error71, err = error70.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error72 err = error71
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -945,16 +945,16 @@ func (p *ReadOnlySchedulerClient) recvGetJobUpdateDetails() (value *Response, er
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error73 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error72 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error74 error var error73 error
error74, err = error73.Read(iprot) error73, err = error72.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error74 err = error73
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1024,16 +1024,16 @@ func (p *ReadOnlySchedulerClient) recvGetJobUpdateDiff() (value *Response, err e
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error75 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error74 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error76 error var error75 error
error76, err = error75.Read(iprot) error75, err = error74.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error76 err = error75
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1098,16 +1098,16 @@ func (p *ReadOnlySchedulerClient) recvGetTierConfigs() (value *Response, err err
return return
} }
if mTypeId == thrift.EXCEPTION { if mTypeId == thrift.EXCEPTION {
error77 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") error76 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
var error78 error var error77 error
error78, err = error77.Read(iprot) error77, err = error76.Read(iprot)
if err != nil { if err != nil {
return return
} }
if err = iprot.ReadMessageEnd(); err != nil { if err = iprot.ReadMessageEnd(); err != nil {
return return
} }
err = error78 err = error77
return return
} }
if mTypeId != thrift.REPLY { if mTypeId != thrift.REPLY {
@ -1145,21 +1145,21 @@ func (p *ReadOnlySchedulerProcessor) ProcessorMap() map[string]thrift.TProcessor
func NewReadOnlySchedulerProcessor(handler ReadOnlyScheduler) *ReadOnlySchedulerProcessor { func NewReadOnlySchedulerProcessor(handler ReadOnlyScheduler) *ReadOnlySchedulerProcessor {
self79 := &ReadOnlySchedulerProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} self78 := &ReadOnlySchedulerProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)}
self79.processorMap["getRoleSummary"] = &readOnlySchedulerProcessorGetRoleSummary{handler: handler} self78.processorMap["getRoleSummary"] = &readOnlySchedulerProcessorGetRoleSummary{handler: handler}
self79.processorMap["getJobSummary"] = &readOnlySchedulerProcessorGetJobSummary{handler: handler} self78.processorMap["getJobSummary"] = &readOnlySchedulerProcessorGetJobSummary{handler: handler}
self79.processorMap["getTasksStatus"] = &readOnlySchedulerProcessorGetTasksStatus{handler: handler} self78.processorMap["getTasksStatus"] = &readOnlySchedulerProcessorGetTasksStatus{handler: handler}
self79.processorMap["getTasksWithoutConfigs"] = &readOnlySchedulerProcessorGetTasksWithoutConfigs{handler: handler} self78.processorMap["getTasksWithoutConfigs"] = &readOnlySchedulerProcessorGetTasksWithoutConfigs{handler: handler}
self79.processorMap["getPendingReason"] = &readOnlySchedulerProcessorGetPendingReason{handler: handler} self78.processorMap["getPendingReason"] = &readOnlySchedulerProcessorGetPendingReason{handler: handler}
self79.processorMap["getConfigSummary"] = &readOnlySchedulerProcessorGetConfigSummary{handler: handler} self78.processorMap["getConfigSummary"] = &readOnlySchedulerProcessorGetConfigSummary{handler: handler}
self79.processorMap["getJobs"] = &readOnlySchedulerProcessorGetJobs{handler: handler} self78.processorMap["getJobs"] = &readOnlySchedulerProcessorGetJobs{handler: handler}
self79.processorMap["getQuota"] = &readOnlySchedulerProcessorGetQuota{handler: handler} self78.processorMap["getQuota"] = &readOnlySchedulerProcessorGetQuota{handler: handler}
self79.processorMap["populateJobConfig"] = &readOnlySchedulerProcessorPopulateJobConfig{handler: handler} self78.processorMap["populateJobConfig"] = &readOnlySchedulerProcessorPopulateJobConfig{handler: handler}
self79.processorMap["getJobUpdateSummaries"] = &readOnlySchedulerProcessorGetJobUpdateSummaries{handler: handler} self78.processorMap["getJobUpdateSummaries"] = &readOnlySchedulerProcessorGetJobUpdateSummaries{handler: handler}
self79.processorMap["getJobUpdateDetails"] = &readOnlySchedulerProcessorGetJobUpdateDetails{handler: handler} self78.processorMap["getJobUpdateDetails"] = &readOnlySchedulerProcessorGetJobUpdateDetails{handler: handler}
self79.processorMap["getJobUpdateDiff"] = &readOnlySchedulerProcessorGetJobUpdateDiff{handler: handler} self78.processorMap["getJobUpdateDiff"] = &readOnlySchedulerProcessorGetJobUpdateDiff{handler: handler}
self79.processorMap["getTierConfigs"] = &readOnlySchedulerProcessorGetTierConfigs{handler: handler} self78.processorMap["getTierConfigs"] = &readOnlySchedulerProcessorGetTierConfigs{handler: handler}
return self79 return self78
} }
func (p *ReadOnlySchedulerProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { func (p *ReadOnlySchedulerProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
@ -1172,12 +1172,12 @@ func (p *ReadOnlySchedulerProcessor) Process(iprot, oprot thrift.TProtocol) (suc
} }
iprot.Skip(thrift.STRUCT) iprot.Skip(thrift.STRUCT)
iprot.ReadMessageEnd() iprot.ReadMessageEnd()
x80 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) x79 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name)
oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
x80.Write(oprot) x79.Write(oprot)
oprot.WriteMessageEnd() oprot.WriteMessageEnd()
oprot.Flush() oprot.Flush()
return false, x80 return false, x79
} }

File diff suppressed because it is too large Load diff

3
job.go
View file

@ -155,21 +155,18 @@ func (j *AuroraJob) ExecutorData(data string) Job {
func (j *AuroraJob) CPU(cpus float64) Job { func (j *AuroraJob) CPU(cpus float64) Job {
*j.resources["cpu"].NumCpus = cpus *j.resources["cpu"].NumCpus = cpus
j.jobConfig.TaskConfig.NumCpus = cpus //Will be deprecated soon
return j return j
} }
func (j *AuroraJob) RAM(ram int64) Job { func (j *AuroraJob) RAM(ram int64) Job {
*j.resources["ram"].RamMb = ram *j.resources["ram"].RamMb = ram
j.jobConfig.TaskConfig.RamMb = ram //Will be deprecated soon
return j return j
} }
func (j *AuroraJob) Disk(disk int64) Job { func (j *AuroraJob) Disk(disk int64) Job {
*j.resources["disk"].DiskMb = disk *j.resources["disk"].DiskMb = disk
j.jobConfig.TaskConfig.DiskMb = disk //Will be deprecated
return j return j
} }

View file

@ -73,6 +73,7 @@ type Realis interface {
// Admin functions // Admin functions
DrainHosts(hosts ...string) (*aurora.Response, *aurora.DrainHostsResult_, error) DrainHosts(hosts ...string) (*aurora.Response, *aurora.DrainHostsResult_, error)
SLADrainHosts(policy *aurora.SlaPolicy, timeout int64, hosts ...string) (*aurora.DrainHostsResult_, error)
StartMaintenance(hosts ...string) (*aurora.Response, *aurora.StartMaintenanceResult_, error) StartMaintenance(hosts ...string) (*aurora.Response, *aurora.StartMaintenanceResult_, error)
EndMaintenance(hosts ...string) (*aurora.Response, *aurora.EndMaintenanceResult_, error) EndMaintenance(hosts ...string) (*aurora.Response, *aurora.EndMaintenanceResult_, error)
MaintenanceStatus(hosts ...string) (*aurora.Response, *aurora.MaintenanceStatusResult_, error) MaintenanceStatus(hosts ...string) (*aurora.Response, *aurora.MaintenanceStatusResult_, error)
@ -1021,6 +1022,39 @@ func (r *realisClient) DrainHosts(hosts ...string) (*aurora.Response, *aurora.Dr
return resp, result, nil return resp, result, nil
} }
// Start SLA Aware Drain.
// defaultSlaPolicy is the fallback SlaPolicy to use if a task does not have an SlaPolicy.
// After timeoutSecs, tasks will be forcefully drained without checking SLA.
func (r *realisClient) SLADrainHosts(policy *aurora.SlaPolicy, timeout int64, hosts ...string) (*aurora.DrainHostsResult_, error) {
var result *aurora.DrainHostsResult_
if len(hosts) == 0 {
return nil, errors.New("no hosts provided to drain")
}
drainList := aurora.NewHosts()
drainList.HostNames = make(map[string]bool)
for _, host := range hosts {
drainList.HostNames[host] = true
}
r.logger.DebugPrintf("SLADrainHosts Thrift Payload: %v\n", drainList)
resp, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
return r.adminClient.SlaDrainHosts(drainList, policy, timeout)
})
if retryErr != nil {
return result, errors.Wrap(retryErr, "Unable to recover connection")
}
if resp.GetResult_() != nil {
result = resp.GetResult_().GetDrainHostsResult_()
}
return result, nil
}
func (r *realisClient) StartMaintenance(hosts ...string) (*aurora.Response, *aurora.StartMaintenanceResult_, error) { func (r *realisClient) StartMaintenance(hosts ...string) (*aurora.Response, *aurora.StartMaintenanceResult_, error) {
var result *aurora.StartMaintenanceResult_ var result *aurora.StartMaintenanceResult_

View file

@ -567,6 +567,37 @@ func TestRealisClient_DrainHosts(t *testing.T) {
} }
func TestRealisClient_SLADrainHosts(t *testing.T) {
hosts := []string{"localhost"}
policy := aurora.SlaPolicy{PercentageSlaPolicy: &aurora.PercentageSlaPolicy{Percentage: 50.0}}
_, err := r.SLADrainHosts(&policy, 30, hosts...)
if err != nil {
fmt.Printf("error: %+v\n", err.Error())
os.Exit(1)
}
// Monitor change to DRAINING and DRAINED mode
hostResults, err := monitor.HostMaintenance(
hosts,
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
1,
50)
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
assert.NoError(t, err)
_, _, err = r.EndMaintenance(hosts...)
assert.NoError(t, err)
// Monitor change to DRAINING and DRAINED mode
_, err = monitor.HostMaintenance(
hosts,
[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE},
5,
10)
assert.NoError(t, err)
}
// Test multiple go routines using a single connection // Test multiple go routines using a single connection
func TestRealisClient_SessionThreadSafety(t *testing.T) { func TestRealisClient_SessionThreadSafety(t *testing.T) {