@Override public void serialize(Object o, ObjectInspector oi, TProtocol oprot) throws TException, SerDeException, NoSuchFieldException, IllegalAccessException { ShortObjectInspector poi = (ShortObjectInspector) oi; oprot.writeI16(poi.get(o)); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TI16Value struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeI16(struct.value); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Decimal struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.unscaled != null) { oprot.writeFieldBegin(UNSCALED_FIELD_DESC); oprot.writeBinary(struct.unscaled); oprot.writeFieldEnd(); } oprot.writeFieldBegin(SCALE_FIELD_DESC); oprot.writeI16(struct.scale); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TI16Column struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.values != null) { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I16, struct.values.size())); for (short _iter73 : struct.values) { oprot.writeI16(_iter73); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.nulls != null) { oprot.writeFieldBegin(NULLS_FIELD_DESC); oprot.writeBinary(struct.nulls); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
oprot.writeI16(struct.maxParts); oprot.writeFieldEnd();
public void write(org.apache.thrift.protocol.TProtocol oprot, TFetchResultsReq struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.operationHandle != null) { oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC); struct.operationHandle.write(oprot); oprot.writeFieldEnd(); } if (struct.orientation != null) { oprot.writeFieldBegin(ORIENTATION_FIELD_DESC); oprot.writeI32(struct.orientation.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_ROWS_FIELD_DESC); oprot.writeI64(struct.maxRows); oprot.writeFieldEnd(); if (struct.isSetFetchType()) { oprot.writeFieldBegin(FETCH_TYPE_FIELD_DESC); oprot.writeI16(struct.fetchType); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
headerProtocol.writeI16(magic); headerProtocol.writeI32(Integer.MAX_VALUE); headerProtocol.writeI16(Short.MAX_VALUE); headerProtocol.writeByte(version); headerProtocol.writeString(serviceName); headerProtocol.getTransport().flush(); out.writeI16(magic); out.writeI32(bos.size() + header.size()); out.writeI16((short) (0xffff & header.size())); out.writeByte(version); out.writeString(serviceName);
headerProtocol.writeI16(magic); headerProtocol.writeI32(Integer.MAX_VALUE); headerProtocol.writeI16(Short.MAX_VALUE); headerProtocol.writeByte(version); headerProtocol.writeString(serviceName); headerProtocol.getTransport().flush(); out.writeI16(magic); out.writeI32(bos.size() + header.size()); out.writeI16((short) (0xffff & header.size())); out.writeByte(version); out.writeString(serviceName);
case SMALL_INT_VALUE: Short smallIntValue = (Short)value_; oprot.writeI16(smallIntValue); return; case INTEGER_BITMASK:
case SMALL_INT_VALUE: Short smallIntValue = (Short)value_; oprot.writeI16(smallIntValue); return; case INTEGER_BITMASK:
oprot.writeI16(struct.dfsReplication); oprot.writeFieldEnd();
oprot.writeI16(struct.my_16bit_int); oprot.writeFieldEnd();
oprot.writeI16(_iter10);
oprot.writeI16(_iter16);
public void writeI16(short i) throws TException { concreteProtocol.writeI16(i); }
oprot.writeFieldEnd(); oprot.writeFieldBegin(I16_VAL_FIELD_DESC); oprot.writeI16(struct.i16Val); oprot.writeFieldEnd(); oprot.writeFieldBegin(I32_VAL_FIELD_DESC);
oprot.writeFieldEnd(); oprot.writeFieldBegin(I16_VAL_FIELD_DESC); oprot.writeI16(struct.i16Val); oprot.writeFieldEnd(); oprot.writeFieldBegin(I32_VAL_FIELD_DESC);
@Override public void write(TProtocol oprot, TUnion struct) throws TException { if (struct.getSetField() == null || struct.getFieldValue() == null) { throw new TProtocolException("Cannot write a TUnion with no set value!"); } oprot.writeI16(struct.setField_.getThriftFieldId()); struct.tupleSchemeWriteValue(oprot); } }