Examples of readStructBegin()


Examples of com.facebook.swift.codec.internal.TProtocolReader.readStructBegin()

            throws Exception
    {
        TProtocolReader reader = new TProtocolReader(protocol);

        UnionField field = new UnionField();
        reader.readStructBegin();

        boolean consumed = false;
        while(reader.nextField()) {
            Preconditions.checkState(!consumed, "already consumed");
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolReader.readStructBegin()

            Object[] args = new Object[numArgs];
            TProtocolReader reader = new TProtocolReader(in);

            // Map incoming arguments from the ID passed in on the wire to the position in the
            // java argument list we expect to see a parameter with that ID.
            reader.readStructBegin();
            while (reader.nextField()) {
                short fieldId = reader.getFieldId();

                ThriftCodec<?> codec = parameterCodecs.get(fieldId);
                if (codec == null) {
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolReader.readStructBegin()

    private Object readResponse(TProtocol in)
            throws Exception
    {
        TProtocolReader reader = new TProtocolReader(in);
        reader.readStructBegin();
        Object results = null;
        Exception exception = null;
        while (reader.nextField()) {
            if (reader.getFieldId() == 0) {
                results = reader.readField(successCodec);
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolReader.readStructBegin()

        double aDouble = 0;
        String aString = null;
        BonkField aStruct = null;
        Set<Boolean> aBooleanSet = null;

        reader.readStructBegin();

        while (reader.nextField()) {
            switch (reader.getFieldId()) {
                case 1:
                    aBoolean = reader.readBoolField();
View Full Code Here

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

    proto.writeFieldEnd();
    proto.writeStructEnd();

    // System.out.println(buf.inspect());

    proto.readStructBegin();
    TField readField = proto.readFieldBegin();
    // TODO: verify the field is as expected
    if (!field.equals(readField)) {
      throw new RuntimeException("Expected " + field + " but got " + readField);
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.readStructBegin()

    // use 3 as the row buffer size to force lots of re-buffering.
    TCTLSeparatedProtocol prot = new TCTLSeparatedProtocol(trans, 1024);
    prot.initialize(new Configuration(), new Properties());

    prot.readStructBegin();

    prot.readFieldBegin();
    String hello = prot.readString();
    prot.readFieldEnd();
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.readStructBegin()

    prot = new TCTLSeparatedProtocol(trans, 10);
    prot.initialize(new Configuration(), new Properties());
   
    // 100 is the start
    prot.readStructBegin();
    prot.readFieldBegin();
    assertTrue(prot.readI32() == 100);
    prot.readFieldEnd();

    // let's see if doubles work ok
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.readStructBegin()

    trans = new TMemoryBuffer(4096);
    trans.write(b,0,len);
    prot = new TCTLSeparatedProtocol(trans, 1024);
    prot.initialize(new Configuration(), schema);

    prot.readStructBegin();
    prot.readFieldBegin();
    final String firstRead = prot.readString();
    prot.readFieldEnd();

    testStr = testStr.replace("\"","");
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.readStructBegin()

    schema.setProperty(Constants.FIELD_DELIM, " ");
    schema.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "-");
    prot.initialize(new Configuration(), schema);

    prot.readStructBegin();

    // ip address
    prot.readFieldBegin();
    final String ip = prot.readString();
    prot.readFieldEnd();
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.readStructBegin()

    trans.write(b, 0, len);

    prot = new TCTLSeparatedProtocol(trans, 3);
    prot.initialize(new Configuration(), new Properties());
   
    prot.readStructBegin();

    prot.readFieldBegin();
    String ret = prot.readString();
    prot.readFieldEnd();
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.