Beispiel #1
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, JobConfInfo struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // OUTPUT_FILE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.outputFile = iprot.readString();
              struct.setOutputFileIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
Beispiel #2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, JobConfInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.outputFile = iprot.readString();
     struct.setOutputFileIsSet(true);
   }
 }
Beispiel #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, JobConfInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetOutputFile()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetOutputFile()) {
     oprot.writeString(struct.outputFile);
   }
 }
Beispiel #4
0
  @Override
  public int compareTo(JobConfInfo other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOutputFile()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputFile, other.outputFile);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Beispiel #5
0
  public boolean equals(JobConfInfo that) {
    if (that == null) return false;

    boolean this_present_outputFile = true && this.isSetOutputFile();
    boolean that_present_outputFile = true && that.isSetOutputFile();
    if (this_present_outputFile || that_present_outputFile) {
      if (!(this_present_outputFile && that_present_outputFile)) return false;
      if (!this.outputFile.equals(that.outputFile)) return false;
    }

    return true;
  }
Beispiel #6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, JobConfInfo struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.outputFile != null) {
        oprot.writeFieldBegin(OUTPUT_FILE_FIELD_DESC);
        oprot.writeString(struct.outputFile);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Beispiel #7
0
 /** Performs a deep copy on <i>other</i>. */
 public JobConfInfo(JobConfInfo other) {
   if (other.isSetOutputFile()) {
     this.outputFile = other.outputFile;
   }
 }