Package com.facebook.presto.hive.shaded.org.apache.thrift.protocol

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


  private static class QueryTupleScheme extends TupleScheme<Query> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Query struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetQueryId()) {
        optionals.set(0);
      }
      if (struct.isSetQueryType()) {
        optionals.set(1);
      }
      if (struct.isSetQueryAttributes()) {
        optionals.set(2);
      }
      if (struct.isSetQueryCounters()) {
        optionals.set(3);
      }
      if (struct.isSetStageGraph()) {
        optionals.set(4);
      }
      if (struct.isSetStageList()) {
        optionals.set(5);
      }
      if (struct.isSetDone()) {
        optionals.set(6);
      }
      if (struct.isSetStarted()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetQueryId()) {
        oprot.writeString(struct.queryId);
      }
      if (struct.isSetQueryType()) {
        oprot.writeString(struct.queryType);
      }
      if (struct.isSetQueryAttributes()) {
        {
          oprot.writeI32(struct.queryAttributes.size());
          for (Map.Entry<String, String> _iter114 : struct.queryAttributes.entrySet())
          {
            oprot.writeString(_iter114.getKey());
            oprot.writeString(_iter114.getValue());
          }
        }
      }
      if (struct.isSetQueryCounters()) {
        {
          oprot.writeI32(struct.queryCounters.size());
          for (Map.Entry<String, Long> _iter115 : struct.queryCounters.entrySet())
          {
            oprot.writeString(_iter115.getKey());
            oprot.writeI64(_iter115.getValue());
          }
        }
      }
      if (struct.isSetStageGraph()) {
        struct.stageGraph.write(oprot);
      }
      if (struct.isSetStageList()) {
        {
          oprot.writeI32(struct.stageList.size());
          for (Stage _iter116 : struct.stageList)
          {
            _iter116.write(oprot);
          }
        }
      }
      if (struct.isSetDone()) {
        oprot.writeBool(struct.done);
      }
      if (struct.isSetStarted()) {
        oprot.writeBool(struct.started);
      }
    }
View Full Code Here


      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Query struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.queryId = iprot.readString();
        struct.setQueryIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.queryType = iprot.readString();
        struct.setQueryTypeIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map117 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.queryAttributes = new HashMap<String,String>(2*_map117.size);
          for (int _i118 = 0; _i118 < _map117.size; ++_i118)
          {
            String _key119; // required
            String _val120; // required
            _key119 = iprot.readString();
            _val120 = iprot.readString();
            struct.queryAttributes.put(_key119, _val120);
          }
        }
        struct.setQueryAttributesIsSet(true);
      }
      if (incoming.get(3)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map121 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I64, iprot.readI32());
          struct.queryCounters = new HashMap<String,Long>(2*_map121.size);
          for (int _i122 = 0; _i122 < _map121.size; ++_i122)
          {
            String _key123; // required
            long _val124; // required
            _key123 = iprot.readString();
            _val124 = iprot.readI64();
            struct.queryCounters.put(_key123, _val124);
          }
        }
        struct.setQueryCountersIsSet(true);
      }
      if (incoming.get(4)) {
        struct.stageGraph = new Graph();
        struct.stageGraph.read(iprot);
        struct.setStageGraphIsSet(true);
      }
      if (incoming.get(5)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list125 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.stageList = new ArrayList<Stage>(_list125.size);
          for (int _i126 = 0; _i126 < _list125.size; ++_i126)
          {
            Stage _elem127; // required
            _elem127 = new Stage();
            _elem127.read(iprot);
            struct.stageList.add(_elem127);
          }
        }
        struct.setStageListIsSet(true);
      }
      if (incoming.get(6)) {
        struct.done = iprot.readBool();
        struct.setDoneIsSet(true);
      }
      if (incoming.get(7)) {
        struct.started = iprot.readBool();
        struct.setStartedIsSet(true);
      }
    }
