Package org.apache.blur.thirdparty.thrift_0_9_0.protocol

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


    }

    @Override
    public void write(TProtocol oprot, TUnion struct) throws TException {
      if (struct.getSetField() == null || struct.getFieldValue() == null) {
        throw new TProtocolException("Cannot write a TUnion with no set value!");
      }
      oprot.writeStructBegin(struct.getStructDesc());
      oprot.writeFieldBegin(struct.getFieldDesc(struct.setField_));
      struct.standardSchemeWriteValue(oprot);
      oprot.writeFieldEnd();
View Full Code Here


  private static class MetricTupleScheme extends TupleScheme<Metric> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetName()) {
        optionals.set(0);
      }
      if (struct.isSetStrMap()) {
        optionals.set(1);
      }
      if (struct.isSetLongMap()) {
        optionals.set(2);
      }
      if (struct.isSetDoubleMap()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetStrMap()) {
        {
          oprot.writeI32(struct.strMap.size());
          for (Map.Entry<String, String> _iter183 : struct.strMap.entrySet())
          {
            oprot.writeString(_iter183.getKey());
            oprot.writeString(_iter183.getValue());
          }
        }
      }
      if (struct.isSetLongMap()) {
        {
          oprot.writeI32(struct.longMap.size());
          for (Map.Entry<String, Long> _iter184 : struct.longMap.entrySet())
          {
            oprot.writeString(_iter184.getKey());
            oprot.writeI64(_iter184.getValue());
          }
        }
      }
      if (struct.isSetDoubleMap()) {
        {
          oprot.writeI32(struct.doubleMap.size());
          for (Map.Entry<String, Double> _iter185 : struct.doubleMap.entrySet())
          {
            oprot.writeString(_iter185.getKey());
            oprot.writeDouble(_iter185.getValue());
          }
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map186 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
          struct.strMap = new HashMap<String,String>(2*_map186.size);
          for (int _i187 = 0; _i187 < _map186.size; ++_i187)
          {
            String _key188; // required
            String _val189; // optional
            _key188 = iprot.readString();
            _val189 = iprot.readString();
            struct.strMap.put(_key188, _val189);
          }
        }
        struct.setStrMapIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map190 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, iprot.readI32());
          struct.longMap = new HashMap<String,Long>(2*_map190.size);
          for (int _i191 = 0; _i191 < _map190.size; ++_i191)
          {
            String _key192; // required
            long _val193; // optional
            _key192 = iprot.readString();
            _val193 = iprot.readI64();
            struct.longMap.put(_key192, _val193);
          }
        }
        struct.setLongMapIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map194 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE, iprot.readI32());
          struct.doubleMap = new HashMap<String,Double>(2*_map194.size);
          for (int _i195 = 0; _i195 < _map194.size; ++_i195)
          {
            String _key196; // required
            double _val197; // optional
            _key196 = iprot.readString();
            _val197 = iprot.readDouble();
            struct.doubleMap.put(_key196, _val197);
          }
        }
        struct.setDoubleMapIsSet(true);
      }
View Full Code Here

  private static class ColumnDefinitionTupleScheme extends TupleScheme<ColumnDefinition> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, ColumnDefinition struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetFamily()) {
        optionals.set(0);
      }
      if (struct.isSetColumnName()) {
        optionals.set(1);
      }
      if (struct.isSetSubColumnName()) {
        optionals.set(2);
      }
      if (struct.isSetFieldLessIndexed()) {
        optionals.set(3);
      }
      if (struct.isSetFieldType()) {
        optionals.set(4);
      }
      if (struct.isSetProperties()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetFamily()) {
        oprot.writeString(struct.family);
      }
      if (struct.isSetColumnName()) {
        oprot.writeString(struct.columnName);
      }
      if (struct.isSetSubColumnName()) {
        oprot.writeString(struct.subColumnName);
      }
      if (struct.isSetFieldLessIndexed()) {
        oprot.writeBool(struct.fieldLessIndexed);
      }
      if (struct.isSetFieldType()) {
        oprot.writeString(struct.fieldType);
      }
      if (struct.isSetProperties()) {
        {
          oprot.writeI32(struct.properties.size());
          for (Map.Entry<String, String> _iter107 : struct.properties.entrySet())
          {
            oprot.writeString(_iter107.getKey());
            oprot.writeString(_iter107.getValue());
          }
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, ColumnDefinition struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.family = iprot.readString();
        struct.setFamilyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.columnName = iprot.readString();
        struct.setColumnNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.subColumnName = iprot.readString();
        struct.setSubColumnNameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.fieldLessIndexed = iprot.readBool();
        struct.setFieldLessIndexedIsSet(true);
      }
      if (incoming.get(4)) {
        struct.fieldType = iprot.readString();
        struct.setFieldTypeIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map108 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
          struct.properties = new HashMap<String,String>(2*_map108.size);
          for (int _i109 = 0; _i109 < _map108.size; ++_i109)
          {
            String _key110; // required
            String _val111; // optional
            _key110 = iprot.readString();
            _val111 = iprot.readString();
            struct.properties.put(_key110, _val111);
          }
        }
        struct.setPropertiesIsSet(true);
      }
