Examples of readI16()


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

      if (incoming.get(0)) {
        struct.defaultPartitionName = iprot.readString();
        struct.setDefaultPartitionNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.maxParts = iprot.readI16();
        struct.setMaxPartsIsSet(true);
      }
    }
  }
View Full Code Here

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

      if (incoming.get(1)) {
        struct.my_byte = iprot.readByte();
        struct.setMy_byteIsSet(true);
      }
      if (incoming.get(2)) {
        struct.my_16bit_int = iprot.readI16();
        struct.setMy_16bit_intIsSet(true);
      }
      if (incoming.get(3)) {
        struct.my_32bit_int = iprot.readI32();
        struct.setMy_32bit_intIsSet(true);
View Full Code Here

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

    @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;
      struct.unscaled = iprot.readBinary();
      struct.setUnscaledIsSet(true);
      struct.scale = iprot.readI16();
      struct.setScaleIsSet(true);
    }
  }

}
View Full Code Here

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

      if (incoming.get(1)) {
        struct.my_byte = iprot.readByte();
        struct.setMy_byteIsSet(true);
      }
      if (incoming.get(2)) {
        struct.my_16bit_int = iprot.readI16();
        struct.setMy_16bit_intIsSet(true);
      }
      if (incoming.get(3)) {
        struct.my_32bit_int = iprot.readI32();
        struct.setMy_32bit_intIsSet(true);
View Full Code Here

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

  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.readI16()

            try{
//                protocol.readI32(); // skip the first message length
                byte[] bytes = new byte[4];
                transport.read( bytes, 0, 4 );
                magic = protocol.readI16();
                messageLength = protocol.readI32();

            } catch ( TException e ) {
                throw new IOException( e.getMessage(), e );
            }
View Full Code Here

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

            try{
//                protocol.readI32(); // skip the first message length
                byte[] bytes = new byte[4];
                transport.read( bytes, 0, 4 );
                magic = protocol.readI16();
                messageLength = protocol.readI32();

            } catch ( TException e ) {
                throw new IOException( e.getMessage(), e );
            }
View Full Code Here

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

        TIOStreamTransport transport = new TIOStreamTransport( bis );
        TBinaryProtocol protocol = new TBinaryProtocol( transport );

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
        Assert.assertEquals( request.getId(), protocol.readI64() );
View Full Code Here

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

        }

        TIOStreamTransport transport = new TIOStreamTransport( bis );
        TBinaryProtocol protocol = new TBinaryProtocol( transport );

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
View Full Code Here

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

        TIOStreamTransport transport = new TIOStreamTransport( bis );
        TBinaryProtocol protocol = new TBinaryProtocol( transport );

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
        Assert.assertEquals( request.getId(), protocol.readI64() );
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.