예제 #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);
       }
     }
   }
 }
예제 #2
0
  public boolean equals(MkdirCmd that) {
    if (that == null) return false;

    boolean this_present_path = true && this.isSetPath();
    boolean that_present_path = true && that.isSetPath();
    if (this_present_path || that_present_path) {
      if (!(this_present_path && that_present_path)) return false;
      if (!this.path.equals(that.path)) return false;
    }

    boolean this_present_mode = true;
    boolean that_present_mode = true;
    if (this_present_mode || that_present_mode) {
      if (!(this_present_mode && that_present_mode)) return false;
      if (this.mode != that.mode) return false;
    }

    boolean this_present_uid = true;
    boolean that_present_uid = true;
    if (this_present_uid || that_present_uid) {
      if (!(this_present_uid && that_present_uid)) return false;
      if (this.uid != that.uid) return false;
    }

    boolean this_present_gid = true;
    boolean that_present_gid = true;
    if (this_present_gid || that_present_gid) {
      if (!(this_present_gid && that_present_gid)) return false;
      if (this.gid != that.gid) return false;
    }

    boolean this_present_parentPartition = true && this.isSetParentPartition();
    boolean that_present_parentPartition = true && that.isSetParentPartition();
    if (this_present_parentPartition || that_present_parentPartition) {
      if (!(this_present_parentPartition && that_present_parentPartition)) return false;
      if (!this.parentPartition.equals(that.parentPartition)) return false;
    }

    boolean this_present_partition = true && this.isSetPartition();
    boolean that_present_partition = true && that.isSetPartition();
    if (this_present_partition || that_present_partition) {
      if (!(this_present_partition && that_present_partition)) return false;
      if (!this.partition.equals(that.partition)) return false;
    }

    return true;
  }
예제 #3
0
 /** Performs a deep copy on <i>other</i>. */
 public MkdirCmd(MkdirCmd other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetPath()) {
     this.path = other.path;
   }
   this.mode = other.mode;
   this.uid = other.uid;
   this.gid = other.gid;
   if (other.isSetParentPartition()) {
     Set<Byte> __this__parentPartition = new HashSet<Byte>(other.parentPartition);
     this.parentPartition = __this__parentPartition;
   }
   if (other.isSetPartition()) {
     Set<Byte> __this__partition = new HashSet<Byte>(other.partition);
     this.partition = __this__partition;
   }
 }
예제 #4
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;
  }