Examples of TField


Examples of com.evernote.thrift.protocol.TField

  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

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TField

  }

  @Override
  public TField readFieldBegin() throws TException {
    assert (!inner);
    TField f = new TField("", ORDERED_TYPE, (short) -1);
    // slight hack to communicate to DynamicSerDe that the field ids are not
    // being set but things are ordered.
    return f;
  }
View Full Code Here

Examples of com.facebook.thrift.protocol.TField

  private static void testStructField(StructFieldTestCase testCase) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);

    TField field = new TField("test_field", testCase.type_, testCase.id_);
    proto.writeStructBegin(new TStruct("test_struct"));
    proto.writeFieldBegin(field);
    testCase.writeMethod(proto);
    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);
    }
    testCase.readMethod(proto);
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField

      struct.setField_ = null;
      struct.value_ = null;

      iprot.readStructBegin();

      TField field = iprot.readFieldBegin();

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

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField

   * @param fieldIdPathRest The rest FieldId's that define a path to a TUnion
   * @throws TException
   */
  public Short partialDeserializeSetFieldIdInUnion(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRestthrows TException {
    try {
      TField field = locateField(bytes, fieldIdPathFirst, fieldIdPathRest);
      if (field != null){
        protocol_.readStructBegin(); // The Union
        return protocol_.readFieldBegin().id; // The field set in the union
      }
      return null;
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField

    }
  }

  private Object partialDeserializeField(byte ttype, byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
    try {
      TField field = locateField(bytes, fieldIdPathFirst, fieldIdPathRest);
      if (field != null) {
        // if this point is reached, iprot will be positioned at the start of the field.
        switch(ttype){
          case TType.BOOL:
            if (field.type == TType.BOOL){
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField

    // index into field ID path being currently searched for
    int curPathIndex = 0;

    // this will be the located field, or null if it is not located
    TField field = null;

    protocol_.readStructBegin();

    while (curPathIndex < fieldIdPath.length) {
      field = protocol_.readFieldBegin();
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField

  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

Examples of org.apache.thrift.protocol.TField

    public _Fields fieldForId(int fieldId) {
        return _Fields.findByThriftId(fieldId);
    }

    public void read(TProtocol iprot) throws TException {
        TField field;
        iprot.readStructBegin();
        while(true) {
            field = iprot.readFieldBegin();
            if(field.type == TType.STOP) {
                break;
View Full Code Here

Examples of org.apache.thrift.protocol.TField

    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
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.