Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TField


    {
        if (map == null) {
            return;
        }

        protocol.writeFieldBegin(new TField(name, TType.MAP, id));
        codec.write(map, protocol);
        protocol.writeFieldEnd();
    }
View Full Code Here


        if (enumValue == null) {
            return;
        }

        protocol.writeFieldBegin(new TField(name, TType.I32, id));
        codec.write(enumValue, protocol);
        protocol.writeFieldEnd();
    }
View Full Code Here

  public int getType() {
    return type_;
  }

  public static TApplicationException read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();

    String message = null;
    int type = UNKNOWN;
View Full Code Here

    setField_ = null;
    value_ = null;

    iprot.readStructBegin();

    TField field = iprot.readFieldBegin();

    value_ = readValue(iprot, field);
    if (value_ != null) {
      setField_ = enumForId(field.id);
    }
View Full Code Here

    int curPathIndex = 0;

    protocol_.readStructBegin();

    while (curPathIndex < fieldIdPath.length) {
      TField field = protocol_.readFieldBegin();
      // we can stop searching if we either see a stop or we go past the field
      // id we're looking for (since fields should now be serialized in asc
      // order).
      if (field.type == TType.STOP || field.id > fieldIdPath[curPathIndex].getThriftFieldId()) {
        return;
View Full Code Here

  public int getType() {
    return type_;
  }

  public static TApplicationException read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();

    String message = null;
    int type = UNKNOWN;
View Full Code Here

    setField_ = null;
    value_ = null;

    iprot.readStructBegin();

    TField field = iprot.readFieldBegin();

    value_ = readValue(iprot, field);
    if (value_ != null) {
      setField_ = enumForId(field.id);
    }
View Full Code Here

        for (int i = 0; i < count; i++) {
            protocol.writeMessageBegin(new TMessage("testmessage" + i, TMessageType.CALL, i));
            {
                protocol.writeStructBegin(new TStruct());
                {
                    protocol.writeFieldBegin(new TField("i32field", TType.I32, (short) 1));
                    protocol.writeI32(123);
                    protocol.writeFieldEnd();
                }
                {
                    protocol.writeFieldBegin(new TField("strfield", TType.STRING, (short) 2));
                    protocol.writeString("foo");
                    protocol.writeFieldEnd();
                }
                {
                    protocol.writeFieldBegin(new TField("boolfield", TType.BOOL, (short) 3));
                    protocol.writeBool(true);
                    protocol.writeFieldEnd();
                }
                protocol.writeFieldStop();
                protocol.writeStructEnd();
View Full Code Here

    Arrays.fill(fieldsPresent, false);

    // Read the fields.
    for (int i = 0; i < getNumFields(); i++) {
      DynamicSerDeTypeBase mt = null;
      TField field = null;

      if (!isRealThrift && getField(i).isSkippable()) {
        // PRE - all the fields are required and serialized in order - is
        // !isRealThrift
        mt = ordered_types[i];
View Full Code Here

      if (f == null && !writeNulls) {
        continue;
      }

      if (thrift_mode) {
        field = new TField(mt.name, mt.getType(), (short) mt.fieldid);
        oprot.writeFieldBegin(field);
      }

      if (f == null) {
        ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) oprot)
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TField

Copyright © 2018 www.massapicom. 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.