Ejemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TRowSet struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeI64(struct.startRowOffset);
   {
     oprot.writeI32(struct.rows.size());
     for (TRow _iter126 : struct.rows) {
       _iter126.write(oprot);
     }
   }
   BitSet optionals = new BitSet();
   if (struct.isSetColumns()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetColumns()) {
     {
       oprot.writeI32(struct.columns.size());
       for (TColumn _iter127 : struct.columns) {
         _iter127.write(oprot);
       }
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeBinary(struct.row);
   BitSet optionals = new BitSet();
   if (struct.isSetColumns()) {
     optionals.set(0);
   }
   if (struct.isSetTimestamp()) {
     optionals.set(1);
   }
   if (struct.isSetDeleteType()) {
     optionals.set(2);
   }
   if (struct.isSetWriteToWal()) {
     optionals.set(3);
   }
   if (struct.isSetAttributes()) {
     optionals.set(4);
   }
   if (struct.isSetDurability()) {
     optionals.set(5);
   }
   oprot.writeBitSet(optionals, 6);
   if (struct.isSetColumns()) {
     {
       oprot.writeI32(struct.columns.size());
       for (TColumn _iter53 : struct.columns) {
         _iter53.write(oprot);
       }
     }
   }
   if (struct.isSetTimestamp()) {
     oprot.writeI64(struct.timestamp);
   }
   if (struct.isSetDeleteType()) {
     oprot.writeI32(struct.deleteType.getValue());
   }
   if (struct.isSetWriteToWal()) {
     oprot.writeBool(struct.writeToWal);
   }
   if (struct.isSetAttributes()) {
     {
       oprot.writeI32(struct.attributes.size());
       for (Map.Entry<ByteBuffer, ByteBuffer> _iter54 : struct.attributes.entrySet()) {
         oprot.writeBinary(_iter54.getKey());
         oprot.writeBinary(_iter54.getValue());
       }
     }
   }
   if (struct.isSetDurability()) {
     oprot.writeI32(struct.durability.getValue());
   }
 }
Ejemplo n.º 3
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TRowSet struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(START_ROW_OFFSET_FIELD_DESC);
      oprot.writeI64(struct.startRowOffset);
      oprot.writeFieldEnd();
      if (struct.rows != null) {
        oprot.writeFieldBegin(ROWS_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.rows.size()));
          for (TRow _iter124 : struct.rows) {
            _iter124.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.columns != null) {
        if (struct.isSetColumns()) {
          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
            for (TColumn _iter125 : struct.columns) {
              _iter125.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.binaryColumns != null) {
        if (struct.isSetBinaryColumns()) {
          oprot.writeFieldBegin(BINARY_COLUMNS_FIELD_DESC);
          oprot.writeBinary(struct.binaryColumns);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetColumnCount()) {
        oprot.writeFieldBegin(COLUMN_COUNT_FIELD_DESC);
        oprot.writeI32(struct.columnCount);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Ejemplo n.º 4
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TGet struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.row != null) {
        oprot.writeFieldBegin(ROW_FIELD_DESC);
        oprot.writeBinary(struct.row);
        oprot.writeFieldEnd();
      }
      if (struct.columns != null) {
        if (struct.isSetColumns()) {
          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
            for (TColumn _iter11 : struct.columns) {
              _iter11.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTimestamp()) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeI64(struct.timestamp);
        oprot.writeFieldEnd();
      }
      if (struct.timeRange != null) {
        if (struct.isSetTimeRange()) {
          oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
          struct.timeRange.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetMaxVersions()) {
        oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
        oprot.writeI32(struct.maxVersions);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Ejemplo n.º 5
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TGet struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeBinary(struct.row);
   BitSet optionals = new BitSet();
   if (struct.isSetColumns()) {
     optionals.set(0);
   }
   if (struct.isSetTimestamp()) {
     optionals.set(1);
   }
   if (struct.isSetTimeRange()) {
     optionals.set(2);
   }
   if (struct.isSetMaxVersions()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetColumns()) {
     {
       oprot.writeI32(struct.columns.size());
       for (TColumn _iter12 : struct.columns) {
         _iter12.write(oprot);
       }
     }
   }
   if (struct.isSetTimestamp()) {
     oprot.writeI64(struct.timestamp);
   }
   if (struct.isSetTimeRange()) {
     struct.timeRange.write(oprot);
   }
   if (struct.isSetMaxVersions()) {
     oprot.writeI32(struct.maxVersions);
   }
 }
Ejemplo n.º 6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TDelete struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.row != null) {
        oprot.writeFieldBegin(ROW_FIELD_DESC);
        oprot.writeBinary(struct.row);
        oprot.writeFieldEnd();
      }
      if (struct.columns != null) {
        if (struct.isSetColumns()) {
          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
            for (TColumn _iter51 : struct.columns) {
              _iter51.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTimestamp()) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeI64(struct.timestamp);
        oprot.writeFieldEnd();
      }
      if (struct.deleteType != null) {
        if (struct.isSetDeleteType()) {
          oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
          oprot.writeI32(struct.deleteType.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetWriteToWal()) {
        oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
        oprot.writeBool(struct.writeToWal);
        oprot.writeFieldEnd();
      }
      if (struct.attributes != null) {
        if (struct.isSetAttributes()) {
          oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
          {
            oprot.writeMapBegin(
                new org.apache.thrift.protocol.TMap(
                    org.apache.thrift.protocol.TType.STRING,
                    org.apache.thrift.protocol.TType.STRING,
                    struct.attributes.size()));
            for (Map.Entry<ByteBuffer, ByteBuffer> _iter52 : struct.attributes.entrySet()) {
              oprot.writeBinary(_iter52.getKey());
              oprot.writeBinary(_iter52.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.durability != null) {
        if (struct.isSetDurability()) {
          oprot.writeFieldBegin(DURABILITY_FIELD_DESC);
          oprot.writeI32(struct.durability.getValue());
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }