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 AlreadyExistsExceptionTupleScheme extends TupleScheme<AlreadyExistsException> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMessage()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetMessage()) {
        oprot.writeString(struct.message);
      }
    }
View Full Code Here


      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        struct.message = iprot.readString();
        struct.setMessageIsSet(true);
      }
    }
View Full Code Here

  private static class DropPartitionsResultTupleScheme extends TupleScheme<DropPartitionsResult> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetPartitions()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetPartitions()) {
        {
          oprot.writeI32(struct.partitions.size());
          for (Partition _iter350 : struct.partitions)
          {
            _iter350.write(oprot);
          }
        }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list351 = 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.partitions = new ArrayList<Partition>(_list351.size);
          for (int _i352 = 0; _i352 < _list351.size; ++_i352)
          {
            Partition _elem353; // required
            _elem353 = new Partition();
View Full Code Here

  private static class SkewedInfoTupleScheme extends TupleScheme<SkewedInfo> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetSkewedColNames()) {
        optionals.set(0);
      }
      if (struct.isSetSkewedColValues()) {
        optionals.set(1);
      }
      if (struct.isSetSkewedColValueLocationMaps()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetSkewedColNames()) {
        {
          oprot.writeI32(struct.skewedColNames.size());
          for (String _iter135 : struct.skewedColNames)
          {
            oprot.writeString(_iter135);
          }
        }
      }
      if (struct.isSetSkewedColValues()) {
        {
          oprot.writeI32(struct.skewedColValues.size());
          for (List<String> _iter136 : struct.skewedColValues)
          {
            {
              oprot.writeI32(_iter136.size());
              for (String _iter137 : _iter136)
              {
                oprot.writeString(_iter137);
              }
            }
          }
        }
      }
      if (struct.isSetSkewedColValueLocationMaps()) {
        {
          oprot.writeI32(struct.skewedColValueLocationMaps.size());
          for (Map.Entry<List<String>, String> _iter138 : struct.skewedColValueLocationMaps.entrySet())
          {
            {
              oprot.writeI32(_iter138.getKey().size());
              for (String _iter139 : _iter138.getKey())
              {
                oprot.writeString(_iter139);
              }
            }
            oprot.writeString(_iter138.getValue());
          }
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list140 = 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.skewedColNames = new ArrayList<String>(_list140.size);
          for (int _i141 = 0; _i141 < _list140.size; ++_i141)
          {
            String _elem142; // required
            _elem142 = iprot.readString();
            struct.skewedColNames.add(_elem142);
          }
        }
        struct.setSkewedColNamesIsSet(true);
      }
      if (incoming.get(1)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list143 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.LIST, iprot.readI32());
          struct.skewedColValues = new ArrayList<List<String>>(_list143.size);
          for (int _i144 = 0; _i144 < _list143.size; ++_i144)
          {
            List<String> _elem145; // required
            {
              com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list146 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
              _elem145 = new ArrayList<String>(_list146.size);
              for (int _i147 = 0; _i147 < _list146.size; ++_i147)
              {
                String _elem148; // required
                _elem148 = iprot.readString();
                _elem145.add(_elem148);
              }
            }
            struct.skewedColValues.add(_elem145);
          }
        }
        struct.setSkewedColValuesIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map149 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.LIST, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.skewedColValueLocationMaps = new HashMap<List<String>,String>(2*_map149.size);
          for (int _i150 = 0; _i150 < _map149.size; ++_i150)
          {
            List<String> _key151; // required
            String _val152; // required
            {
              com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list153 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
              _key151 = new ArrayList<String>(_list153.size);
              for (int _i154 = 0; _i154 < _list153.size; ++_i154)
              {
                String _elem155; // required
                _elem155 = iprot.readString();
                _key151.add(_elem155);
              }
            }
            _val152 = iprot.readString();
            struct.skewedColValueLocationMaps.put(_key151, _val152);
          }
        }
        struct.setSkewedColValueLocationMapsIsSet(true);
      }
View Full Code Here

  private static class PrivilegeBagTupleScheme extends TupleScheme<PrivilegeBag> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetPrivileges()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetPrivileges()) {
        {
          oprot.writeI32(struct.privileges.size());
          for (HiveObjectPrivilege _iter20 : struct.privileges)
          {
            _iter20.write(oprot);
          }
        }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        {
          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.privileges = new ArrayList<HiveObjectPrivilege>(_list21.size);
          for (int _i22 = 0; _i22 < _list21.size; ++_i22)
          {
            HiveObjectPrivilege _elem23; // required
            _elem23 = new HiveObjectPrivilege();
View Full Code Here

  private static class DoubleColumnStatsDataTupleScheme extends TupleScheme<DoubleColumnStatsData> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeDouble(struct.lowValue);
      oprot.writeDouble(struct.highValue);
      oprot.writeI64(struct.numNulls);
      oprot.writeI64(struct.numDVs);
    }
View Full Code Here

      oprot.writeI64(struct.numDVs);
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.lowValue = iprot.readDouble();
      struct.setLowValueIsSet(true);
      struct.highValue = iprot.readDouble();
      struct.setHighValueIsSet(true);
      struct.numNulls = iprot.readI64();
      struct.setNumNullsIsSet(true);
      struct.numDVs = iprot.readI64();
      struct.setNumDVsIsSet(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.