Exemple #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, MkdirCmd struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetPath()) {
     optionals.set(0);
   }
   if (struct.isSetMode()) {
     optionals.set(1);
   }
   if (struct.isSetUid()) {
     optionals.set(2);
   }
   if (struct.isSetGid()) {
     optionals.set(3);
   }
   if (struct.isSetParentPartition()) {
     optionals.set(4);
   }
   if (struct.isSetPartition()) {
     optionals.set(5);
   }
   oprot.writeBitSet(optionals, 6);
   if (struct.isSetPath()) {
     oprot.writeString(struct.path);
   }
   if (struct.isSetMode()) {
     oprot.writeI32(struct.mode);
   }
   if (struct.isSetUid()) {
     oprot.writeI32(struct.uid);
   }
   if (struct.isSetGid()) {
     oprot.writeI32(struct.gid);
   }
   if (struct.isSetParentPartition()) {
     {
       oprot.writeI32(struct.parentPartition.size());
       for (byte _iter40 : struct.parentPartition) {
         oprot.writeByte(_iter40);
       }
     }
   }
   if (struct.isSetPartition()) {
     {
       oprot.writeI32(struct.partition.size());
       for (byte _iter41 : struct.partition) {
         oprot.writeByte(_iter41);
       }
     }
   }
 }
Exemple #2
0
  @Override
  public int compareTo(MkdirCmd other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGid()).compareTo(other.isSetGid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gid, other.gid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetParentPartition()).compareTo(other.isSetParentPartition());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParentPartition()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.parentPartition, other.parentPartition);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPartition()).compareTo(other.isSetPartition());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartition()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }