예제 #1
0
 @Override
 public void clear() {
   setLockidIsSet(false);
   this.lockid = 0;
   this.dbname = null;
   this.tablename = null;
   this.partname = null;
   this.state = null;
   this.type = null;
   setTxnidIsSet(false);
   this.txnid = 0;
   setLastheartbeatIsSet(false);
   this.lastheartbeat = 0;
   setAcquiredatIsSet(false);
   this.acquiredat = 0;
   this.user = null;
   this.hostname = null;
 }
예제 #2
0
 public ShowLocksResponseElement(
     long lockid,
     String dbname,
     LockState state,
     LockType type,
     long lastheartbeat,
     String user,
     String hostname) {
   this();
   this.lockid = lockid;
   setLockidIsSet(true);
   this.dbname = dbname;
   this.state = state;
   this.type = type;
   this.lastheartbeat = lastheartbeat;
   setLastheartbeatIsSet(true);
   this.user = user;
   this.hostname = hostname;
 }
예제 #3
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.lockid = iprot.readI64();
   struct.setLockidIsSet(true);
   struct.dbname = iprot.readString();
   struct.setDbnameIsSet(true);
   struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32());
   struct.setStateIsSet(true);
   struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32());
   struct.setTypeIsSet(true);
   struct.lastheartbeat = iprot.readI64();
   struct.setLastheartbeatIsSet(true);
   struct.user = iprot.readString();
   struct.setUserIsSet(true);
   struct.hostname = iprot.readString();
   struct.setHostnameIsSet(true);
   BitSet incoming = iprot.readBitSet(4);
   if (incoming.get(0)) {
     struct.tablename = iprot.readString();
     struct.setTablenameIsSet(true);
   }
   if (incoming.get(1)) {
     struct.partname = iprot.readString();
     struct.setPartnameIsSet(true);
   }
   if (incoming.get(2)) {
     struct.txnid = iprot.readI64();
     struct.setTxnidIsSet(true);
   }
   if (incoming.get(3)) {
     struct.acquiredat = iprot.readI64();
     struct.setAcquiredatIsSet(true);
   }
 }
예제 #4
0
 public void setLockid(long lockid) {
   this.lockid = lockid;
   setLockidIsSet(true);
 }
예제 #5
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponseElement 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: // LOCKID
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.lockid = iprot.readI64();
           struct.setLockidIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // 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 3: // 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 4: // PARTNAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.partname = iprot.readString();
           struct.setPartnameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // STATE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.state =
               org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32());
           struct.setStateIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 6: // TYPE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.type =
               org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32());
           struct.setTypeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 7: // TXNID
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.txnid = iprot.readI64();
           struct.setTxnidIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 8: // LASTHEARTBEAT
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.lastheartbeat = iprot.readI64();
           struct.setLastheartbeatIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 9: // ACQUIREDAT
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.acquiredat = iprot.readI64();
           struct.setAcquiredatIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 10: // USER
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.user = iprot.readString();
           struct.setUserIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 11: // HOSTNAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.hostname = iprot.readString();
           struct.setHostnameIsSet(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();
 }