View Full Code Here

  private static class OperatorTupleScheme extends TupleScheme<Operator> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Operator struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetOperatorId()) {
        optionals.set(0);
      }
      if (struct.isSetOperatorType()) {
        optionals.set(1);
      }
      if (struct.isSetOperatorAttributes()) {
        optionals.set(2);
      }
      if (struct.isSetOperatorCounters()) {
        optionals.set(3);
      }
      if (struct.isSetDone()) {
        optionals.set(4);
      }
      if (struct.isSetStarted()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetOperatorId()) {
        oprot.writeString(struct.operatorId);
      }
      if (struct.isSetOperatorType()) {
        oprot.writeI32(struct.operatorType.getValue());
      }
      if (struct.isSetOperatorAttributes()) {
        {
          oprot.writeI32(struct.operatorAttributes.size());
          for (Map.Entry<String, String> _iter34 : struct.operatorAttributes.entrySet())
          {
            oprot.writeString(_iter34.getKey());
            oprot.writeString(_iter34.getValue());
          }
        }
      }
      if (struct.isSetOperatorCounters()) {
        {
          oprot.writeI32(struct.operatorCounters.size());
          for (Map.Entry<String, Long> _iter35 : struct.operatorCounters.entrySet())
          {
            oprot.writeString(_iter35.getKey());
            oprot.writeI64(_iter35.getValue());
          }
        }
      }
      if (struct.isSetDone()) {
        oprot.writeBool(struct.done);
      }
      if (struct.isSetStarted()) {
        oprot.writeBool(struct.started);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Operator struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.operatorId = iprot.readString();
        struct.setOperatorIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.operatorType = OperatorType.findByValue(iprot.readI32());
        struct.setOperatorTypeIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map36 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.operatorAttributes = new HashMap<String,String>(2*_map36.size);
          for (int _i37 = 0; _i37 < _map36.size; ++_i37)
          {
            String _key38; // required
            String _val39; // required
            _key38 = iprot.readString();
            _val39 = iprot.readString();
            struct.operatorAttributes.put(_key38, _val39);
          }
        }
        struct.setOperatorAttributesIsSet(true);
      }
      if (incoming.get(3)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map40 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I64, iprot.readI32());
          struct.operatorCounters = new HashMap<String,Long>(2*_map40.size);
          for (int _i41 = 0; _i41 < _map40.size; ++_i41)
          {
            String _key42; // required
            long _val43; // required
            _key42 = iprot.readString();
            _val43 = iprot.readI64();
            struct.operatorCounters.put(_key42, _val43);
          }
        }
        struct.setOperatorCountersIsSet(true);
      }
      if (incoming.get(4)) {
        struct.done = iprot.readBool();
        struct.setDoneIsSet(true);
      }
      if (incoming.get(5)) {
        struct.started = iprot.readBool();
        struct.setStartedIsSet(true);
      }
    }
View Full Code Here

  private static class TaskTupleScheme extends TupleScheme<Task> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Task struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTaskId()) {
        optionals.set(0);
      }
      if (struct.isSetTaskType()) {
        optionals.set(1);
      }
      if (struct.isSetTaskAttributes()) {
        optionals.set(2);
      }
      if (struct.isSetTaskCounters()) {
        optionals.set(3);
      }
      if (struct.isSetOperatorGraph()) {
        optionals.set(4);
      }
      if (struct.isSetOperatorList()) {
        optionals.set(5);
      }
      if (struct.isSetDone()) {
        optionals.set(6);
      }
      if (struct.isSetStarted()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetTaskId()) {
        oprot.writeString(struct.taskId);
      }
      if (struct.isSetTaskType()) {
        oprot.writeI32(struct.taskType.getValue());
      }
      if (struct.isSetTaskAttributes()) {
        {
          oprot.writeI32(struct.taskAttributes.size());
          for (Map.Entry<String, String> _iter58 : struct.taskAttributes.entrySet())
          {
            oprot.writeString(_iter58.getKey());
            oprot.writeString(_iter58.getValue());
          }
        }
      }
      if (struct.isSetTaskCounters()) {
        {
          oprot.writeI32(struct.taskCounters.size());
          for (Map.Entry<String, Long> _iter59 : struct.taskCounters.entrySet())
          {
            oprot.writeString(_iter59.getKey());
            oprot.writeI64(_iter59.getValue());
          }
        }
      }
      if (struct.isSetOperatorGraph()) {
        struct.operatorGraph.write(oprot);
      }
      if (struct.isSetOperatorList()) {
        {
          oprot.writeI32(struct.operatorList.size());
          for (Operator _iter60 : struct.operatorList)
          {
            _iter60.write(oprot);
          }
        }
      }
      if (struct.isSetDone()) {
        oprot.writeBool(struct.done);
      }
      if (struct.isSetStarted()) {
        oprot.writeBool(struct.started);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Task struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.taskId = iprot.readString();
        struct.setTaskIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.taskType = TaskType.findByValue(iprot.readI32());
        struct.setTaskTypeIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map61 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.taskAttributes = new HashMap<String,String>(2*_map61.size);
          for (int _i62 = 0; _i62 < _map61.size; ++_i62)
          {
            String _key63; // required
            String _val64; // required
            _key63 = iprot.readString();
            _val64 = iprot.readString();
            struct.taskAttributes.put(_key63, _val64);
          }
        }
        struct.setTaskAttributesIsSet(true);
      }
      if (incoming.get(3)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map65 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I64, iprot.readI32());
          struct.taskCounters = new HashMap<String,Long>(2*_map65.size);
          for (int _i66 = 0; _i66 < _map65.size; ++_i66)
          {
            String _key67; // required
            long _val68; // required
            _key67 = iprot.readString();
            _val68 = iprot.readI64();
            struct.taskCounters.put(_key67, _val68);
          }
        }
        struct.setTaskCountersIsSet(true);
      }
      if (incoming.get(4)) {
        struct.operatorGraph = new Graph();
        struct.operatorGraph.read(iprot);
        struct.setOperatorGraphIsSet(true);
      }
      if (incoming.get(5)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list69 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.operatorList = new ArrayList<Operator>(_list69.size);
          for (int _i70 = 0; _i70 < _list69.size; ++_i70)
          {
            Operator _elem71; // required
            _elem71 = new Operator();
            _elem71.read(iprot);
            struct.operatorList.add(_elem71);
          }
        }
        struct.setOperatorListIsSet(true);
      }
      if (incoming.get(6)) {
        struct.done = iprot.readBool();
        struct.setDoneIsSet(true);
      }
      if (incoming.get(7)) {
        struct.started = iprot.readBool();
        struct.setStartedIsSet(true);
      }
    }
