Example #1
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionRequest struct)
     throws org.apache.thrift.TException {
   org.apache.thrift.protocol.TField schemeField;
   iprot.readStructBegin();
   while (true) {
     schemeField = iprot.readFieldBegin();
     if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
       break;
     }
     switch (schemeField.id) {
       case 1: // DBNAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.dbname = iprot.readString();
           struct.setDbnameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // TABLENAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.tablename = iprot.readString();
           struct.setTablenameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // PARTITIONNAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.partitionname = iprot.readString();
           struct.setPartitionnameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // TYPE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.type =
               org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32());
           struct.setTypeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // RUNAS
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.runas = iprot.readString();
           struct.setRunasIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       default:
         org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   struct.validate();
 }
Example #2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.dbname = iprot.readString();
   struct.setDbnameIsSet(true);
   struct.tablename = iprot.readString();
   struct.setTablenameIsSet(true);
   struct.type =
       org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32());
   struct.setTypeIsSet(true);
   BitSet incoming = iprot.readBitSet(2);
   if (incoming.get(0)) {
     struct.partitionname = iprot.readString();
     struct.setPartitionnameIsSet(true);
   }
   if (incoming.get(1)) {
     struct.runas = iprot.readString();
     struct.setRunasIsSet(true);
   }
 }