Examples of writeI16()


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.writeI16()

      }
      if (struct.isSetMy_byte()) {
        oprot.writeByte(struct.my_byte);
      }
      if (struct.isSetMy_16bit_int()) {
        oprot.writeI16(struct.my_16bit_int);
      }
      if (struct.isSetMy_32bit_int()) {
        oprot.writeI32(struct.my_32bit_int);
      }
      if (struct.isSetMy_64bit_int()) {
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.writeI16()

      oprot.writeBitSet(optionals, 2);
      if (struct.isSetDefaultPartitionName()) {
        oprot.writeString(struct.defaultPartitionName);
      }
      if (struct.isSetMaxParts()) {
        oprot.writeI16(struct.maxParts);
      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, PartitionsByExprRequest struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.writeI16()

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeBinary(struct.unscaled);
      oprot.writeI16(struct.scale);
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.writeI16()

      }
      if (struct.isSetMy_byte()) {
        oprot.writeByte(struct.my_byte);
      }
      if (struct.isSetMy_16bit_int()) {
        oprot.writeI16(struct.my_16bit_int);
      }
      if (struct.isSetMy_32bit_int()) {
        oprot.writeI32(struct.my_32bit_int);
      }
      if (struct.isSetMy_64bit_int()) {
View Full Code Here

Examples of com.facebook.thrift.protocol.TProtocol.writeI16()

  }

  public static void testNakedI16(short n) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeI16(n);
    // System.out.println(buf.inspect());
    int out = proto.readI16();
    if (out != n) {
      throw new RuntimeException("I16 was supposed to be " + n + " but was " + out);
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeI16()

        int headerLength, messageLength;

        byte[] bytes = new byte[4];
        try {
            // magic
            protocol.writeI16( MAGIC );
            // message length placeholder
            protocol.writeI32( Integer.MAX_VALUE );
            // message header length placeholder
            protocol.writeI16( Short.MAX_VALUE );
            // version
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeI16()

            // magic
            protocol.writeI16( MAGIC );
            // message length placeholder
            protocol.writeI32( Integer.MAX_VALUE );
            // message header length placeholder
            protocol.writeI16( Short.MAX_VALUE );
            // version
            protocol.writeByte( VERSION );
            // service name
            protocol.writeString( serviceName );
            // dubbo request id
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeI16()

            try {
                TFramedTransport.encodeFrameSize( messageLength, bytes );
                bos.setWriteIndex( MESSAGE_LENGTH_INDEX );
                protocol.writeI32( messageLength );
                bos.setWriteIndex( MESSAGE_HEADER_LENGTH_INDEX );
                protocol.writeI16( ( short )( 0xffff & headerLength ) );
            } finally {
                bos.setWriteIndex( oldIndex );
            }

        } catch ( TException e ) {
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeI16()

        int headerLength;

        byte[] bytes = new byte[4];
        try {
            // magic
            protocol.writeI16( MAGIC );
            // message length
            protocol.writeI32( Integer.MAX_VALUE );
            // message header length
            protocol.writeI16( Short.MAX_VALUE );
            // version
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeI16()

            // magic
            protocol.writeI16( MAGIC );
            // message length
            protocol.writeI32( Integer.MAX_VALUE );
            // message header length
            protocol.writeI16( Short.MAX_VALUE );
            // version
            protocol.writeByte( VERSION );
            // service name
            protocol.writeString( rd.serviceName );
            // id
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.