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 read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, FetchRowResult 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.row = new Row();
        struct.row.read(iprot);
        struct.setRowIsSet(true);
      }
      if (incoming.get(1)) {
        struct.startRecord = iprot.readI32();
        struct.setStartRecordIsSet(true);
      }
      if (incoming.get(2)) {
        struct.maxRecordsToFetch = iprot.readI32();
        struct.setMaxRecordsToFetchIsSet(true);
      }
      if (incoming.get(3)) {
        struct.moreRecordsToFetch = iprot.readBool();
        struct.setMoreRecordsToFetchIsSet(true);
      }
      if (incoming.get(4)) {
        struct.totalRecords = iprot.readI32();
        struct.setTotalRecordsIsSet(true);
      }
    }
View Full Code Here


  private static class SelectorTupleScheme extends TupleScheme<Selector> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Selector struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetRecordOnly()) {
        optionals.set(0);
      }
      if (struct.isSetLocationId()) {
        optionals.set(1);
      }
      if (struct.isSetRowId()) {
        optionals.set(2);
      }
      if (struct.isSetRecordId()) {
        optionals.set(3);
      }
      if (struct.isSetColumnFamiliesToFetch()) {
        optionals.set(4);
      }
      if (struct.isSetColumnsToFetch()) {
        optionals.set(5);
      }
      if (struct.isSetStartRecord()) {
        optionals.set(6);
      }
      if (struct.isSetMaxRecordsToFetch()) {
        optionals.set(7);
      }
      if (struct.isSetHighlightOptions()) {
        optionals.set(8);
      }
      if (struct.isSetOrderOfFamiliesToFetch()) {
        optionals.set(9);
      }
      oprot.writeBitSet(optionals, 10);
      if (struct.isSetRecordOnly()) {
        oprot.writeBool(struct.recordOnly);
      }
      if (struct.isSetLocationId()) {
        oprot.writeString(struct.locationId);
      }
      if (struct.isSetRowId()) {
        oprot.writeString(struct.rowId);
      }
      if (struct.isSetRecordId()) {
        oprot.writeString(struct.recordId);
      }
      if (struct.isSetColumnFamiliesToFetch()) {
        {
          oprot.writeI32(struct.columnFamiliesToFetch.size());
          for (String _iter43 : struct.columnFamiliesToFetch)
          {
            oprot.writeString(_iter43);
          }
        }
      }
      if (struct.isSetColumnsToFetch()) {
        {
          oprot.writeI32(struct.columnsToFetch.size());
          for (Map.Entry<String, Set<String>> _iter44 : struct.columnsToFetch.entrySet())
          {
            oprot.writeString(_iter44.getKey());
            {
              oprot.writeI32(_iter44.getValue().size());
              for (String _iter45 : _iter44.getValue())
              {
                oprot.writeString(_iter45);
              }
            }
          }
        }
      }
      if (struct.isSetStartRecord()) {
        oprot.writeI32(struct.startRecord);
      }
      if (struct.isSetMaxRecordsToFetch()) {
        oprot.writeI32(struct.maxRecordsToFetch);
      }
      if (struct.isSetHighlightOptions()) {
        struct.highlightOptions.write(oprot);
      }
      if (struct.isSetOrderOfFamiliesToFetch()) {
        {
          oprot.writeI32(struct.orderOfFamiliesToFetch.size());
          for (String _iter46 : struct.orderOfFamiliesToFetch)
          {
            oprot.writeString(_iter46);
          }
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Selector struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(10);
      if (incoming.get(0)) {
        struct.recordOnly = iprot.readBool();
        struct.setRecordOnlyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.locationId = iprot.readString();
        struct.setLocationIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.rowId = iprot.readString();
        struct.setRowIdIsSet(true);
      }
      if (incoming.get(3)) {
        struct.recordId = iprot.readString();
        struct.setRecordIdIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet _set47 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
          struct.columnFamiliesToFetch = new HashSet<String>(2*_set47.size);
          for (int _i48 = 0; _i48 < _set47.size; ++_i48)
          {
            String _elem49; // required
            _elem49 = iprot.readString();
            struct.columnFamiliesToFetch.add(_elem49);
          }
        }
        struct.setColumnFamiliesToFetchIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map50 = 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.SET, iprot.readI32());
          struct.columnsToFetch = new HashMap<String,Set<String>>(2*_map50.size);
          for (int _i51 = 0; _i51 < _map50.size; ++_i51)
          {
            String _key52; // optional
            Set<String> _val53; // required
            _key52 = iprot.readString();
            {
              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet _set54 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
              _val53 = new HashSet<String>(2*_set54.size);
              for (int _i55 = 0; _i55 < _set54.size; ++_i55)
              {
                String _elem56; // required
                _elem56 = iprot.readString();
                _val53.add(_elem56);
              }
            }
            struct.columnsToFetch.put(_key52, _val53);
          }
        }
        struct.setColumnsToFetchIsSet(true);
      }
      if (incoming.get(6)) {
        struct.startRecord = iprot.readI32();
        struct.setStartRecordIsSet(true);
      }
      if (incoming.get(7)) {
        struct.maxRecordsToFetch = iprot.readI32();
        struct.setMaxRecordsToFetchIsSet(true);
      }
      if (incoming.get(8)) {
        struct.highlightOptions = new HighlightOptions();
        struct.highlightOptions.read(iprot);
        struct.setHighlightOptionsIsSet(true);
      }
      if (incoming.get(9)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list57 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
          struct.orderOfFamiliesToFetch = new ArrayList<String>(_list57.size);
          for (int _i58 = 0; _i58 < _list57.size; ++_i58)
          {
            String _elem59; // required
            _elem59 = iprot.readString();
            struct.orderOfFamiliesToFetch.add(_elem59);
          }
        }
        struct.setOrderOfFamiliesToFetchIsSet(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);
      }
      if (struct.isSetSortable()) {
        optionals.set(6);
      }
      oprot.writeBitSet(optionals, 7);
      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> _iter141 : struct.properties.entrySet())
          {
            oprot.writeString(_iter141.getKey());
            oprot.writeString(_iter141.getValue());
          }
        }
      }
      if (struct.isSetSortable()) {
        oprot.writeBool(struct.sortable);
      }
    }
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(7);
      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 _map142 = 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*_map142.size);
          for (int _i143 = 0; _i143 < _map142.size; ++_i143)
          {
            String _key144; // optional
            String _val145; // required
            _key144 = iprot.readString();
            _val145 = iprot.readString();
            struct.properties.put(_key144, _val145);
          }
        }
        struct.setPropertiesIsSet(true);
      }
      if (incoming.get(6)) {
        struct.sortable = iprot.readBool();
        struct.setSortableIsSet(true);
      }
    }
