Beispiel #1
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, MkdirCmd struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.path != null) {
        oprot.writeFieldBegin(PATH_FIELD_DESC);
        oprot.writeString(struct.path);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MODE_FIELD_DESC);
      oprot.writeI32(struct.mode);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(UID_FIELD_DESC);
      oprot.writeI32(struct.uid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(GID_FIELD_DESC);
      oprot.writeI32(struct.gid);
      oprot.writeFieldEnd();
      if (struct.parentPartition != null) {
        oprot.writeFieldBegin(PARENT_PARTITION_FIELD_DESC);
        {
          oprot.writeSetBegin(
              new org.apache.thrift.protocol.TSet(
                  org.apache.thrift.protocol.TType.BYTE, struct.parentPartition.size()));
          for (byte _iter38 : struct.parentPartition) {
            oprot.writeByte(_iter38);
          }
          oprot.writeSetEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.partition != null) {
        oprot.writeFieldBegin(PARTITION_FIELD_DESC);
        {
          oprot.writeSetBegin(
              new org.apache.thrift.protocol.TSet(
                  org.apache.thrift.protocol.TType.BYTE, struct.partition.size()));
          for (byte _iter39 : struct.partition) {
            oprot.writeByte(_iter39);
          }
          oprot.writeSetEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Beispiel #2
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, FileHandle struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(struct.id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(FLAGS_FIELD_DESC);
      oprot.writeI32(struct.flags);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PARTITION_FIELD_DESC);
      oprot.writeByte(struct.partition);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
 public void writeByte(byte b) throws TException {
   delegate.writeByte(b);
 }