tools/deploy/aurora/api/AuroraSchedulerManager.py (2,516 lines of code) (raw):

# # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style,slots,utf8strings # from thrift.Thrift import TType, TMessageType, TException, TApplicationException import aurora.api.ReadOnlyScheduler import logging from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None class Iface(aurora.api.ReadOnlyScheduler.Iface): def createJob(self, description): """ Creates a new job. The request will be denied if a job with the provided name already exists in the cluster. Parameters: - description """ pass def scheduleCronJob(self, description): """ Enters a job into the cron schedule, without actually starting the job. If the job is already present in the schedule, this will update the schedule entry with the new configuration. Parameters: - description """ pass def descheduleCronJob(self, job): """ Removes a job from the cron schedule. The request will be denied if the job was not previously scheduled with scheduleCronJob. Parameters: - job """ pass def startCronJob(self, job): """ Starts a cron job immediately. The request will be denied if the specified job does not exist for the role account, or the job is not a cron job. Parameters: - job """ pass def restartShards(self, job, shardIds): """ Restarts a batch of shards. Parameters: - job - shardIds """ pass def killTasks(self, job, instances, message): """ Initiates a kill on tasks. Parameters: - job - instances - message """ pass def addInstances(self, key, count): """ Adds new instances with the TaskConfig of the existing instance pointed by the key. Parameters: - key - count """ pass def replaceCronTemplate(self, config): """ Replaces the template (configuration) for the existing cron job. The cron job template (configuration) must exist for the call to succeed. Parameters: - config """ pass def startJobUpdate(self, request, message): """ Starts update of the existing service job. Parameters: - request: A description of how to change the job. - message: A user-specified message to include with the induced job update state change. """ pass def pauseJobUpdate(self, key, message): """ Pauses the specified job update. Can be resumed by resumeUpdate call. Parameters: - key: The update to pause. - message: A user-specified message to include with the induced job update state change. """ pass def resumeJobUpdate(self, key, message): """ Resumes progress of a previously paused job update. Parameters: - key: The update to resume. - message: A user-specified message to include with the induced job update state change. """ pass def abortJobUpdate(self, key, message): """ Permanently aborts the job update. Does not remove the update history. Parameters: - key: The update to abort. - message: A user-specified message to include with the induced job update state change. """ pass def rollbackJobUpdate(self, key, message): """ Rollbacks the specified active job update to the initial state. Parameters: - key: The update to rollback. - message: A user-specified message to include with the induced job update state change. """ pass def pulseJobUpdate(self, key): """ Allows progress of the job update in case blockIfNoPulsesAfterMs is specified in JobUpdateSettings. Unblocks progress if the update was previously blocked. Responds with ResponseCode.INVALID_REQUEST in case an unknown update key is specified. Parameters: - key """ pass class Client(aurora.api.ReadOnlyScheduler.Client, Iface): def __init__(self, iprot, oprot=None): aurora.api.ReadOnlyScheduler.Client.__init__(self, iprot, oprot) def createJob(self, description): """ Creates a new job. The request will be denied if a job with the provided name already exists in the cluster. Parameters: - description """ self.send_createJob(description) return self.recv_createJob() def send_createJob(self, description): self._oprot.writeMessageBegin('createJob', TMessageType.CALL, self._seqid) args = createJob_args() args.description = description args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_createJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = createJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "createJob failed: unknown result") def scheduleCronJob(self, description): """ Enters a job into the cron schedule, without actually starting the job. If the job is already present in the schedule, this will update the schedule entry with the new configuration. Parameters: - description """ self.send_scheduleCronJob(description) return self.recv_scheduleCronJob() def send_scheduleCronJob(self, description): self._oprot.writeMessageBegin('scheduleCronJob', TMessageType.CALL, self._seqid) args = scheduleCronJob_args() args.description = description args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_scheduleCronJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = scheduleCronJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "scheduleCronJob failed: unknown result") def descheduleCronJob(self, job): """ Removes a job from the cron schedule. The request will be denied if the job was not previously scheduled with scheduleCronJob. Parameters: - job """ self.send_descheduleCronJob(job) return self.recv_descheduleCronJob() def send_descheduleCronJob(self, job): self._oprot.writeMessageBegin('descheduleCronJob', TMessageType.CALL, self._seqid) args = descheduleCronJob_args() args.job = job args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_descheduleCronJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = descheduleCronJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "descheduleCronJob failed: unknown result") def startCronJob(self, job): """ Starts a cron job immediately. The request will be denied if the specified job does not exist for the role account, or the job is not a cron job. Parameters: - job """ self.send_startCronJob(job) return self.recv_startCronJob() def send_startCronJob(self, job): self._oprot.writeMessageBegin('startCronJob', TMessageType.CALL, self._seqid) args = startCronJob_args() args.job = job args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_startCronJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = startCronJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "startCronJob failed: unknown result") def restartShards(self, job, shardIds): """ Restarts a batch of shards. Parameters: - job - shardIds """ self.send_restartShards(job, shardIds) return self.recv_restartShards() def send_restartShards(self, job, shardIds): self._oprot.writeMessageBegin('restartShards', TMessageType.CALL, self._seqid) args = restartShards_args() args.job = job args.shardIds = shardIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_restartShards(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = restartShards_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "restartShards failed: unknown result") def killTasks(self, job, instances, message): """ Initiates a kill on tasks. Parameters: - job - instances - message """ self.send_killTasks(job, instances, message) return self.recv_killTasks() def send_killTasks(self, job, instances, message): self._oprot.writeMessageBegin('killTasks', TMessageType.CALL, self._seqid) args = killTasks_args() args.job = job args.instances = instances args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_killTasks(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = killTasks_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "killTasks failed: unknown result") def addInstances(self, key, count): """ Adds new instances with the TaskConfig of the existing instance pointed by the key. Parameters: - key - count """ self.send_addInstances(key, count) return self.recv_addInstances() def send_addInstances(self, key, count): self._oprot.writeMessageBegin('addInstances', TMessageType.CALL, self._seqid) args = addInstances_args() args.key = key args.count = count args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_addInstances(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = addInstances_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "addInstances failed: unknown result") def replaceCronTemplate(self, config): """ Replaces the template (configuration) for the existing cron job. The cron job template (configuration) must exist for the call to succeed. Parameters: - config """ self.send_replaceCronTemplate(config) return self.recv_replaceCronTemplate() def send_replaceCronTemplate(self, config): self._oprot.writeMessageBegin('replaceCronTemplate', TMessageType.CALL, self._seqid) args = replaceCronTemplate_args() args.config = config args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_replaceCronTemplate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = replaceCronTemplate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "replaceCronTemplate failed: unknown result") def startJobUpdate(self, request, message): """ Starts update of the existing service job. Parameters: - request: A description of how to change the job. - message: A user-specified message to include with the induced job update state change. """ self.send_startJobUpdate(request, message) return self.recv_startJobUpdate() def send_startJobUpdate(self, request, message): self._oprot.writeMessageBegin('startJobUpdate', TMessageType.CALL, self._seqid) args = startJobUpdate_args() args.request = request args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_startJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = startJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "startJobUpdate failed: unknown result") def pauseJobUpdate(self, key, message): """ Pauses the specified job update. Can be resumed by resumeUpdate call. Parameters: - key: The update to pause. - message: A user-specified message to include with the induced job update state change. """ self.send_pauseJobUpdate(key, message) return self.recv_pauseJobUpdate() def send_pauseJobUpdate(self, key, message): self._oprot.writeMessageBegin('pauseJobUpdate', TMessageType.CALL, self._seqid) args = pauseJobUpdate_args() args.key = key args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_pauseJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = pauseJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "pauseJobUpdate failed: unknown result") def resumeJobUpdate(self, key, message): """ Resumes progress of a previously paused job update. Parameters: - key: The update to resume. - message: A user-specified message to include with the induced job update state change. """ self.send_resumeJobUpdate(key, message) return self.recv_resumeJobUpdate() def send_resumeJobUpdate(self, key, message): self._oprot.writeMessageBegin('resumeJobUpdate', TMessageType.CALL, self._seqid) args = resumeJobUpdate_args() args.key = key args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resumeJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resumeJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "resumeJobUpdate failed: unknown result") def abortJobUpdate(self, key, message): """ Permanently aborts the job update. Does not remove the update history. Parameters: - key: The update to abort. - message: A user-specified message to include with the induced job update state change. """ self.send_abortJobUpdate(key, message) return self.recv_abortJobUpdate() def send_abortJobUpdate(self, key, message): self._oprot.writeMessageBegin('abortJobUpdate', TMessageType.CALL, self._seqid) args = abortJobUpdate_args() args.key = key args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_abortJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = abortJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "abortJobUpdate failed: unknown result") def rollbackJobUpdate(self, key, message): """ Rollbacks the specified active job update to the initial state. Parameters: - key: The update to rollback. - message: A user-specified message to include with the induced job update state change. """ self.send_rollbackJobUpdate(key, message) return self.recv_rollbackJobUpdate() def send_rollbackJobUpdate(self, key, message): self._oprot.writeMessageBegin('rollbackJobUpdate', TMessageType.CALL, self._seqid) args = rollbackJobUpdate_args() args.key = key args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_rollbackJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = rollbackJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "rollbackJobUpdate failed: unknown result") def pulseJobUpdate(self, key): """ Allows progress of the job update in case blockIfNoPulsesAfterMs is specified in JobUpdateSettings. Unblocks progress if the update was previously blocked. Responds with ResponseCode.INVALID_REQUEST in case an unknown update key is specified. Parameters: - key """ self.send_pulseJobUpdate(key) return self.recv_pulseJobUpdate() def send_pulseJobUpdate(self, key): self._oprot.writeMessageBegin('pulseJobUpdate', TMessageType.CALL, self._seqid) args = pulseJobUpdate_args() args.key = key args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_pulseJobUpdate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = pulseJobUpdate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "pulseJobUpdate failed: unknown result") class Processor(aurora.api.ReadOnlyScheduler.Processor, Iface, TProcessor): def __init__(self, handler): aurora.api.ReadOnlyScheduler.Processor.__init__(self, handler) self._processMap["createJob"] = Processor.process_createJob self._processMap["scheduleCronJob"] = Processor.process_scheduleCronJob self._processMap["descheduleCronJob"] = Processor.process_descheduleCronJob self._processMap["startCronJob"] = Processor.process_startCronJob self._processMap["restartShards"] = Processor.process_restartShards self._processMap["killTasks"] = Processor.process_killTasks self._processMap["addInstances"] = Processor.process_addInstances self._processMap["replaceCronTemplate"] = Processor.process_replaceCronTemplate self._processMap["startJobUpdate"] = Processor.process_startJobUpdate self._processMap["pauseJobUpdate"] = Processor.process_pauseJobUpdate self._processMap["resumeJobUpdate"] = Processor.process_resumeJobUpdate self._processMap["abortJobUpdate"] = Processor.process_abortJobUpdate self._processMap["rollbackJobUpdate"] = Processor.process_rollbackJobUpdate self._processMap["pulseJobUpdate"] = Processor.process_pulseJobUpdate def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() return else: self._processMap[name](self, seqid, iprot, oprot) return True def process_createJob(self, seqid, iprot, oprot): args = createJob_args() args.read(iprot) iprot.readMessageEnd() result = createJob_result() try: result.success = self._handler.createJob(args.description) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("createJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_scheduleCronJob(self, seqid, iprot, oprot): args = scheduleCronJob_args() args.read(iprot) iprot.readMessageEnd() result = scheduleCronJob_result() try: result.success = self._handler.scheduleCronJob(args.description) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("scheduleCronJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_descheduleCronJob(self, seqid, iprot, oprot): args = descheduleCronJob_args() args.read(iprot) iprot.readMessageEnd() result = descheduleCronJob_result() try: result.success = self._handler.descheduleCronJob(args.job) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("descheduleCronJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_startCronJob(self, seqid, iprot, oprot): args = startCronJob_args() args.read(iprot) iprot.readMessageEnd() result = startCronJob_result() try: result.success = self._handler.startCronJob(args.job) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("startCronJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_restartShards(self, seqid, iprot, oprot): args = restartShards_args() args.read(iprot) iprot.readMessageEnd() result = restartShards_result() try: result.success = self._handler.restartShards(args.job, args.shardIds) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("restartShards", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_killTasks(self, seqid, iprot, oprot): args = killTasks_args() args.read(iprot) iprot.readMessageEnd() result = killTasks_result() try: result.success = self._handler.killTasks(args.job, args.instances, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("killTasks", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_addInstances(self, seqid, iprot, oprot): args = addInstances_args() args.read(iprot) iprot.readMessageEnd() result = addInstances_result() try: result.success = self._handler.addInstances(args.key, args.count) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("addInstances", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_replaceCronTemplate(self, seqid, iprot, oprot): args = replaceCronTemplate_args() args.read(iprot) iprot.readMessageEnd() result = replaceCronTemplate_result() try: result.success = self._handler.replaceCronTemplate(args.config) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("replaceCronTemplate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_startJobUpdate(self, seqid, iprot, oprot): args = startJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = startJobUpdate_result() try: result.success = self._handler.startJobUpdate(args.request, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("startJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_pauseJobUpdate(self, seqid, iprot, oprot): args = pauseJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = pauseJobUpdate_result() try: result.success = self._handler.pauseJobUpdate(args.key, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("pauseJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resumeJobUpdate(self, seqid, iprot, oprot): args = resumeJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = resumeJobUpdate_result() try: result.success = self._handler.resumeJobUpdate(args.key, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resumeJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_abortJobUpdate(self, seqid, iprot, oprot): args = abortJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = abortJobUpdate_result() try: result.success = self._handler.abortJobUpdate(args.key, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("abortJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_rollbackJobUpdate(self, seqid, iprot, oprot): args = rollbackJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = rollbackJobUpdate_result() try: result.success = self._handler.rollbackJobUpdate(args.key, args.message) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("rollbackJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_pulseJobUpdate(self, seqid, iprot, oprot): args = pulseJobUpdate_args() args.read(iprot) iprot.readMessageEnd() result = pulseJobUpdate_result() try: result.success = self._handler.pulseJobUpdate(args.key) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("pulseJobUpdate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() # HELPER FUNCTIONS AND STRUCTURES class createJob_args(object): """ Attributes: - description """ __slots__ = [ 'description', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'description', (JobConfiguration, JobConfiguration.thrift_spec), None, ), # 1 ) def __init__(self, description=None,): self.description = description def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.description = JobConfiguration() self.description.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('createJob_args') if self.description is not None: oprot.writeFieldBegin('description', TType.STRUCT, 1) self.description.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.description) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class createJob_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('createJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class scheduleCronJob_args(object): """ Attributes: - description """ __slots__ = [ 'description', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'description', (JobConfiguration, JobConfiguration.thrift_spec), None, ), # 1 ) def __init__(self, description=None,): self.description = description def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.description = JobConfiguration() self.description.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('scheduleCronJob_args') if self.description is not None: oprot.writeFieldBegin('description', TType.STRUCT, 1) self.description.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.description) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class scheduleCronJob_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('scheduleCronJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class descheduleCronJob_args(object): """ Attributes: - job """ __slots__ = [ 'job', ] thrift_spec = ( None, # 0 None, # 1 None, # 2 None, # 3 (4, TType.STRUCT, 'job', (JobKey, JobKey.thrift_spec), None, ), # 4 ) def __init__(self, job=None,): self.job = job def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.STRUCT: self.job = JobKey() self.job.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('descheduleCronJob_args') if self.job is not None: oprot.writeFieldBegin('job', TType.STRUCT, 4) self.job.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.job) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class descheduleCronJob_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('descheduleCronJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class startCronJob_args(object): """ Attributes: - job """ __slots__ = [ 'job', ] thrift_spec = ( None, # 0 None, # 1 None, # 2 None, # 3 (4, TType.STRUCT, 'job', (JobKey, JobKey.thrift_spec), None, ), # 4 ) def __init__(self, job=None,): self.job = job def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.STRUCT: self.job = JobKey() self.job.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('startCronJob_args') if self.job is not None: oprot.writeFieldBegin('job', TType.STRUCT, 4) self.job.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.job) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class startCronJob_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('startCronJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class restartShards_args(object): """ Attributes: - job - shardIds """ __slots__ = [ 'shardIds', 'job', ] thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.SET, 'shardIds', (TType.I32,None), None, ), # 3 None, # 4 (5, TType.STRUCT, 'job', (JobKey, JobKey.thrift_spec), None, ), # 5 ) def __init__(self, job=None, shardIds=None,): self.job = job self.shardIds = shardIds def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 5: if ftype == TType.STRUCT: self.job = JobKey() self.job.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.SET: self.shardIds = set() (_etype366, _size363) = iprot.readSetBegin() for _i367 in xrange(_size363): _elem368 = iprot.readI32() self.shardIds.add(_elem368) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('restartShards_args') if self.shardIds is not None: oprot.writeFieldBegin('shardIds', TType.SET, 3) oprot.writeSetBegin(TType.I32, len(self.shardIds)) for iter369 in self.shardIds: oprot.writeI32(iter369) oprot.writeSetEnd() oprot.writeFieldEnd() if self.job is not None: oprot.writeFieldBegin('job', TType.STRUCT, 5) self.job.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.job) value = (value * 31) ^ hash(self.shardIds) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class restartShards_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('restartShards_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class killTasks_args(object): """ Attributes: - job - instances - message """ __slots__ = [ 'job', 'instances', 'message', ] thrift_spec = ( None, # 0 None, # 1 None, # 2 None, # 3 (4, TType.STRUCT, 'job', (JobKey, JobKey.thrift_spec), None, ), # 4 (5, TType.SET, 'instances', (TType.I32,None), None, ), # 5 (6, TType.STRING, 'message', None, None, ), # 6 ) def __init__(self, job=None, instances=None, message=None,): self.job = job self.instances = instances self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.STRUCT: self.job = JobKey() self.job.read(iprot) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.SET: self.instances = set() (_etype373, _size370) = iprot.readSetBegin() for _i374 in xrange(_size370): _elem375 = iprot.readI32() self.instances.add(_elem375) iprot.readSetEnd() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('killTasks_args') if self.job is not None: oprot.writeFieldBegin('job', TType.STRUCT, 4) self.job.write(oprot) oprot.writeFieldEnd() if self.instances is not None: oprot.writeFieldBegin('instances', TType.SET, 5) oprot.writeSetBegin(TType.I32, len(self.instances)) for iter376 in self.instances: oprot.writeI32(iter376) oprot.writeSetEnd() oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 6) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.job) value = (value * 31) ^ hash(self.instances) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class killTasks_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('killTasks_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class addInstances_args(object): """ Attributes: - key - count """ __slots__ = [ 'key', 'count', ] thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRUCT, 'key', (InstanceKey, InstanceKey.thrift_spec), None, ), # 3 (4, TType.I32, 'count', None, None, ), # 4 ) def __init__(self, key=None, count=None,): self.key = key self.count = count def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.STRUCT: self.key = InstanceKey() self.key.read(iprot) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('addInstances_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 3) self.key.write(oprot) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 4) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) value = (value * 31) ^ hash(self.count) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class addInstances_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('addInstances_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class replaceCronTemplate_args(object): """ Attributes: - config """ __slots__ = [ 'config', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'config', (JobConfiguration, JobConfiguration.thrift_spec), None, ), # 1 ) def __init__(self, config=None,): self.config = config def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.config = JobConfiguration() self.config.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('replaceCronTemplate_args') if self.config is not None: oprot.writeFieldBegin('config', TType.STRUCT, 1) self.config.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.config) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class replaceCronTemplate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('replaceCronTemplate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class startJobUpdate_args(object): """ Attributes: - request: A description of how to change the job. - message: A user-specified message to include with the induced job update state change. """ __slots__ = [ 'request', 'message', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'request', (JobUpdateRequest, JobUpdateRequest.thrift_spec), None, ), # 1 None, # 2 (3, TType.STRING, 'message', None, None, ), # 3 ) def __init__(self, request=None, message=None,): self.request = request self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.request = JobUpdateRequest() self.request.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('startJobUpdate_args') if self.request is not None: oprot.writeFieldBegin('request', TType.STRUCT, 1) self.request.write(oprot) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 3) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.request) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class startJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('startJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class pauseJobUpdate_args(object): """ Attributes: - key: The update to pause. - message: A user-specified message to include with the induced job update state change. """ __slots__ = [ 'key', 'message', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), # 1 None, # 2 (3, TType.STRING, 'message', None, None, ), # 3 ) def __init__(self, key=None, message=None,): self.key = key self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.key = JobUpdateKey() self.key.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('pauseJobUpdate_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 1) self.key.write(oprot) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 3) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class pauseJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('pauseJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class resumeJobUpdate_args(object): """ Attributes: - key: The update to resume. - message: A user-specified message to include with the induced job update state change. """ __slots__ = [ 'key', 'message', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), # 1 None, # 2 (3, TType.STRING, 'message', None, None, ), # 3 ) def __init__(self, key=None, message=None,): self.key = key self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.key = JobUpdateKey() self.key.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('resumeJobUpdate_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 1) self.key.write(oprot) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 3) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class resumeJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('resumeJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class abortJobUpdate_args(object): """ Attributes: - key: The update to abort. - message: A user-specified message to include with the induced job update state change. """ __slots__ = [ 'key', 'message', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), # 1 None, # 2 (3, TType.STRING, 'message', None, None, ), # 3 ) def __init__(self, key=None, message=None,): self.key = key self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.key = JobUpdateKey() self.key.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('abortJobUpdate_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 1) self.key.write(oprot) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 3) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class abortJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('abortJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class rollbackJobUpdate_args(object): """ Attributes: - key: The update to rollback. - message: A user-specified message to include with the induced job update state change. """ __slots__ = [ 'key', 'message', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), # 1 (2, TType.STRING, 'message', None, None, ), # 2 ) def __init__(self, key=None, message=None,): self.key = key self.message = message def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.key = JobUpdateKey() self.key.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('rollbackJobUpdate_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 1) self.key.write(oprot) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 2) oprot.writeString(self.message.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) value = (value * 31) ^ hash(self.message) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class rollbackJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('rollbackJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class pulseJobUpdate_args(object): """ Attributes: - key """ __slots__ = [ 'key', ] thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), # 1 ) def __init__(self, key=None,): self.key = key def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.key = JobUpdateKey() self.key.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('pulseJobUpdate_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRUCT, 1) self.key.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.key) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other) class pulseJobUpdate_result(object): """ Attributes: - success """ __slots__ = [ 'success', ] thrift_spec = ( (0, TType.STRUCT, 'success', (Response, Response.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Response() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('pulseJobUpdate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) return value def __repr__(self): L = ['%s=%r' % (key, getattr(self, key)) for key in self.__slots__] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): if not isinstance(other, self.__class__): return False for attr in self.__slots__: my_val = getattr(self, attr) other_val = getattr(other, attr) if my_val != other_val: return False return True def __ne__(self, other): return not (self == other)