View Full Code Here

  private static class RecordTupleScheme extends TupleScheme<Record> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Record struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetRecordId()) {
        optionals.set(0);
      }
      if (struct.isSetFamily()) {
        optionals.set(1);
      }
      if (struct.isSetColumns()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetRecordId()) {
        oprot.writeString(struct.recordId);
      }
      if (struct.isSetFamily()) {
        oprot.writeString(struct.family);
      }
      if (struct.isSetColumns()) {
        {
          oprot.writeI32(struct.columns.size());
          for (Column _iter14 : struct.columns)
          {
            _iter14.write(oprot);
          }
        }
View Full Code Here

      }
    }

    @Override
    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Record struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.recordId = iprot.readString();
        struct.setRecordIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.family = iprot.readString();
        struct.setFamilyIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list15 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
          struct.columns = new ArrayList<Column>(_list15.size);
          for (int _i16 = 0; _i16 < _list15.size; ++_i16)
          {
            Column _elem17; // required
            _elem17 = new Column();
View Full Code Here

    shardServer.init();

    Iface iface = BlurUtil.recordMethodCallsAndAverageTimes(shardServer, Iface.class, false);
    if (httpServer != null) {
      WebAppContext context = httpServer.getContext();
      context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface),
          new TJSONProtocol.Factory())), "/blur");
      context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics");
      if (enableJsonReporter) {
        JSONReporter.enable("json-reporter", 1, TimeUnit.SECONDS, 60);
      }
View Full Code Here

    socket.setTcpNoDelay(true);
    socket.setSoTimeout(timeout);
    socket.connect(new InetSocketAddress(host, port), timeout);
    trans = new TSocket(socket);

    TProtocol proto = new TBinaryProtocol(new TFramedTransport(trans));
    Client client = new Client(proto);
    return client;
  }
View Full Code Here

      buffer_ = ByteBuffer.allocate(4);

      frameTrans_ = new TMemoryInputTransport();
      response_ = new TByteArrayOutputStream();
      inTrans_ = inputTransportFactory_.getTransport(frameTrans_);
      outTrans_ = outputTransportFactory_.getTransport(new TIOStreamTransport(response_));
      inProt_ = inputProtocolFactory_.getProtocol(inTrans_);
      outProt_ = outputProtocolFactory_.getProtocol(outTrans_);

      if (eventHandler_ != null) {
        context_ = eventHandler_.createContext(inProt_, outProt_, selectionKey);
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.