View Full Code Here

  private static class GraphTupleScheme extends TupleScheme<Graph> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Graph struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetNodeType()) {
        optionals.set(0);
      }
      if (struct.isSetRoots()) {
        optionals.set(1);
      }
      if (struct.isSetAdjacencyList()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetNodeType()) {
        oprot.writeI32(struct.nodeType.getValue());
      }
      if (struct.isSetRoots()) {
        {
          oprot.writeI32(struct.roots.size());
          for (String _iter16 : struct.roots)
          {
            oprot.writeString(_iter16);
          }
        }
      }
      if (struct.isSetAdjacencyList()) {
        {
          oprot.writeI32(struct.adjacencyList.size());
          for (Adjacency _iter17 : struct.adjacencyList)
          {
            _iter17.write(oprot);
          }
        }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Graph struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.nodeType = NodeType.findByValue(iprot.readI32());
        struct.setNodeTypeIsSet(true);
      }
      if (incoming.get(1)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list18 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.roots = new ArrayList<String>(_list18.size);
          for (int _i19 = 0; _i19 < _list18.size; ++_i19)
          {
            String _elem20; // required
            _elem20 = iprot.readString();
            struct.roots.add(_elem20);
          }
        }
        struct.setRootsIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list21 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.adjacencyList = new ArrayList<Adjacency>(_list21.size);
          for (int _i22 = 0; _i22 < _list21.size; ++_i22)
          {
            Adjacency _elem23; // required
            _elem23 = new Adjacency();
View Full Code Here

  private static class LockComponentTupleScheme extends TupleScheme<LockComponent> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeI32(struct.type.getValue());
      oprot.writeI32(struct.level.getValue());
      oprot.writeString(struct.dbname);
      BitSet optionals = new BitSet();
      if (struct.isSetTablename()) {
        optionals.set(0);
      }
      if (struct.isSetPartitionname()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetTablename()) {
        oprot.writeString(struct.tablename);
      }
      if (struct.isSetPartitionname()) {
        oprot.writeString(struct.partitionname);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.type = LockType.findByValue(iprot.readI32());
      struct.setTypeIsSet(true);
      struct.level = LockLevel.findByValue(iprot.readI32());
      struct.setLevelIsSet(true);
      struct.dbname = iprot.readString();
      struct.setDbnameIsSet(true);
      BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        struct.tablename = iprot.readString();
        struct.setTablenameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.partitionname = iprot.readString();
        struct.setPartitionnameIsSet(true);
      }
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.hive.shaded.org.apache.thrift.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.