@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); } }
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(); }