public ThriftJobStatus( ThriftJobID jobID, double mapProgress, double reduceProgress, double cleanupProgress, double setupProgress, ThriftJobState runState, long startTime, String user, ThriftJobPriority priority, String schedulingInfo) { this(); this.jobID = jobID; this.mapProgress = mapProgress; setMapProgressIsSet(true); this.reduceProgress = reduceProgress; setReduceProgressIsSet(true); this.cleanupProgress = cleanupProgress; setCleanupProgressIsSet(true); this.setupProgress = setupProgress; setSetupProgressIsSet(true); this.runState = runState; this.startTime = startTime; setStartTimeIsSet(true); this.user = user; this.priority = priority; this.schedulingInfo = schedulingInfo; }
@Override public void clear() { this.jobID = null; setMapProgressIsSet(false); this.mapProgress = 0.0; setReduceProgressIsSet(false); this.reduceProgress = 0.0; setCleanupProgressIsSet(false); this.cleanupProgress = 0.0; setSetupProgressIsSet(false); this.setupProgress = 0.0; this.runState = null; setStartTimeIsSet(false); this.startTime = 0; this.user = null; this.priority = null; this.schedulingInfo = null; }
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 1: // JOB_ID if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.jobID = new ThriftJobID(); this.jobID.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // MAP_PROGRESS if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { this.mapProgress = iprot.readDouble(); setMapProgressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // REDUCE_PROGRESS if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { this.reduceProgress = iprot.readDouble(); setReduceProgressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CLEANUP_PROGRESS if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { this.cleanupProgress = iprot.readDouble(); setCleanupProgressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // SETUP_PROGRESS if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { this.setupProgress = iprot.readDouble(); setSetupProgressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // RUN_STATE if (field.type == org.apache.thrift.protocol.TType.I32) { this.runState = ThriftJobState.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // START_TIME if (field.type == org.apache.thrift.protocol.TType.I64) { this.startTime = iprot.readI64(); setStartTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 8: // USER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 9: // PRIORITY if (field.type == org.apache.thrift.protocol.TType.I32) { this.priority = ThriftJobPriority.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 10: // SCHEDULING_INFO if (field.type == org.apache.thrift.protocol.TType.STRING) { this.schedulingInfo = iprot.readString(); } 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 ThriftJobStatus setMapProgress(double mapProgress) { this.mapProgress = mapProgress; setMapProgressIsSet(true); return this; }