|
|
@@ -70,6 +70,14 @@ public class Jobtracker {
|
|
|
*/
|
|
|
public ThriftJobList getCompletedJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx) throws org.apache.thrift.TException;
|
|
|
|
|
|
+ /**
|
|
|
+ * Get a list of retired jobs
|
|
|
+ *
|
|
|
+ * @param ctx
|
|
|
+ * @param state
|
|
|
+ */
|
|
|
+ public ThriftJobList getRetiredJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state) throws org.apache.thrift.TException;
|
|
|
+
|
|
|
/**
|
|
|
* Get a list of failed (due to error, not killed) jobs
|
|
|
*
|
|
|
@@ -231,6 +239,8 @@ public class Jobtracker {
|
|
|
|
|
|
public void getCompletedJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCompletedJobs_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
|
|
|
+ public void getRetiredJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRetiredJobs_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
+
|
|
|
public void getFailedJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFailedJobs_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
|
|
|
public void getKilledJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getKilledJobs_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
@@ -434,6 +444,30 @@ public class Jobtracker {
|
|
|
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCompletedJobs failed: unknown result");
|
|
|
}
|
|
|
|
|
|
+ public ThriftJobList getRetiredJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state) throws org.apache.thrift.TException
|
|
|
+ {
|
|
|
+ send_getRetiredJobs(ctx, state);
|
|
|
+ return recv_getRetiredJobs();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void send_getRetiredJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state) throws org.apache.thrift.TException
|
|
|
+ {
|
|
|
+ getRetiredJobs_args args = new getRetiredJobs_args();
|
|
|
+ args.setCtx(ctx);
|
|
|
+ args.setState(state);
|
|
|
+ sendBase("getRetiredJobs", args);
|
|
|
+ }
|
|
|
+
|
|
|
+ public ThriftJobList recv_getRetiredJobs() throws org.apache.thrift.TException
|
|
|
+ {
|
|
|
+ getRetiredJobs_result result = new getRetiredJobs_result();
|
|
|
+ receiveBase(result, "getRetiredJobs");
|
|
|
+ if (result.isSetSuccess()) {
|
|
|
+ return result.success;
|
|
|
+ }
|
|
|
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRetiredJobs failed: unknown result");
|
|
|
+ }
|
|
|
+
|
|
|
public ThriftJobList getFailedJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx) throws org.apache.thrift.TException
|
|
|
{
|
|
|
send_getFailedJobs(ctx);
|
|
|
@@ -1114,6 +1148,41 @@ public class Jobtracker {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void getRetiredJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state, org.apache.thrift.async.AsyncMethodCallback<getRetiredJobs_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
+ checkReady();
|
|
|
+ getRetiredJobs_call method_call = new getRetiredJobs_call(ctx, state, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
+ this.___currentMethod = method_call;
|
|
|
+ ___manager.call(method_call);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class getRetiredJobs_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
+ private org.apache.hadoop.thriftfs.api.RequestContext ctx;
|
|
|
+ private ThriftJobState state;
|
|
|
+ public getRetiredJobs_call(org.apache.hadoop.thriftfs.api.RequestContext ctx, ThriftJobState state, org.apache.thrift.async.AsyncMethodCallback<getRetiredJobs_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
+ super(client, protocolFactory, transport, resultHandler, false);
|
|
|
+ this.ctx = ctx;
|
|
|
+ this.state = state;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRetiredJobs", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
+ getRetiredJobs_args args = new getRetiredJobs_args();
|
|
|
+ args.setCtx(ctx);
|
|
|
+ args.setState(state);
|
|
|
+ args.write(prot);
|
|
|
+ prot.writeMessageEnd();
|
|
|
+ }
|
|
|
+
|
|
|
+ public ThriftJobList getResult() throws org.apache.thrift.TException {
|
|
|
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
+ throw new IllegalStateException("Method call not finished!");
|
|
|
+ }
|
|
|
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
+ return (new Client(prot)).recv_getRetiredJobs();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void getFailedJobs(org.apache.hadoop.thriftfs.api.RequestContext ctx, org.apache.thrift.async.AsyncMethodCallback<getFailedJobs_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
checkReady();
|
|
|
getFailedJobs_call method_call = new getFailedJobs_call(ctx, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
@@ -1760,6 +1829,7 @@ public class Jobtracker {
|
|
|
processMap.put("getJob", new getJob());
|
|
|
processMap.put("getRunningJobs", new getRunningJobs());
|
|
|
processMap.put("getCompletedJobs", new getCompletedJobs());
|
|
|
+ processMap.put("getRetiredJobs", new getRetiredJobs());
|
|
|
processMap.put("getFailedJobs", new getFailedJobs());
|
|
|
processMap.put("getKilledJobs", new getKilledJobs());
|
|
|
processMap.put("getAllJobs", new getAllJobs());
|
|
|
@@ -1885,6 +1955,22 @@ public class Jobtracker {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private static class getRetiredJobs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRetiredJobs_args> {
|
|
|
+ public getRetiredJobs() {
|
|
|
+ super("getRetiredJobs");
|
|
|
+ }
|
|
|
+
|
|
|
+ protected getRetiredJobs_args getEmptyArgsInstance() {
|
|
|
+ return new getRetiredJobs_args();
|
|
|
+ }
|
|
|
+
|
|
|
+ protected getRetiredJobs_result getResult(I iface, getRetiredJobs_args args) throws org.apache.thrift.TException {
|
|
|
+ getRetiredJobs_result result = new getRetiredJobs_result();
|
|
|
+ result.success = iface.getRetiredJobs(args.ctx, args.state);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private static class getFailedJobs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFailedJobs_args> {
|
|
|
public getFailedJobs() {
|
|
|
super("getFailedJobs");
|
|
|
@@ -6063,6 +6149,706 @@ public class Jobtracker {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static class getRetiredJobs_args implements org.apache.thrift.TBase<getRetiredJobs_args, getRetiredJobs_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRetiredJobs_args");
|
|
|
+
|
|
|
+ private static final org.apache.thrift.protocol.TField CTX_FIELD_DESC = new org.apache.thrift.protocol.TField("ctx", org.apache.thrift.protocol.TType.STRUCT, (short)10);
|
|
|
+ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)1);
|
|
|
+
|
|
|
+ public org.apache.hadoop.thriftfs.api.RequestContext ctx; // required
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @see ThriftJobState
|
|
|
+ */
|
|
|
+ public ThriftJobState state; // required
|
|
|
+
|
|
|
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
+ CTX((short)10, "ctx"),
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @see ThriftJobState
|
|
|
+ */
|
|
|
+ STATE((short)1, "state");
|
|
|
+
|
|
|
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
+
|
|
|
+ static {
|
|
|
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
+ byName.put(field.getFieldName(), field);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByThriftId(int fieldId) {
|
|
|
+ switch(fieldId) {
|
|
|
+ case 10: // CTX
|
|
|
+ return CTX;
|
|
|
+ case 1: // STATE
|
|
|
+ return STATE;
|
|
|
+ default:
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
+ * if it is not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
+ _Fields fields = findByThriftId(fieldId);
|
|
|
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
+ return fields;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches name, or null if its not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByName(String name) {
|
|
|
+ return byName.get(name);
|
|
|
+ }
|
|
|
+
|
|
|
+ private final short _thriftId;
|
|
|
+ private final String _fieldName;
|
|
|
+
|
|
|
+ _Fields(short thriftId, String fieldName) {
|
|
|
+ _thriftId = thriftId;
|
|
|
+ _fieldName = fieldName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public short getThriftFieldId() {
|
|
|
+ return _thriftId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getFieldName() {
|
|
|
+ return _fieldName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // isset id assignments
|
|
|
+
|
|
|
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
+ static {
|
|
|
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
+ tmpMap.put(_Fields.CTX, new org.apache.thrift.meta_data.FieldMetaData("ctx", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.hadoop.thriftfs.api.RequestContext.class)));
|
|
|
+ tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ThriftJobState.class)));
|
|
|
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRetiredJobs_args.class, metaDataMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_args() {
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_args(
|
|
|
+ org.apache.hadoop.thriftfs.api.RequestContext ctx,
|
|
|
+ ThriftJobState state)
|
|
|
+ {
|
|
|
+ this();
|
|
|
+ this.ctx = ctx;
|
|
|
+ this.state = state;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Performs a deep copy on <i>other</i>.
|
|
|
+ */
|
|
|
+ public getRetiredJobs_args(getRetiredJobs_args other) {
|
|
|
+ if (other.isSetCtx()) {
|
|
|
+ this.ctx = new org.apache.hadoop.thriftfs.api.RequestContext(other.ctx);
|
|
|
+ }
|
|
|
+ if (other.isSetState()) {
|
|
|
+ this.state = other.state;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_args deepCopy() {
|
|
|
+ return new getRetiredJobs_args(this);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void clear() {
|
|
|
+ this.ctx = null;
|
|
|
+ this.state = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public org.apache.hadoop.thriftfs.api.RequestContext getCtx() {
|
|
|
+ return this.ctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_args setCtx(org.apache.hadoop.thriftfs.api.RequestContext ctx) {
|
|
|
+ this.ctx = ctx;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void unsetCtx() {
|
|
|
+ this.ctx = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Returns true if field ctx is set (has been assigned a value) and false otherwise */
|
|
|
+ public boolean isSetCtx() {
|
|
|
+ return this.ctx != null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCtxIsSet(boolean value) {
|
|
|
+ if (!value) {
|
|
|
+ this.ctx = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @see ThriftJobState
|
|
|
+ */
|
|
|
+ public ThriftJobState getState() {
|
|
|
+ return this.state;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @see ThriftJobState
|
|
|
+ */
|
|
|
+ public getRetiredJobs_args setState(ThriftJobState state) {
|
|
|
+ this.state = state;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void unsetState() {
|
|
|
+ this.state = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Returns true if field state is set (has been assigned a value) and false otherwise */
|
|
|
+ public boolean isSetState() {
|
|
|
+ return this.state != null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStateIsSet(boolean value) {
|
|
|
+ if (!value) {
|
|
|
+ this.state = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setFieldValue(_Fields field, Object value) {
|
|
|
+ switch (field) {
|
|
|
+ case CTX:
|
|
|
+ if (value == null) {
|
|
|
+ unsetCtx();
|
|
|
+ } else {
|
|
|
+ setCtx((org.apache.hadoop.thriftfs.api.RequestContext)value);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case STATE:
|
|
|
+ if (value == null) {
|
|
|
+ unsetState();
|
|
|
+ } else {
|
|
|
+ setState((ThriftJobState)value);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getFieldValue(_Fields field) {
|
|
|
+ switch (field) {
|
|
|
+ case CTX:
|
|
|
+ return getCtx();
|
|
|
+
|
|
|
+ case STATE:
|
|
|
+ return getState();
|
|
|
+
|
|
|
+ }
|
|
|
+ throw new IllegalStateException();
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
+ public boolean isSet(_Fields field) {
|
|
|
+ if (field == null) {
|
|
|
+ throw new IllegalArgumentException();
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (field) {
|
|
|
+ case CTX:
|
|
|
+ return isSetCtx();
|
|
|
+ case STATE:
|
|
|
+ return isSetState();
|
|
|
+ }
|
|
|
+ throw new IllegalStateException();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (that == null)
|
|
|
+ return false;
|
|
|
+ if (that instanceof getRetiredJobs_args)
|
|
|
+ return this.equals((getRetiredJobs_args)that);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean equals(getRetiredJobs_args that) {
|
|
|
+ if (that == null)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ boolean this_present_ctx = true && this.isSetCtx();
|
|
|
+ boolean that_present_ctx = true && that.isSetCtx();
|
|
|
+ if (this_present_ctx || that_present_ctx) {
|
|
|
+ if (!(this_present_ctx && that_present_ctx))
|
|
|
+ return false;
|
|
|
+ if (!this.ctx.equals(that.ctx))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean this_present_state = true && this.isSetState();
|
|
|
+ boolean that_present_state = true && that.isSetState();
|
|
|
+ if (this_present_state || that_present_state) {
|
|
|
+ if (!(this_present_state && that_present_state))
|
|
|
+ return false;
|
|
|
+ if (!this.state.equals(that.state))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int compareTo(getRetiredJobs_args other) {
|
|
|
+ if (!getClass().equals(other.getClass())) {
|
|
|
+ return getClass().getName().compareTo(other.getClass().getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ int lastComparison = 0;
|
|
|
+ getRetiredJobs_args typedOther = (getRetiredJobs_args)other;
|
|
|
+
|
|
|
+ lastComparison = Boolean.valueOf(isSetCtx()).compareTo(typedOther.isSetCtx());
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ if (isSetCtx()) {
|
|
|
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ctx, typedOther.ctx);
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ if (isSetState()) {
|
|
|
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public _Fields fieldForId(int fieldId) {
|
|
|
+ return _Fields.findByThriftId(fieldId);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
+ org.apache.thrift.protocol.TField field;
|
|
|
+ iprot.readStructBegin();
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ field = iprot.readFieldBegin();
|
|
|
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (field.id) {
|
|
|
+ case 10: // CTX
|
|
|
+ if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
+ this.ctx = new org.apache.hadoop.thriftfs.api.RequestContext();
|
|
|
+ this.ctx.read(iprot);
|
|
|
+ } else {
|
|
|
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1: // STATE
|
|
|
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
+ this.state = ThriftJobState.findByValue(iprot.readI32());
|
|
|
+ } else {
|
|
|
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
+ }
|
|
|
+ iprot.readFieldEnd();
|
|
|
+ }
|
|
|
+ iprot.readStructEnd();
|
|
|
+
|
|
|
+ // check for required fields of primitive type, which can't be checked in the validate method
|
|
|
+ validate();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
+ validate();
|
|
|
+
|
|
|
+ oprot.writeStructBegin(STRUCT_DESC);
|
|
|
+ if (this.state != null) {
|
|
|
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
|
|
|
+ oprot.writeI32(this.state.getValue());
|
|
|
+ oprot.writeFieldEnd();
|
|
|
+ }
|
|
|
+ if (this.ctx != null) {
|
|
|
+ oprot.writeFieldBegin(CTX_FIELD_DESC);
|
|
|
+ this.ctx.write(oprot);
|
|
|
+ oprot.writeFieldEnd();
|
|
|
+ }
|
|
|
+ oprot.writeFieldStop();
|
|
|
+ oprot.writeStructEnd();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ StringBuilder sb = new StringBuilder("getRetiredJobs_args(");
|
|
|
+ boolean first = true;
|
|
|
+
|
|
|
+ sb.append("ctx:");
|
|
|
+ if (this.ctx == null) {
|
|
|
+ sb.append("null");
|
|
|
+ } else {
|
|
|
+ sb.append(this.ctx);
|
|
|
+ }
|
|
|
+ first = false;
|
|
|
+ if (!first) sb.append(", ");
|
|
|
+ sb.append("state:");
|
|
|
+ if (this.state == null) {
|
|
|
+ sb.append("null");
|
|
|
+ } else {
|
|
|
+ sb.append(this.state);
|
|
|
+ }
|
|
|
+ first = false;
|
|
|
+ sb.append(")");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void validate() throws org.apache.thrift.TException {
|
|
|
+ // check for required fields
|
|
|
+ }
|
|
|
+
|
|
|
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
+ try {
|
|
|
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
+ } catch (org.apache.thrift.TException te) {
|
|
|
+ throw new java.io.IOException(te);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
+ try {
|
|
|
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
+ } catch (org.apache.thrift.TException te) {
|
|
|
+ throw new java.io.IOException(te);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class getRetiredJobs_result implements org.apache.thrift.TBase<getRetiredJobs_result, getRetiredJobs_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRetiredJobs_result");
|
|
|
+
|
|
|
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
|
|
|
+
|
|
|
+ public ThriftJobList success; // required
|
|
|
+
|
|
|
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
+ SUCCESS((short)0, "success");
|
|
|
+
|
|
|
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
+
|
|
|
+ static {
|
|
|
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
+ byName.put(field.getFieldName(), field);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByThriftId(int fieldId) {
|
|
|
+ switch(fieldId) {
|
|
|
+ case 0: // SUCCESS
|
|
|
+ return SUCCESS;
|
|
|
+ default:
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
+ * if it is not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
+ _Fields fields = findByThriftId(fieldId);
|
|
|
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
+ return fields;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Find the _Fields constant that matches name, or null if its not found.
|
|
|
+ */
|
|
|
+ public static _Fields findByName(String name) {
|
|
|
+ return byName.get(name);
|
|
|
+ }
|
|
|
+
|
|
|
+ private final short _thriftId;
|
|
|
+ private final String _fieldName;
|
|
|
+
|
|
|
+ _Fields(short thriftId, String fieldName) {
|
|
|
+ _thriftId = thriftId;
|
|
|
+ _fieldName = fieldName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public short getThriftFieldId() {
|
|
|
+ return _thriftId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getFieldName() {
|
|
|
+ return _fieldName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // isset id assignments
|
|
|
+
|
|
|
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
+ static {
|
|
|
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftJobList.class)));
|
|
|
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRetiredJobs_result.class, metaDataMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_result() {
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_result(
|
|
|
+ ThriftJobList success)
|
|
|
+ {
|
|
|
+ this();
|
|
|
+ this.success = success;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Performs a deep copy on <i>other</i>.
|
|
|
+ */
|
|
|
+ public getRetiredJobs_result(getRetiredJobs_result other) {
|
|
|
+ if (other.isSetSuccess()) {
|
|
|
+ this.success = new ThriftJobList(other.success);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_result deepCopy() {
|
|
|
+ return new getRetiredJobs_result(this);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void clear() {
|
|
|
+ this.success = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public ThriftJobList getSuccess() {
|
|
|
+ return this.success;
|
|
|
+ }
|
|
|
+
|
|
|
+ public getRetiredJobs_result setSuccess(ThriftJobList success) {
|
|
|
+ this.success = success;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void unsetSuccess() {
|
|
|
+ this.success = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
+ public boolean isSetSuccess() {
|
|
|
+ return this.success != null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSuccessIsSet(boolean value) {
|
|
|
+ if (!value) {
|
|
|
+ this.success = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setFieldValue(_Fields field, Object value) {
|
|
|
+ switch (field) {
|
|
|
+ case SUCCESS:
|
|
|
+ if (value == null) {
|
|
|
+ unsetSuccess();
|
|
|
+ } else {
|
|
|
+ setSuccess((ThriftJobList)value);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getFieldValue(_Fields field) {
|
|
|
+ switch (field) {
|
|
|
+ case SUCCESS:
|
|
|
+ return getSuccess();
|
|
|
+
|
|
|
+ }
|
|
|
+ throw new IllegalStateException();
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
+ public boolean isSet(_Fields field) {
|
|
|
+ if (field == null) {
|
|
|
+ throw new IllegalArgumentException();
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (field) {
|
|
|
+ case SUCCESS:
|
|
|
+ return isSetSuccess();
|
|
|
+ }
|
|
|
+ throw new IllegalStateException();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (that == null)
|
|
|
+ return false;
|
|
|
+ if (that instanceof getRetiredJobs_result)
|
|
|
+ return this.equals((getRetiredJobs_result)that);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean equals(getRetiredJobs_result that) {
|
|
|
+ if (that == null)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ boolean this_present_success = true && this.isSetSuccess();
|
|
|
+ boolean that_present_success = true && that.isSetSuccess();
|
|
|
+ if (this_present_success || that_present_success) {
|
|
|
+ if (!(this_present_success && that_present_success))
|
|
|
+ return false;
|
|
|
+ if (!this.success.equals(that.success))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int compareTo(getRetiredJobs_result other) {
|
|
|
+ if (!getClass().equals(other.getClass())) {
|
|
|
+ return getClass().getName().compareTo(other.getClass().getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ int lastComparison = 0;
|
|
|
+ getRetiredJobs_result typedOther = (getRetiredJobs_result)other;
|
|
|
+
|
|
|
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ if (isSetSuccess()) {
|
|
|
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
+ if (lastComparison != 0) {
|
|
|
+ return lastComparison;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public _Fields fieldForId(int fieldId) {
|
|
|
+ return _Fields.findByThriftId(fieldId);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
+ org.apache.thrift.protocol.TField field;
|
|
|
+ iprot.readStructBegin();
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ field = iprot.readFieldBegin();
|
|
|
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (field.id) {
|
|
|
+ case 0: // SUCCESS
|
|
|
+ if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
+ this.success = new ThriftJobList();
|
|
|
+ this.success.read(iprot);
|
|
|
+ } else {
|
|
|
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
+ }
|
|
|
+ iprot.readFieldEnd();
|
|
|
+ }
|
|
|
+ iprot.readStructEnd();
|
|
|
+
|
|
|
+ // check for required fields of primitive type, which can't be checked in the validate method
|
|
|
+ validate();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
+ oprot.writeStructBegin(STRUCT_DESC);
|
|
|
+
|
|
|
+ if (this.isSetSuccess()) {
|
|
|
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
+ this.success.write(oprot);
|
|
|
+ oprot.writeFieldEnd();
|
|
|
+ }
|
|
|
+ oprot.writeFieldStop();
|
|
|
+ oprot.writeStructEnd();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ StringBuilder sb = new StringBuilder("getRetiredJobs_result(");
|
|
|
+ boolean first = true;
|
|
|
+
|
|
|
+ sb.append("success:");
|
|
|
+ if (this.success == null) {
|
|
|
+ sb.append("null");
|
|
|
+ } else {
|
|
|
+ sb.append(this.success);
|
|
|
+ }
|
|
|
+ first = false;
|
|
|
+ sb.append(")");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void validate() throws org.apache.thrift.TException {
|
|
|
+ // check for required fields
|
|
|
+ }
|
|
|
+
|
|
|
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
+ try {
|
|
|
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
+ } catch (org.apache.thrift.TException te) {
|
|
|
+ throw new java.io.IOException(te);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
+ try {
|
|
|
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
+ } catch (org.apache.thrift.TException te) {
|
|
|
+ throw new java.io.IOException(te);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public static class getFailedJobs_args implements org.apache.thrift.TBase<getFailedJobs_args, getFailedJobs_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFailedJobs_args");
|
|
|
|