View Full Code Here

  private static class FetchResultTupleScheme extends TupleScheme<FetchResult> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, FetchResult struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetExists()) {
        optionals.set(0);
      }
      if (struct.isSetDeleted()) {
        optionals.set(1);
      }
      if (struct.isSetTable()) {
        optionals.set(2);
      }
      if (struct.isSetRowResult()) {
        optionals.set(3);
      }
      if (struct.isSetRecordResult()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetExists()) {
        oprot.writeBool(struct.exists);
      }
      if (struct.isSetDeleted()) {
        oprot.writeBool(struct.deleted);
      }
      if (struct.isSetTable()) {
        oprot.writeString(struct.table);
      }
      if (struct.isSetRowResult()) {
        struct.rowResult.write(oprot);
      }
      if (struct.isSetRecordResult()) {
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, FetchResult struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        struct.exists = iprot.readBool();
        struct.setExistsIsSet(true);
      }
      if (incoming.get(1)) {
        struct.deleted = iprot.readBool();
        struct.setDeletedIsSet(true);
      }
      if (incoming.get(2)) {
        struct.table = iprot.readString();
        struct.setTableIsSet(true);
      }
      if (incoming.get(3)) {
        struct.rowResult = new FetchRowResult();
        struct.rowResult.read(iprot);
View Full Code Here

  private static class TableStatsTupleScheme extends TupleScheme<TableStats> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TableStats struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTableName()) {
        optionals.set(0);
      }
      if (struct.isSetBytes()) {
        optionals.set(1);
      }
      if (struct.isSetRecordCount()) {
        optionals.set(2);
      }
      if (struct.isSetRowCount()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetTableName()) {
        oprot.writeString(struct.tableName);
      }
      if (struct.isSetBytes()) {
        oprot.writeI64(struct.bytes);
      }
      if (struct.isSetRecordCount()) {
        oprot.writeI64(struct.recordCount);
      }
      if (struct.isSetRowCount()) {
        oprot.writeI64(struct.rowCount);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TableStats struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.tableName = iprot.readString();
        struct.setTableNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.bytes = iprot.readI64();
        struct.setBytesIsSet(true);
      }
      if (incoming.get(2)) {
        struct.recordCount = iprot.readI64();
        struct.setRecordCountIsSet(true);
      }
      if (incoming.get(3)) {
        struct.rowCount = iprot.readI64();
        struct.setRowCountIsSet(true);
      }
    }
View Full Code Here

  private static class TableDescriptorTupleScheme extends TupleScheme<TableDescriptor> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TableDescriptor struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetEnabled()) {
        optionals.set(0);
      }
      if (struct.isSetShardCount()) {
        optionals.set(1);
      }
      if (struct.isSetTableUri()) {
        optionals.set(2);
      }
      if (struct.isSetCluster()) {
        optionals.set(3);
      }
      if (struct.isSetName()) {
        optionals.set(4);
      }
      if (struct.isSetSimilarityClass()) {
        optionals.set(5);
      }
      if (struct.isSetBlockCaching()) {
        optionals.set(6);
      }
      if (struct.isSetBlockCachingFileTypes()) {
        optionals.set(7);
      }
      if (struct.isSetReadOnly()) {
        optionals.set(8);
      }
      if (struct.isSetPreCacheCols()) {
        optionals.set(9);
      }
      if (struct.isSetTableProperties()) {
        optionals.set(10);
      }
      if (struct.isSetStrictTypes()) {
        optionals.set(11);
      }
      if (struct.isSetDefaultMissingFieldType()) {
        optionals.set(12);
      }
      if (struct.isSetDefaultMissingFieldLessIndexing()) {
        optionals.set(13);
      }
      if (struct.isSetDefaultMissingFieldProps()) {
        optionals.set(14);
      }
      oprot.writeBitSet(optionals, 15);
      if (struct.isSetEnabled()) {
        oprot.writeBool(struct.enabled);
      }
      if (struct.isSetShardCount()) {
        oprot.writeI32(struct.shardCount);
      }
      if (struct.isSetTableUri()) {
        oprot.writeString(struct.tableUri);
      }
      if (struct.isSetCluster()) {
        oprot.writeString(struct.cluster);
      }
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetSimilarityClass()) {
        oprot.writeString(struct.similarityClass);
      }
      if (struct.isSetBlockCaching()) {
        oprot.writeBool(struct.blockCaching);
      }
      if (struct.isSetBlockCachingFileTypes()) {
        {
          oprot.writeI32(struct.blockCachingFileTypes.size());
          for (String _iter150 : struct.blockCachingFileTypes)
          {
            oprot.writeString(_iter150);
          }
        }
      }
      if (struct.isSetReadOnly()) {
        oprot.writeBool(struct.readOnly);
      }
      if (struct.isSetPreCacheCols()) {
        {
          oprot.writeI32(struct.preCacheCols.size());
          for (String _iter151 : struct.preCacheCols)
          {
            oprot.writeString(_iter151);
          }
        }
      }
      if (struct.isSetTableProperties()) {
        {
          oprot.writeI32(struct.tableProperties.size());
          for (Map.Entry<String, String> _iter152 : struct.tableProperties.entrySet())
          {
            oprot.writeString(_iter152.getKey());
            oprot.writeString(_iter152.getValue());
          }
        }
      }
      if (struct.isSetStrictTypes()) {
        oprot.writeBool(struct.strictTypes);
      }
      if (struct.isSetDefaultMissingFieldType()) {
        oprot.writeString(struct.defaultMissingFieldType);
      }
      if (struct.isSetDefaultMissingFieldLessIndexing()) {
        oprot.writeBool(struct.defaultMissingFieldLessIndexing);
      }
      if (struct.isSetDefaultMissingFieldProps()) {
        {
          oprot.writeI32(struct.defaultMissingFieldProps.size());
          for (Map.Entry<String, String> _iter153 : struct.defaultMissingFieldProps.entrySet())
          {
            oprot.writeString(_iter153.getKey());
            oprot.writeString(_iter153.getValue());
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol

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.