FAQ
Repository: hive
Updated Branches:
   refs/heads/master 41e82012e -> 87131d0c7


http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DBTokenStore.java
----------------------------------------------------------------------
diff --git a/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DBTokenStore.java b/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DBTokenStore.java
index de39d3d..d6dc079 100644
--- a/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DBTokenStore.java
+++ b/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DBTokenStore.java
@@ -33,13 +33,14 @@ import org.slf4j.LoggerFactory;

  public class DBTokenStore implements DelegationTokenStore {
    private static final Logger LOG = LoggerFactory.getLogger(DBTokenStore.class);
+ private Configuration conf;

    @Override
    public int addMasterKey(String s) throws TokenStoreException {
      if (LOG.isTraceEnabled()) {
        LOG.trace("addMasterKey: s = " + s);
      }
- return (Integer)invokeOnRawStore("addMasterKey", new Object[]{s},String.class);
+ return (Integer)invokeOnTokenStore("addMasterKey", new Object[]{s},String.class);
    }

    @Override
@@ -47,19 +48,19 @@ public class DBTokenStore implements DelegationTokenStore {
      if (LOG.isTraceEnabled()) {
        LOG.trace("updateMasterKey: s = " + s + ", keySeq = " + keySeq);
      }
- invokeOnRawStore("updateMasterKey", new Object[] {Integer.valueOf(keySeq), s},
+ invokeOnTokenStore("updateMasterKey", new Object[] {Integer.valueOf(keySeq), s},
          Integer.class, String.class);
    }

    @Override
    public boolean removeMasterKey(int keySeq) {
- return (Boolean)invokeOnRawStore("removeMasterKey", new Object[] {Integer.valueOf(keySeq)},
+ return (Boolean)invokeOnTokenStore("removeMasterKey", new Object[] {Integer.valueOf(keySeq)},
        Integer.class);
    }

    @Override
    public String[] getMasterKeys() throws TokenStoreException {
- return (String[])invokeOnRawStore("getMasterKeys", new Object[0]);
+ return (String[])invokeOnTokenStore("getMasterKeys", new Object[0]);
    }

    @Override
@@ -70,7 +71,7 @@ public class DBTokenStore implements DelegationTokenStore {
        String identifier = TokenStoreDelegationTokenSecretManager.encodeWritable(tokenIdentifier);
        String tokenStr = Base64.encodeBase64URLSafeString(
          HiveDelegationTokenSupport.encodeDelegationTokenInformation(token));
- boolean result = (Boolean)invokeOnRawStore("addToken", new Object[] {identifier, tokenStr},
+ boolean result = (Boolean)invokeOnTokenStore("addToken", new Object[] {identifier, tokenStr},
          String.class, String.class);
        if (LOG.isTraceEnabled()) {
          LOG.trace("addToken: tokenIdentifier = " + tokenIdentifier + ", added = " + result);
@@ -85,7 +86,7 @@ public class DBTokenStore implements DelegationTokenStore {
    public DelegationTokenInformation getToken(DelegationTokenIdentifier tokenIdentifier)
        throws TokenStoreException {
      try {
- String tokenStr = (String)invokeOnRawStore("getToken", new Object[] {
+ String tokenStr = (String)invokeOnTokenStore("getToken", new Object[] {
            TokenStoreDelegationTokenSecretManager.encodeWritable(tokenIdentifier)}, String.class);
        DelegationTokenInformation result = null;
        if (tokenStr != null) {
@@ -103,7 +104,7 @@ public class DBTokenStore implements DelegationTokenStore {
    @Override
    public boolean removeToken(DelegationTokenIdentifier tokenIdentifier) throws TokenStoreException{
      try {
- boolean result = (Boolean)invokeOnRawStore("removeToken", new Object[] {
+ boolean result = (Boolean)invokeOnTokenStore("removeToken", new Object[] {
          TokenStoreDelegationTokenSecretManager.encodeWritable(tokenIdentifier)}, String.class);
        if (LOG.isTraceEnabled()) {
          LOG.trace("removeToken: tokenIdentifier = " + tokenIdentifier + ", removed = " + result);
@@ -117,7 +118,7 @@ public class DBTokenStore implements DelegationTokenStore {
    @Override
    public List<DelegationTokenIdentifier> getAllDelegationTokenIdentifiers() throws TokenStoreException{

- List<String> tokenIdents = (List<String>)invokeOnRawStore("getAllTokenIdentifiers", new Object[0]);
+ List<String> tokenIdents = (List<String>)invokeOnTokenStore("getAllTokenIdentifiers", new Object[0]);
      List<DelegationTokenIdentifier> delTokenIdents = new ArrayList<DelegationTokenIdentifier>(tokenIdents.size());

      for (String tokenIdent : tokenIdents) {
@@ -132,19 +133,33 @@ public class DBTokenStore implements DelegationTokenStore {
      return delTokenIdents;
    }

- private Object hmsHandler;
+ private Object handler;
+ private ServerMode smode;

    @Override
- public void init(Object hms, ServerMode smode) throws TokenStoreException {
- this.hmsHandler = hms;
+ public void init(Object handler, ServerMode smode) throws TokenStoreException {
+ this.handler = handler;
+ this.smode = smode;
    }

- private Object invokeOnRawStore(String methName, Object[] params, Class<?> ... paramTypes)
+ private Object invokeOnTokenStore(String methName, Object[] params, Class<?> ... paramTypes)
        throws TokenStoreException{
-
+ Object tokenStore;
      try {
- Object rawStore = hmsHandler.getClass().getMethod("getMS").invoke(hmsHandler);
- return rawStore.getClass().getMethod(methName, paramTypes).invoke(rawStore, params);
+ switch (smode) {
+ case METASTORE :
+ tokenStore = handler.getClass().getMethod("getMS").invoke(handler);
+ break;
+ case HIVESERVER2 :
+ Object hiveObject = ((Class<?>)handler)
+ .getMethod("get", org.apache.hadoop.conf.Configuration.class, java.lang.Class.class)
+ .invoke(handler, conf, DBTokenStore.class);
+ tokenStore = ((Class<?>)handler).getMethod("getMSC").invoke(hiveObject);
+ break;
+ default:
+ throw new TokenStoreException(new Exception("unknown server mode"));
+ }
+ return tokenStore.getClass().getMethod(methName, paramTypes).invoke(tokenStore, params);
      } catch (IllegalArgumentException e) {
          throw new TokenStoreException(e);
      } catch (SecurityException e) {
@@ -160,12 +175,12 @@ public class DBTokenStore implements DelegationTokenStore {

    @Override
    public void setConf(Configuration conf) {
- // No-op
+ this.conf = conf;
    }

    @Override
    public Configuration getConf() {
- return null;
+ return conf;
    }

    @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/shims/common/src/main/java/org/apache/hadoop/hive/thrift/HiveDelegationTokenManager.java
----------------------------------------------------------------------
diff --git a/shims/common/src/main/java/org/apache/hadoop/hive/thrift/HiveDelegationTokenManager.java b/shims/common/src/main/java/org/apache/hadoop/hive/thrift/HiveDelegationTokenManager.java
index 9ecb0ee..b3e4a76 100644
--- a/shims/common/src/main/java/org/apache/hadoop/hive/thrift/HiveDelegationTokenManager.java
+++ b/shims/common/src/main/java/org/apache/hadoop/hive/thrift/HiveDelegationTokenManager.java
@@ -89,6 +89,7 @@ public class HiveDelegationTokenManager {
          conf.getLong(DELEGATION_TOKEN_GC_INTERVAL, DELEGATION_TOKEN_GC_INTERVAL_DEFAULT);

      DelegationTokenStore dts = getTokenStore(conf);
+ dts.setConf(conf);
      dts.init(hms, smode);
      secretManager =
          new TokenStoreDelegationTokenSecretManager(secretKeyInterval, tokenMaxLifetime,

Search Discussions

  • Ctang at Mar 8, 2016 at 8:06 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    index 0da1acf..ac8d8a4 100644
    --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    @@ -954,6 +954,56 @@ class Iface(fb303.FacebookService.Iface):
          """
          pass

    + def add_token(self, token_identifier, delegation_token):
    + """
    + Parameters:
    + - token_identifier
    + - delegation_token
    + """
    + pass
    +
    + def remove_token(self, token_identifier):
    + """
    + Parameters:
    + - token_identifier
    + """
    + pass
    +
    + def get_token(self, token_identifier):
    + """
    + Parameters:
    + - token_identifier
    + """
    + pass
    +
    + def get_all_token_identifiers(self):
    + pass
    +
    + def add_master_key(self, key):
    + """
    + Parameters:
    + - key
    + """
    + pass
    +
    + def update_master_key(self, seq_number, key):
    + """
    + Parameters:
    + - seq_number
    + - key
    + """
    + pass
    +
    + def remove_master_key(self, key_seq):
    + """
    + Parameters:
    + - key_seq
    + """
    + pass
    +
    + def get_master_keys(self):
    + pass
    +
        def get_open_txns(self):
          pass

    @@ -5306,6 +5356,252 @@ class Client(fb303.FacebookService.Client, Iface):
            raise result.o1
          return

    + def add_token(self, token_identifier, delegation_token):
    + """
    + Parameters:
    + - token_identifier
    + - delegation_token
    + """
    + self.send_add_token(token_identifier, delegation_token)
    + return self.recv_add_token()
    +
    + def send_add_token(self, token_identifier, delegation_token):
    + self._oprot.writeMessageBegin('add_token', TMessageType.CALL, self._seqid)
    + args = add_token_args()
    + args.token_identifier = token_identifier
    + args.delegation_token = delegation_token
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_add_token(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = add_token_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_token failed: unknown result")
    +
    + def remove_token(self, token_identifier):
    + """
    + Parameters:
    + - token_identifier
    + """
    + self.send_remove_token(token_identifier)
    + return self.recv_remove_token()
    +
    + def send_remove_token(self, token_identifier):
    + self._oprot.writeMessageBegin('remove_token', TMessageType.CALL, self._seqid)
    + args = remove_token_args()
    + args.token_identifier = token_identifier
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_remove_token(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = remove_token_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_token failed: unknown result")
    +
    + def get_token(self, token_identifier):
    + """
    + Parameters:
    + - token_identifier
    + """
    + self.send_get_token(token_identifier)
    + return self.recv_get_token()
    +
    + def send_get_token(self, token_identifier):
    + self._oprot.writeMessageBegin('get_token', TMessageType.CALL, self._seqid)
    + args = get_token_args()
    + args.token_identifier = token_identifier
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_get_token(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = get_token_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_token failed: unknown result")
    +
    + def get_all_token_identifiers(self):
    + self.send_get_all_token_identifiers()
    + return self.recv_get_all_token_identifiers()
    +
    + def send_get_all_token_identifiers(self):
    + self._oprot.writeMessageBegin('get_all_token_identifiers', TMessageType.CALL, self._seqid)
    + args = get_all_token_identifiers_args()
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_get_all_token_identifiers(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = get_all_token_identifiers_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result")
    +
    + def add_master_key(self, key):
    + """
    + Parameters:
    + - key
    + """
    + self.send_add_master_key(key)
    + return self.recv_add_master_key()
    +
    + def send_add_master_key(self, key):
    + self._oprot.writeMessageBegin('add_master_key', TMessageType.CALL, self._seqid)
    + args = add_master_key_args()
    + args.key = key
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_add_master_key(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = add_master_key_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + if result.o1 is not None:
    + raise result.o1
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result")
    +
    + def update_master_key(self, seq_number, key):
    + """
    + Parameters:
    + - seq_number
    + - key
    + """
    + self.send_update_master_key(seq_number, key)
    + self.recv_update_master_key()
    +
    + def send_update_master_key(self, seq_number, key):
    + self._oprot.writeMessageBegin('update_master_key', TMessageType.CALL, self._seqid)
    + args = update_master_key_args()
    + args.seq_number = seq_number
    + args.key = key
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_update_master_key(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = update_master_key_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.o1 is not None:
    + raise result.o1
    + if result.o2 is not None:
    + raise result.o2
    + return
    +
    + def remove_master_key(self, key_seq):
    + """
    + Parameters:
    + - key_seq
    + """
    + self.send_remove_master_key(key_seq)
    + return self.recv_remove_master_key()
    +
    + def send_remove_master_key(self, key_seq):
    + self._oprot.writeMessageBegin('remove_master_key', TMessageType.CALL, self._seqid)
    + args = remove_master_key_args()
    + args.key_seq = key_seq
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_remove_master_key(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = remove_master_key_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result")
    +
    + def get_master_keys(self):
    + self.send_get_master_keys()
    + return self.recv_get_master_keys()
    +
    + def send_get_master_keys(self):
    + self._oprot.writeMessageBegin('get_master_keys', TMessageType.CALL, self._seqid)
    + args = get_master_keys_args()
    + args.write(self._oprot)
    + self._oprot.writeMessageEnd()
    + self._oprot.trans.flush()
    +
    + def recv_get_master_keys(self):
    + iprot = self._iprot
    + (fname, mtype, rseqid) = iprot.readMessageBegin()
    + if mtype == TMessageType.EXCEPTION:
    + x = TApplicationException()
    + x.read(iprot)
    + iprot.readMessageEnd()
    + raise x
    + result = get_master_keys_result()
    + result.read(iprot)
    + iprot.readMessageEnd()
    + if result.success is not None:
    + return result.success
    + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result")
    +
        def get_open_txns(self):
          self.send_get_open_txns()
          return self.recv_get_open_txns()
    @@ -6161,6 +6457,14 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
          self._processMap["get_delegation_token"] = Processor.process_get_delegation_token
          self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token
          self._processMap["cancel_delegation_token"] = Processor.process_cancel_delegation_token
    + self._processMap["add_token"] = Processor.process_add_token
    + self._processMap["remove_token"] = Processor.process_remove_token
    + self._processMap["get_token"] = Processor.process_get_token
    + self._processMap["get_all_token_identifiers"] = Processor.process_get_all_token_identifiers
    + self._processMap["add_master_key"] = Processor.process_add_master_key
    + self._processMap["update_master_key"] = Processor.process_update_master_key
    + self._processMap["remove_master_key"] = Processor.process_remove_master_key
    + self._processMap["get_master_keys"] = Processor.process_get_master_keys
          self._processMap["get_open_txns"] = Processor.process_get_open_txns
          self._processMap["get_open_txns_info"] = Processor.process_get_open_txns_info
          self._processMap["open_txns"] = Processor.process_open_txns
    @@ -9027,13 +9331,13 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_get_open_txns(self, seqid, iprot, oprot):
    - args = get_open_txns_args()
    + def process_add_token(self, seqid, iprot, oprot):
    + args = add_token_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = get_open_txns_result()
    + result = add_token_result()
          try:
    - result.success = self._handler.get_open_txns()
    + result.success = self._handler.add_token(args.token_identifier, args.delegation_token)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    @@ -9041,18 +9345,18 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("get_open_txns", msg_type, seqid)
    + oprot.writeMessageBegin("add_token", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_get_open_txns_info(self, seqid, iprot, oprot):
    - args = get_open_txns_info_args()
    + def process_remove_token(self, seqid, iprot, oprot):
    + args = remove_token_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = get_open_txns_info_result()
    + result = remove_token_result()
          try:
    - result.success = self._handler.get_open_txns_info()
    + result.success = self._handler.remove_token(args.token_identifier)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    @@ -9060,18 +9364,18 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("get_open_txns_info", msg_type, seqid)
    + oprot.writeMessageBegin("remove_token", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_open_txns(self, seqid, iprot, oprot):
    - args = open_txns_args()
    + def process_get_token(self, seqid, iprot, oprot):
    + args = get_token_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = open_txns_result()
    + result = get_token_result()
          try:
    - result.success = self._handler.open_txns(args.rqst)
    + result.success = self._handler.get_token(args.token_identifier)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    @@ -9079,112 +9383,273 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("open_txns", msg_type, seqid)
    + oprot.writeMessageBegin("get_token", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_abort_txn(self, seqid, iprot, oprot):
    - args = abort_txn_args()
    + def process_get_all_token_identifiers(self, seqid, iprot, oprot):
    + args = get_all_token_identifiers_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = abort_txn_result()
    + result = get_all_token_identifiers_result()
          try:
    - self._handler.abort_txn(args.rqst)
    + result.success = self._handler.get_all_token_identifiers()
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    - except NoSuchTxnException as o1:
    - msg_type = TMessageType.REPLY
    - result.o1 = o1
          except Exception as ex:
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("abort_txn", msg_type, seqid)
    + oprot.writeMessageBegin("get_all_token_identifiers", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_commit_txn(self, seqid, iprot, oprot):
    - args = commit_txn_args()
    + def process_add_master_key(self, seqid, iprot, oprot):
    + args = add_master_key_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = commit_txn_result()
    + result = add_master_key_result()
          try:
    - self._handler.commit_txn(args.rqst)
    + result.success = self._handler.add_master_key(args.key)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    - except NoSuchTxnException as o1:
    + except MetaException as o1:
            msg_type = TMessageType.REPLY
            result.o1 = o1
    - except TxnAbortedException as o2:
    - msg_type = TMessageType.REPLY
    - result.o2 = o2
          except Exception as ex:
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("commit_txn", msg_type, seqid)
    + oprot.writeMessageBegin("add_master_key", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_lock(self, seqid, iprot, oprot):
    - args = lock_args()
    + def process_update_master_key(self, seqid, iprot, oprot):
    + args = update_master_key_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = lock_result()
    + result = update_master_key_result()
          try:
    - result.success = self._handler.lock(args.rqst)
    + self._handler.update_master_key(args.seq_number, args.key)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    - except NoSuchTxnException as o1:
    + except NoSuchObjectException as o1:
            msg_type = TMessageType.REPLY
            result.o1 = o1
    - except TxnAbortedException as o2:
    + except MetaException as o2:
            msg_type = TMessageType.REPLY
            result.o2 = o2
          except Exception as ex:
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("lock", msg_type, seqid)
    + oprot.writeMessageBegin("update_master_key", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_check_lock(self, seqid, iprot, oprot):
    - args = check_lock_args()
    + def process_remove_master_key(self, seqid, iprot, oprot):
    + args = remove_master_key_args()
          args.read(iprot)
          iprot.readMessageEnd()
    - result = check_lock_result()
    + result = remove_master_key_result()
          try:
    - result.success = self._handler.check_lock(args.rqst)
    + result.success = self._handler.remove_master_key(args.key_seq)
            msg_type = TMessageType.REPLY
          except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
    - except NoSuchTxnException as o1:
    - msg_type = TMessageType.REPLY
    - result.o1 = o1
    - except TxnAbortedException as o2:
    - msg_type = TMessageType.REPLY
    - result.o2 = o2
    - except NoSuchLockException as o3:
    - msg_type = TMessageType.REPLY
    - result.o3 = o3
          except Exception as ex:
            msg_type = TMessageType.EXCEPTION
            logging.exception(ex)
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    - oprot.writeMessageBegin("check_lock", msg_type, seqid)
    + oprot.writeMessageBegin("remove_master_key", msg_type, seqid)
          result.write(oprot)
          oprot.writeMessageEnd()
          oprot.trans.flush()

    - def process_unlock(self, seqid, iprot, oprot):
    + def process_get_master_keys(self, seqid, iprot, oprot):
    + args = get_master_keys_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = get_master_keys_result()
    + try:
    + result.success = self._handler.get_master_keys()
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("get_master_keys", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_get_open_txns(self, seqid, iprot, oprot):
    + args = get_open_txns_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = get_open_txns_result()
    + try:
    + result.success = self._handler.get_open_txns()
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("get_open_txns", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_get_open_txns_info(self, seqid, iprot, oprot):
    + args = get_open_txns_info_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = get_open_txns_info_result()
    + try:
    + result.success = self._handler.get_open_txns_info()
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("get_open_txns_info", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_open_txns(self, seqid, iprot, oprot):
    + args = open_txns_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = open_txns_result()
    + try:
    + result.success = self._handler.open_txns(args.rqst)
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("open_txns", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_abort_txn(self, seqid, iprot, oprot):
    + args = abort_txn_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = abort_txn_result()
    + try:
    + self._handler.abort_txn(args.rqst)
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except NoSuchTxnException as o1:
    + msg_type = TMessageType.REPLY
    + result.o1 = o1
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("abort_txn", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_commit_txn(self, seqid, iprot, oprot):
    + args = commit_txn_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = commit_txn_result()
    + try:
    + self._handler.commit_txn(args.rqst)
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except NoSuchTxnException as o1:
    + msg_type = TMessageType.REPLY
    + result.o1 = o1
    + except TxnAbortedException as o2:
    + msg_type = TMessageType.REPLY
    + result.o2 = o2
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("commit_txn", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_lock(self, seqid, iprot, oprot):
    + args = lock_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = lock_result()
    + try:
    + result.success = self._handler.lock(args.rqst)
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except NoSuchTxnException as o1:
    + msg_type = TMessageType.REPLY
    + result.o1 = o1
    + except TxnAbortedException as o2:
    + msg_type = TMessageType.REPLY
    + result.o2 = o2
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("lock", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_check_lock(self, seqid, iprot, oprot):
    + args = check_lock_args()
    + args.read(iprot)
    + iprot.readMessageEnd()
    + result = check_lock_result()
    + try:
    + result.success = self._handler.check_lock(args.rqst)
    + msg_type = TMessageType.REPLY
    + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
    + raise
    + except NoSuchTxnException as o1:
    + msg_type = TMessageType.REPLY
    + result.o1 = o1
    + except TxnAbortedException as o2:
    + msg_type = TMessageType.REPLY
    + result.o2 = o2
    + except NoSuchLockException as o3:
    + msg_type = TMessageType.REPLY
    + result.o3 = o3
    + except Exception as ex:
    + msg_type = TMessageType.EXCEPTION
    + logging.exception(ex)
    + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
    + oprot.writeMessageBegin("check_lock", msg_type, seqid)
    + result.write(oprot)
    + oprot.writeMessageEnd()
    + oprot.trans.flush()
    +
    + def process_unlock(self, seqid, iprot, oprot):
          args = unlock_args()
          args.read(iprot)
          iprot.readMessageEnd()
    @@ -29618,6 +30083,1072 @@ class cancel_delegation_token_result:
        def __ne__(self, other):
          return not (self == other)

    +class add_token_args:
    + """
    + Attributes:
    + - token_identifier
    + - delegation_token
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.STRING, 'token_identifier', None, None, ), # 1
    + (2, TType.STRING, 'delegation_token', None, None, ), # 2
    + )
    +
    + def __init__(self, token_identifier=None, delegation_token=None,):
    + self.token_identifier = token_identifier
    + self.delegation_token = delegation_token
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.STRING:
    + self.token_identifier = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + elif fid == 2:
    + if ftype == TType.STRING:
    + self.delegation_token = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('add_token_args')
    + if self.token_identifier is not None:
    + oprot.writeFieldBegin('token_identifier', TType.STRING, 1)
    + oprot.writeString(self.token_identifier)
    + oprot.writeFieldEnd()
    + if self.delegation_token is not None:
    + oprot.writeFieldBegin('delegation_token', TType.STRING, 2)
    + oprot.writeString(self.delegation_token)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.token_identifier)
    + value = (value * 31) ^ hash(self.delegation_token)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class add_token_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.BOOL, 'success', None, None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.BOOL:
    + self.success = iprot.readBool()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('add_token_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.BOOL, 0)
    + oprot.writeBool(self.success)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class remove_token_args:
    + """
    + Attributes:
    + - token_identifier
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.STRING, 'token_identifier', None, None, ), # 1
    + )
    +
    + def __init__(self, token_identifier=None,):
    + self.token_identifier = token_identifier
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.STRING:
    + self.token_identifier = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('remove_token_args')
    + if self.token_identifier is not None:
    + oprot.writeFieldBegin('token_identifier', TType.STRING, 1)
    + oprot.writeString(self.token_identifier)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.token_identifier)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class remove_token_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.BOOL, 'success', None, None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.BOOL:
    + self.success = iprot.readBool()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('remove_token_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.BOOL, 0)
    + oprot.writeBool(self.success)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_token_args:
    + """
    + Attributes:
    + - token_identifier
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.STRING, 'token_identifier', None, None, ), # 1
    + )
    +
    + def __init__(self, token_identifier=None,):
    + self.token_identifier = token_identifier
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.STRING:
    + self.token_identifier = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_token_args')
    + if self.token_identifier is not None:
    + oprot.writeFieldBegin('token_identifier', TType.STRING, 1)
    + oprot.writeString(self.token_identifier)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.token_identifier)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_token_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.STRING, 'success', None, None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.STRING:
    + self.success = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_token_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.STRING, 0)
    + oprot.writeString(self.success)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_all_token_identifiers_args:
    +
    + thrift_spec = (
    + )
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_all_token_identifiers_args')
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_all_token_identifiers_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.LIST:
    + self.success = []
    + (_etype950, _size947) = iprot.readListBegin()
    + for _i951 in xrange(_size947):
    + _elem952 = iprot.readString()
    + self.success.append(_elem952)
    + iprot.readListEnd()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_all_token_identifiers_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.LIST, 0)
    + oprot.writeListBegin(TType.STRING, len(self.success))
    + for iter953 in self.success:
    + oprot.writeString(iter953)
    + oprot.writeListEnd()
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class add_master_key_args:
    + """
    + Attributes:
    + - key
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.STRING, 'key', None, None, ), # 1
    + )
    +
    + def __init__(self, key=None,):
    + self.key = key
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.STRING:
    + self.key = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('add_master_key_args')
    + if self.key is not None:
    + oprot.writeFieldBegin('key', TType.STRING, 1)
    + oprot.writeString(self.key)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.key)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class add_master_key_result:
    + """
    + Attributes:
    + - success
    + - o1
    + """
    +
    + thrift_spec = (
    + (0, TType.I32, 'success', None, None, ), # 0
    + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
    + )
    +
    + def __init__(self, success=None, o1=None,):
    + self.success = success
    + self.o1 = o1
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.I32:
    + self.success = iprot.readI32()
    + else:
    + iprot.skip(ftype)
    + elif fid == 1:
    + if ftype == TType.STRUCT:
    + self.o1 = MetaException()
    + self.o1.read(iprot)
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('add_master_key_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.I32, 0)
    + oprot.writeI32(self.success)
    + oprot.writeFieldEnd()
    + if self.o1 is not None:
    + oprot.writeFieldBegin('o1', TType.STRUCT, 1)
    + self.o1.write(oprot)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + value = (value * 31) ^ hash(self.o1)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class update_master_key_args:
    + """
    + Attributes:
    + - seq_number
    + - key
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.I32, 'seq_number', None, None, ), # 1
    + (2, TType.STRING, 'key', None, None, ), # 2
    + )
    +
    + def __init__(self, seq_number=None, key=None,):
    + self.seq_number = seq_number
    + self.key = key
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.I32:
    + self.seq_number = iprot.readI32()
    + else:
    + iprot.skip(ftype)
    + elif fid == 2:
    + if ftype == TType.STRING:
    + self.key = iprot.readString()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('update_master_key_args')
    + if self.seq_number is not None:
    + oprot.writeFieldBegin('seq_number', TType.I32, 1)
    + oprot.writeI32(self.seq_number)
    + oprot.writeFieldEnd()
    + if self.key is not None:
    + oprot.writeFieldBegin('key', TType.STRING, 2)
    + oprot.writeString(self.key)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.seq_number)
    + value = (value * 31) ^ hash(self.key)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class update_master_key_result:
    + """
    + Attributes:
    + - o1
    + - o2
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
    + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
    + )
    +
    + def __init__(self, o1=None, o2=None,):
    + self.o1 = o1
    + self.o2 = o2
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.STRUCT:
    + self.o1 = NoSuchObjectException()
    + self.o1.read(iprot)
    + else:
    + iprot.skip(ftype)
    + elif fid == 2:
    + if ftype == TType.STRUCT:
    + self.o2 = MetaException()
    + self.o2.read(iprot)
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('update_master_key_result')
    + if self.o1 is not None:
    + oprot.writeFieldBegin('o1', TType.STRUCT, 1)
    + self.o1.write(oprot)
    + oprot.writeFieldEnd()
    + if self.o2 is not None:
    + oprot.writeFieldBegin('o2', TType.STRUCT, 2)
    + self.o2.write(oprot)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.o1)
    + value = (value * 31) ^ hash(self.o2)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class remove_master_key_args:
    + """
    + Attributes:
    + - key_seq
    + """
    +
    + thrift_spec = (
    + None, # 0
    + (1, TType.I32, 'key_seq', None, None, ), # 1
    + )
    +
    + def __init__(self, key_seq=None,):
    + self.key_seq = key_seq
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 1:
    + if ftype == TType.I32:
    + self.key_seq = iprot.readI32()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('remove_master_key_args')
    + if self.key_seq is not None:
    + oprot.writeFieldBegin('key_seq', TType.I32, 1)
    + oprot.writeI32(self.key_seq)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.key_seq)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class remove_master_key_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.BOOL, 'success', None, None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.BOOL:
    + self.success = iprot.readBool()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('remove_master_key_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.BOOL, 0)
    + oprot.writeBool(self.success)
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_master_keys_args:
    +
    + thrift_spec = (
    + )
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_master_keys_args')
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
    +class get_master_keys_result:
    + """
    + Attributes:
    + - success
    + """
    +
    + thrift_spec = (
    + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
    + )
    +
    + def __init__(self, success=None,):
    + self.success = success
    +
    + def read(self, iprot):
    + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
    + return
    + iprot.readStructBegin()
    + while True:
    + (fname, ftype, fid) = iprot.readFieldBegin()
    + if ftype == TType.STOP:
    + break
    + if fid == 0:
    + if ftype == TType.LIST:
    + self.success = []
    + (_etype957, _size954) = iprot.readListBegin()
    + for _i958 in xrange(_size954):
    + _elem959 = iprot.readString()
    + self.success.append(_elem959)
    + iprot.readListEnd()
    + else:
    + iprot.skip(ftype)
    + else:
    + iprot.skip(ftype)
    + iprot.readFieldEnd()
    + iprot.readStructEnd()
    +
    + def write(self, oprot):
    + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
    + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
    + return
    + oprot.writeStructBegin('get_master_keys_result')
    + if self.success is not None:
    + oprot.writeFieldBegin('success', TType.LIST, 0)
    + oprot.writeListBegin(TType.STRING, len(self.success))
    + for iter960 in self.success:
    + oprot.writeString(iter960)
    + oprot.writeListEnd()
    + oprot.writeFieldEnd()
    + oprot.writeFieldStop()
    + oprot.writeStructEnd()
    +
    + def validate(self):
    + return
    +
    +
    + def __hash__(self):
    + value = 17
    + value = (value * 31) ^ hash(self.success)
    + return value
    +
    + def __repr__(self):
    + L = ['%s=%r' % (key, value)
    + for key, value in self.__dict__.iteritems()]
    + return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
    +
    + def __eq__(self, other):
    + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
    +
    + def __ne__(self, other):
    + return not (self == other)
    +
      class get_open_txns_args:

        thrift_spec = (

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    index de316ae..e782bb5 100644
    --- a/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    +++ b/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    @@ -1894,6 +1894,128 @@ module ThriftHiveMetastore
            return
          end

    + def add_token(token_identifier, delegation_token)
    + send_add_token(token_identifier, delegation_token)
    + return recv_add_token()
    + end
    +
    + def send_add_token(token_identifier, delegation_token)
    + send_message('add_token', Add_token_args, :token_identifier => token_identifier, :delegation_token => delegation_token)
    + end
    +
    + def recv_add_token()
    + result = receive_message(Add_token_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_token failed: unknown result')
    + end
    +
    + def remove_token(token_identifier)
    + send_remove_token(token_identifier)
    + return recv_remove_token()
    + end
    +
    + def send_remove_token(token_identifier)
    + send_message('remove_token', Remove_token_args, :token_identifier => token_identifier)
    + end
    +
    + def recv_remove_token()
    + result = receive_message(Remove_token_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_token failed: unknown result')
    + end
    +
    + def get_token(token_identifier)
    + send_get_token(token_identifier)
    + return recv_get_token()
    + end
    +
    + def send_get_token(token_identifier)
    + send_message('get_token', Get_token_args, :token_identifier => token_identifier)
    + end
    +
    + def recv_get_token()
    + result = receive_message(Get_token_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_token failed: unknown result')
    + end
    +
    + def get_all_token_identifiers()
    + send_get_all_token_identifiers()
    + return recv_get_all_token_identifiers()
    + end
    +
    + def send_get_all_token_identifiers()
    + send_message('get_all_token_identifiers', Get_all_token_identifiers_args)
    + end
    +
    + def recv_get_all_token_identifiers()
    + result = receive_message(Get_all_token_identifiers_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_token_identifiers failed: unknown result')
    + end
    +
    + def add_master_key(key)
    + send_add_master_key(key)
    + return recv_add_master_key()
    + end
    +
    + def send_add_master_key(key)
    + send_message('add_master_key', Add_master_key_args, :key => key)
    + end
    +
    + def recv_add_master_key()
    + result = receive_message(Add_master_key_result)
    + return result.success unless result.success.nil?
    + raise result.o1 unless result.o1.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_master_key failed: unknown result')
    + end
    +
    + def update_master_key(seq_number, key)
    + send_update_master_key(seq_number, key)
    + recv_update_master_key()
    + end
    +
    + def send_update_master_key(seq_number, key)
    + send_message('update_master_key', Update_master_key_args, :seq_number => seq_number, :key => key)
    + end
    +
    + def recv_update_master_key()
    + result = receive_message(Update_master_key_result)
    + raise result.o1 unless result.o1.nil?
    + raise result.o2 unless result.o2.nil?
    + return
    + end
    +
    + def remove_master_key(key_seq)
    + send_remove_master_key(key_seq)
    + return recv_remove_master_key()
    + end
    +
    + def send_remove_master_key(key_seq)
    + send_message('remove_master_key', Remove_master_key_args, :key_seq => key_seq)
    + end
    +
    + def recv_remove_master_key()
    + result = receive_message(Remove_master_key_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_master_key failed: unknown result')
    + end
    +
    + def get_master_keys()
    + send_get_master_keys()
    + return recv_get_master_keys()
    + end
    +
    + def send_get_master_keys()
    + send_message('get_master_keys', Get_master_keys_args)
    + end
    +
    + def recv_get_master_keys()
    + result = receive_message(Get_master_keys_result)
    + return result.success unless result.success.nil?
    + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_master_keys failed: unknown result')
    + end
    +
          def get_open_txns()
            send_get_open_txns()
            return recv_get_open_txns()
    @@ -3744,6 +3866,72 @@ module ThriftHiveMetastore
            write_result(result, oprot, 'cancel_delegation_token', seqid)
          end

    + def process_add_token(seqid, iprot, oprot)
    + args = read_args(iprot, Add_token_args)
    + result = Add_token_result.new()
    + result.success = @handler.add_token(args.token_identifier, args.delegation_token)
    + write_result(result, oprot, 'add_token', seqid)
    + end
    +
    + def process_remove_token(seqid, iprot, oprot)
    + args = read_args(iprot, Remove_token_args)
    + result = Remove_token_result.new()
    + result.success = @handler.remove_token(args.token_identifier)
    + write_result(result, oprot, 'remove_token', seqid)
    + end
    +
    + def process_get_token(seqid, iprot, oprot)
    + args = read_args(iprot, Get_token_args)
    + result = Get_token_result.new()
    + result.success = @handler.get_token(args.token_identifier)
    + write_result(result, oprot, 'get_token', seqid)
    + end
    +
    + def process_get_all_token_identifiers(seqid, iprot, oprot)
    + args = read_args(iprot, Get_all_token_identifiers_args)
    + result = Get_all_token_identifiers_result.new()
    + result.success = @handler.get_all_token_identifiers()
    + write_result(result, oprot, 'get_all_token_identifiers', seqid)
    + end
    +
    + def process_add_master_key(seqid, iprot, oprot)
    + args = read_args(iprot, Add_master_key_args)
    + result = Add_master_key_result.new()
    + begin
    + result.success = @handler.add_master_key(args.key)
    + rescue ::MetaException => o1
    + result.o1 = o1
    + end
    + write_result(result, oprot, 'add_master_key', seqid)
    + end
    +
    + def process_update_master_key(seqid, iprot, oprot)
    + args = read_args(iprot, Update_master_key_args)
    + result = Update_master_key_result.new()
    + begin
    + @handler.update_master_key(args.seq_number, args.key)
    + rescue ::NoSuchObjectException => o1
    + result.o1 = o1
    + rescue ::MetaException => o2
    + result.o2 = o2
    + end
    + write_result(result, oprot, 'update_master_key', seqid)
    + end
    +
    + def process_remove_master_key(seqid, iprot, oprot)
    + args = read_args(iprot, Remove_master_key_args)
    + result = Remove_master_key_result.new()
    + result.success = @handler.remove_master_key(args.key_seq)
    + write_result(result, oprot, 'remove_master_key', seqid)
    + end
    +
    + def process_get_master_keys(seqid, iprot, oprot)
    + args = read_args(iprot, Get_master_keys_args)
    + result = Get_master_keys_result.new()
    + result.success = @handler.get_master_keys()
    + write_result(result, oprot, 'get_master_keys', seqid)
    + end
    +
          def process_get_open_txns(seqid, iprot, oprot)
            args = read_args(iprot, Get_open_txns_args)
            result = Get_open_txns_result.new()
    @@ -8296,6 +8484,268 @@ module ThriftHiveMetastore
          ::Thrift::Struct.generate_accessors self
        end

    + class Add_token_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + TOKEN_IDENTIFIER = 1
    + DELEGATION_TOKEN = 2
    +
    + FIELDS = {
    + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'},
    + DELEGATION_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegation_token'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Add_token_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Remove_token_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + TOKEN_IDENTIFIER = 1
    +
    + FIELDS = {
    + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Remove_token_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_token_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + TOKEN_IDENTIFIER = 1
    +
    + FIELDS = {
    + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_token_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_all_token_identifiers_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    +
    + FIELDS = {
    +
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_all_token_identifiers_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Add_master_key_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + KEY = 1
    +
    + FIELDS = {
    + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Add_master_key_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    + O1 = 1
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
    + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Update_master_key_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SEQ_NUMBER = 1
    + KEY = 2
    +
    + FIELDS = {
    + SEQ_NUMBER => {:type => ::Thrift::Types::I32, :name => 'seq_number'},
    + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Update_master_key_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + O1 = 1
    + O2 = 2
    +
    + FIELDS = {
    + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException},
    + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Remove_master_key_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + KEY_SEQ = 1
    +
    + FIELDS = {
    + KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Remove_master_key_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_master_keys_args
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    +
    + FIELDS = {
    +
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
    + class Get_master_keys_result
    + include ::Thrift::Struct, ::Thrift::Struct_Union
    + SUCCESS = 0
    +
    + FIELDS = {
    + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
    + }
    +
    + def struct_fields; FIELDS; end
    +
    + def validate
    + end
    +
    + ::Thrift::Struct.generate_accessors self
    + end
    +
        class Get_open_txns_args
          include ::Thrift::Struct, ::Thrift::Struct_Union


    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    index 50b38fa..0e8a157 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    @@ -5271,6 +5271,165 @@ public class HiveMetaStore extends ThriftHiveMetastore {
          }

          @Override
    + public boolean add_token(String token_identifier, String delegation_token) throws TException {
    + startFunction("add_token", ": " + token_identifier);
    + boolean ret = false;
    + Exception ex = null;
    + try {
    + ret = getMS().addToken(token_identifier, delegation_token);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("add_token", ret == true, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public boolean remove_token(String token_identifier) throws TException {
    + startFunction("remove_token", ": " + token_identifier);
    + boolean ret = false;
    + Exception ex = null;
    + try {
    + ret = getMS().removeToken(token_identifier);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("remove_token", ret == true, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public String get_token(String token_identifier) throws TException {
    + startFunction("get_token for", ": " + token_identifier);
    + String ret = null;
    + Exception ex = null;
    + try {
    + ret = getMS().getToken(token_identifier);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("get_token", ret != null, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public List<String> get_all_token_identifiers() throws TException {
    + startFunction("get_all_token_identifiers.");
    + List<String> ret = null;
    + Exception ex = null;
    + try {
    + ret = getMS().getAllTokenIdentifiers();
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("get_all_token_identifiers.", ex == null, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public int add_master_key(String key) throws MetaException, TException {
    + startFunction("add_master_key.");
    + int ret = -1;
    + Exception ex = null;
    + try {
    + ret = getMS().addMasterKey(key);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("add_master_key.", ex == null, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public void update_master_key(int seq_number, String key) throws NoSuchObjectException,
    + MetaException, TException {
    + startFunction("update_master_key.");
    + Exception ex = null;
    + try {
    + getMS().updateMasterKey(seq_number, key);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("update_master_key.", ex == null, ex);
    + }
    + }
    +
    + @Override
    + public boolean remove_master_key(int key_seq) throws TException {
    + startFunction("remove_master_key.");
    + Exception ex = null;
    + boolean ret;
    + try {
    + ret = getMS().removeMasterKey(key_seq);
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("remove_master_key.", ex == null, ex);
    + }
    + return ret;
    + }
    +
    + @Override
    + public List<String> get_master_keys() throws TException {
    + startFunction("get_master_keys.");
    + Exception ex = null;
    + String [] ret = null;
    + try {
    + ret = getMS().getMasterKeys();
    + } catch (Exception e) {
    + ex = e;
    + if (e instanceof MetaException) {
    + throw (MetaException) e;
    + } else {
    + throw newMetaException(e);
    + }
    + } finally {
    + endFunction("get_master_keys.", ret != null, ex);
    + }
    + return Arrays.asList(ret);
    + }
    +
    + @Override
          public void markPartitionForEvent(final String db_name, final String tbl_name,
              final Map<String, String> partName, final PartitionEventType evtType) throws
              MetaException, TException, NoSuchObjectException, UnknownDBException,

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    index b5c4d1d..9048d45 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    @@ -1938,6 +1938,48 @@ public class HiveMetaStoreClient implements IMetaStoreClient {
        }

        @Override
    + public boolean addToken(String tokenIdentifier, String delegationToken) throws TException {
    + return client.add_token(tokenIdentifier, delegationToken);
    + }
    +
    + @Override
    + public boolean removeToken(String tokenIdentifier) throws TException {
    + return client.remove_token(tokenIdentifier);
    + }
    +
    + @Override
    + public String getToken(String tokenIdentifier) throws TException {
    + return client.get_token(tokenIdentifier);
    + }
    +
    + @Override
    + public List<String> getAllTokenIdentifiers() throws TException {
    + return client.get_all_token_identifiers();
    + }
    +
    + @Override
    + public int addMasterKey(String key) throws MetaException, TException {
    + return client.add_master_key(key);
    + }
    +
    + @Override
    + public void updateMasterKey(Integer seqNo, String key)
    + throws NoSuchObjectException, MetaException, TException {
    + client.update_master_key(seqNo, key);
    + }
    +
    + @Override
    + public boolean removeMasterKey(Integer keySeq) throws TException {
    + return client.remove_master_key(keySeq);
    + }
    +
    + @Override
    + public String[] getMasterKeys() throws TException {
    + List<String> keyList = client.get_master_keys();
    + return keyList.toArray(new String[keyList.size()]);
    + }
    +
    + @Override
        public ValidTxnList getValidTxns() throws TException {
          return TxnUtils.createValidReadTxnList(client.get_open_txns(), 0);
        }

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    index cb092d1..62677d1 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    @@ -1165,7 +1165,24 @@ public interface IMetaStoreClient {
         */
        void cancelDelegationToken(String tokenStrForm) throws MetaException, TException;

    - public String getTokenStrForm() throws IOException;
    + String getTokenStrForm() throws IOException;
    +
    + boolean addToken(String tokenIdentifier, String delegationToken) throws TException;
    +
    + boolean removeToken(String tokenIdentifier) throws TException;
    +
    + String getToken(String tokenIdentifier) throws TException;
    +
    + List<String> getAllTokenIdentifiers() throws TException;
    +
    + int addMasterKey(String key) throws MetaException, TException;
    +
    + void updateMasterKey(Integer seqNo, String key)
    + throws NoSuchObjectException, MetaException, TException;
    +
    + boolean removeMasterKey(Integer keySeq) throws TException;
    +
    + String[] getMasterKeys() throws TException;

        void createFunction(Function func)
            throws InvalidObjectException, MetaException, TException;

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote
    ----------------------------------------------------------------------
    diff --git a/service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote b/service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote
    old mode 100644
    new mode 100755

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
    ----------------------------------------------------------------------
    diff --git a/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java b/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
    index 3d5e3a4..6992f62 100644
    --- a/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
    +++ b/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
    @@ -36,9 +36,9 @@ import javax.security.sasl.Sasl;

      import org.apache.hadoop.hive.conf.HiveConf;
      import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
    -import org.apache.hadoop.hive.metastore.HiveMetaStore;
    -import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
    +import org.apache.hadoop.hive.metastore.IMetaStoreClient;
      import org.apache.hadoop.hive.metastore.api.MetaException;
    +import org.apache.hadoop.hive.ql.metadata.Hive;
      import org.apache.hadoop.hive.shims.HadoopShims.KerberosNameShim;
      import org.apache.hadoop.hive.shims.ShimLoader;
      import org.apache.hadoop.hive.thrift.DBTokenStore;
    @@ -48,7 +48,6 @@ import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.Server.ServerMode;
      import org.apache.hadoop.security.SecurityUtil;
      import org.apache.hadoop.security.UserGroupInformation;
      import org.apache.hadoop.security.authorize.ProxyUsers;
    -import org.apache.hive.service.ServiceException;
      import org.apache.hive.service.cli.HiveSQLException;
      import org.apache.hive.service.cli.thrift.ThriftCLIService;
      import org.apache.thrift.TProcessorFactory;
    @@ -105,7 +104,7 @@ public class HiveAuthFactory {
          transportMode = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_TRANSPORT_MODE);
          authTypeStr = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION);

    - // ShimLoader.getHadoopShims().isSecurityEnabled() will only check that·
    + // ShimLoader.getHadoopShims().isSecurityEnabled() will only check that
          // hadoopAuth is not simple, it does not guarantee it is kerberos
          hadoopAuth = conf.get(HADOOP_SECURITY_AUTHENTICATION, "simple");

    @@ -127,18 +126,26 @@ public class HiveAuthFactory {
            // Start delegation token manager
            delegationTokenManager = new HiveDelegationTokenManager();
            try {
    - // baseHandler is only necessary for DBTokenStore
    - HMSHandler baseHandler = null;
    - String tokenStoreClass =
    - conf.getVar(HiveConf.ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS);
    + Object baseHandler = null;
    + String tokenStoreClass = conf.getVar(HiveConf.ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS);
    +
              if (tokenStoreClass.equals(DBTokenStore.class.getName())) {
    - baseHandler = new HiveMetaStore.HMSHandler("New db based metastore server", conf, true);
    + // IMetaStoreClient is needed to access token store if DBTokenStore is to be used. It
    + // will be got via Hive.get(conf).getMSC in a thread where the DelegationTokenStore
    + // is called. To avoid the cyclic reference, we pass the Hive class to DBTokenStore where
    + // it is used to get a threadLocal Hive object with a synchronized MetaStoreClient using
    + // Java reflection.
    + // Note: there will be two HS2 life-long opened MSCs, one is stored in HS2 thread local
    + // Hive object, the other is in a daemon thread spawned in DelegationTokenSecretManager
    + // to remove expired tokens.
    + baseHandler = Hive.class;
              }
    - delegationTokenManager.startDelegationTokenSecretManager(conf, baseHandler,
    - ServerMode.HIVESERVER2);
    +
    + delegationTokenManager.startDelegationTokenSecretManager(conf, baseHandler, ServerMode.HIVESERVER2);
              saslServer.setSecretManager(delegationTokenManager.getSecretManager());
    - } catch (MetaException | IOException e) {
    - throw new ServiceException("Failed to start token manager", e);
    + }
    + catch (IOException e) {
    + throw new TTransportException("Failed to start token manager", e);
            }
          }
        }
  • Ctang at Mar 8, 2016 at 8:06 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
    index a546247..05a0749 100644
    --- a/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
    +++ b/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
    @@ -956,6 +956,48 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
         */
        public function cancel_delegation_token($token_str_form);
        /**
    + * @param string $token_identifier
    + * @param string $delegation_token
    + * @return bool
    + */
    + public function add_token($token_identifier, $delegation_token);
    + /**
    + * @param string $token_identifier
    + * @return bool
    + */
    + public function remove_token($token_identifier);
    + /**
    + * @param string $token_identifier
    + * @return string
    + */
    + public function get_token($token_identifier);
    + /**
    + * @return string[]
    + */
    + public function get_all_token_identifiers();
    + /**
    + * @param string $key
    + * @return int
    + * @throws \metastore\MetaException
    + */
    + public function add_master_key($key);
    + /**
    + * @param int $seq_number
    + * @param string $key
    + * @throws \metastore\NoSuchObjectException
    + * @throws \metastore\MetaException
    + */
    + public function update_master_key($seq_number, $key);
    + /**
    + * @param int $key_seq
    + * @return bool
    + */
    + public function remove_master_key($key_seq);
    + /**
    + * @return string[]
    + */
    + public function get_master_keys();
    + /**
         * @return \metastore\GetOpenTxnsResponse
         */
        public function get_open_txns();
    @@ -7561,6 +7603,420 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
          return;
        }

    + public function add_token($token_identifier, $delegation_token)
    + {
    + $this->send_add_token($token_identifier, $delegation_token);
    + return $this->recv_add_token();
    + }
    +
    + public function send_add_token($token_identifier, $delegation_token)
    + {
    + $args = new \metastore\ThriftHiveMetastore_add_token_args();
    + $args->token_identifier = $token_identifier;
    + $args->delegation_token = $delegation_token;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'add_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('add_token', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_add_token()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_token_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_add_token_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("add_token failed: unknown result");
    + }
    +
    + public function remove_token($token_identifier)
    + {
    + $this->send_remove_token($token_identifier);
    + return $this->recv_remove_token();
    + }
    +
    + public function send_remove_token($token_identifier)
    + {
    + $args = new \metastore\ThriftHiveMetastore_remove_token_args();
    + $args->token_identifier = $token_identifier;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'remove_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('remove_token', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_remove_token()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_token_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_remove_token_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("remove_token failed: unknown result");
    + }
    +
    + public function get_token($token_identifier)
    + {
    + $this->send_get_token($token_identifier);
    + return $this->recv_get_token();
    + }
    +
    + public function send_get_token($token_identifier)
    + {
    + $args = new \metastore\ThriftHiveMetastore_get_token_args();
    + $args->token_identifier = $token_identifier;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'get_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('get_token', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_get_token()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_token_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_get_token_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("get_token failed: unknown result");
    + }
    +
    + public function get_all_token_identifiers()
    + {
    + $this->send_get_all_token_identifiers();
    + return $this->recv_get_all_token_identifiers();
    + }
    +
    + public function send_get_all_token_identifiers()
    + {
    + $args = new \metastore\ThriftHiveMetastore_get_all_token_identifiers_args();
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'get_all_token_identifiers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('get_all_token_identifiers', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_get_all_token_identifiers()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_token_identifiers_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_get_all_token_identifiers_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("get_all_token_identifiers failed: unknown result");
    + }
    +
    + public function add_master_key($key)
    + {
    + $this->send_add_master_key($key);
    + return $this->recv_add_master_key();
    + }
    +
    + public function send_add_master_key($key)
    + {
    + $args = new \metastore\ThriftHiveMetastore_add_master_key_args();
    + $args->key = $key;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'add_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('add_master_key', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_add_master_key()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_master_key_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_add_master_key_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + if ($result->o1 !== null) {
    + throw $result->o1;
    + }
    + throw new \Exception("add_master_key failed: unknown result");
    + }
    +
    + public function update_master_key($seq_number, $key)
    + {
    + $this->send_update_master_key($seq_number, $key);
    + $this->recv_update_master_key();
    + }
    +
    + public function send_update_master_key($seq_number, $key)
    + {
    + $args = new \metastore\ThriftHiveMetastore_update_master_key_args();
    + $args->seq_number = $seq_number;
    + $args->key = $key;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'update_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('update_master_key', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_update_master_key()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_master_key_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_update_master_key_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->o1 !== null) {
    + throw $result->o1;
    + }
    + if ($result->o2 !== null) {
    + throw $result->o2;
    + }
    + return;
    + }
    +
    + public function remove_master_key($key_seq)
    + {
    + $this->send_remove_master_key($key_seq);
    + return $this->recv_remove_master_key();
    + }
    +
    + public function send_remove_master_key($key_seq)
    + {
    + $args = new \metastore\ThriftHiveMetastore_remove_master_key_args();
    + $args->key_seq = $key_seq;
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'remove_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('remove_master_key', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_remove_master_key()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_master_key_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_remove_master_key_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("remove_master_key failed: unknown result");
    + }
    +
    + public function get_master_keys()
    + {
    + $this->send_get_master_keys();
    + return $this->recv_get_master_keys();
    + }
    +
    + public function send_get_master_keys()
    + {
    + $args = new \metastore\ThriftHiveMetastore_get_master_keys_args();
    + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    + if ($bin_accel)
    + {
    + thrift_protocol_write_binary($this->output_, 'get_master_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    + }
    + else
    + {
    + $this->output_->writeMessageBegin('get_master_keys', TMessageType::CALL, $this->seqid_);
    + $args->write($this->output_);
    + $this->output_->writeMessageEnd();
    + $this->output_->getTransport()->flush();
    + }
    + }
    +
    + public function recv_get_master_keys()
    + {
    + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_master_keys_result', $this->input_->isStrictRead());
    + else
    + {
    + $rseqid = 0;
    + $fname = null;
    + $mtype = 0;
    +
    + $this->input_->readMessageBegin($fname, $mtype, $rseqid);
    + if ($mtype == TMessageType::EXCEPTION) {
    + $x = new TApplicationException();
    + $x->read($this->input_);
    + $this->input_->readMessageEnd();
    + throw $x;
    + }
    + $result = new \metastore\ThriftHiveMetastore_get_master_keys_result();
    + $result->read($this->input_);
    + $this->input_->readMessageEnd();
    + }
    + if ($result->success !== null) {
    + return $result->success;
    + }
    + throw new \Exception("get_master_keys failed: unknown result");
    + }
    +
        public function get_open_txns()
        {
          $this->send_get_open_txns();
    @@ -36689,6 +37145,1306 @@ class ThriftHiveMetastore_cancel_delegation_token_result {

      }

    +class ThriftHiveMetastore_add_token_args {
    + static $_TSPEC;
    +
    + /**
    + * @var string
    + */
    + public $token_identifier = null;
    + /**
    + * @var string
    + */
    + public $delegation_token = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'token_identifier',
    + 'type' => TType::STRING,
    + ),
    + 2 => array(
    + 'var' => 'delegation_token',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['token_identifier'])) {
    + $this->token_identifier = $vals['token_identifier'];
    + }
    + if (isset($vals['delegation_token'])) {
    + $this->delegation_token = $vals['delegation_token'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_add_token_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->token_identifier);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 2:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->delegation_token);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_token_args');
    + if ($this->token_identifier !== null) {
    + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1);
    + $xfer += $output->writeString($this->token_identifier);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->delegation_token !== null) {
    + $xfer += $output->writeFieldBegin('delegation_token', TType::STRING, 2);
    + $xfer += $output->writeString($this->delegation_token);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_add_token_result {
    + static $_TSPEC;
    +
    + /**
    + * @var bool
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::BOOL,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_add_token_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::BOOL) {
    + $xfer += $input->readBool($this->success);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_token_result');
    + if ($this->success !== null) {
    + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
    + $xfer += $output->writeBool($this->success);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_remove_token_args {
    + static $_TSPEC;
    +
    + /**
    + * @var string
    + */
    + public $token_identifier = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'token_identifier',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['token_identifier'])) {
    + $this->token_identifier = $vals['token_identifier'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_remove_token_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->token_identifier);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_token_args');
    + if ($this->token_identifier !== null) {
    + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1);
    + $xfer += $output->writeString($this->token_identifier);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_remove_token_result {
    + static $_TSPEC;
    +
    + /**
    + * @var bool
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::BOOL,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_remove_token_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::BOOL) {
    + $xfer += $input->readBool($this->success);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_token_result');
    + if ($this->success !== null) {
    + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
    + $xfer += $output->writeBool($this->success);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_token_args {
    + static $_TSPEC;
    +
    + /**
    + * @var string
    + */
    + public $token_identifier = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'token_identifier',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['token_identifier'])) {
    + $this->token_identifier = $vals['token_identifier'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_token_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->token_identifier);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_token_args');
    + if ($this->token_identifier !== null) {
    + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1);
    + $xfer += $output->writeString($this->token_identifier);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_token_result {
    + static $_TSPEC;
    +
    + /**
    + * @var string
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_token_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->success);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_token_result');
    + if ($this->success !== null) {
    + $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
    + $xfer += $output->writeString($this->success);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_all_token_identifiers_args {
    + static $_TSPEC;
    +
    +
    + public function __construct() {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + );
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_all_token_identifiers_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_token_identifiers_args');
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_all_token_identifiers_result {
    + static $_TSPEC;
    +
    + /**
    + * @var string[]
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::LST,
    + 'etype' => TType::STRING,
    + 'elem' => array(
    + 'type' => TType::STRING,
    + ),
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_all_token_identifiers_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::LST) {
    + $this->success = array();
    + $_size950 = 0;
    + $_etype953 = 0;
    + $xfer += $input->readListBegin($_etype953, $_size950);
    + for ($_i954 = 0; $_i954 < $_size950; ++$_i954)
    + {
    + $elem955 = null;
    + $xfer += $input->readString($elem955);
    + $this->success []= $elem955;
    + }
    + $xfer += $input->readListEnd();
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_token_identifiers_result');
    + if ($this->success !== null) {
    + if (!is_array($this->success)) {
    + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
    + }
    + $xfer += $output->writeFieldBegin('success', TType::LST, 0);
    + {
    + $output->writeListBegin(TType::STRING, count($this->success));
    + {
    + foreach ($this->success as $iter956)
    + {
    + $xfer += $output->writeString($iter956);
    + }
    + }
    + $output->writeListEnd();
    + }
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_add_master_key_args {
    + static $_TSPEC;
    +
    + /**
    + * @var string
    + */
    + public $key = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'key',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['key'])) {
    + $this->key = $vals['key'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_add_master_key_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->key);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_master_key_args');
    + if ($this->key !== null) {
    + $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
    + $xfer += $output->writeString($this->key);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_add_master_key_result {
    + static $_TSPEC;
    +
    + /**
    + * @var int
    + */
    + public $success = null;
    + /**
    + * @var \metastore\MetaException
    + */
    + public $o1 = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::I32,
    + ),
    + 1 => array(
    + 'var' => 'o1',
    + 'type' => TType::STRUCT,
    + 'class' => '\metastore\MetaException',
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + if (isset($vals['o1'])) {
    + $this->o1 = $vals['o1'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_add_master_key_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->success);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 1:
    + if ($ftype == TType::STRUCT) {
    + $this->o1 = new \metastore\MetaException();
    + $xfer += $this->o1->read($input);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_master_key_result');
    + if ($this->success !== null) {
    + $xfer += $output->writeFieldBegin('success', TType::I32, 0);
    + $xfer += $output->writeI32($this->success);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->o1 !== null) {
    + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
    + $xfer += $this->o1->write($output);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_update_master_key_args {
    + static $_TSPEC;
    +
    + /**
    + * @var int
    + */
    + public $seq_number = null;
    + /**
    + * @var string
    + */
    + public $key = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'seq_number',
    + 'type' => TType::I32,
    + ),
    + 2 => array(
    + 'var' => 'key',
    + 'type' => TType::STRING,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['seq_number'])) {
    + $this->seq_number = $vals['seq_number'];
    + }
    + if (isset($vals['key'])) {
    + $this->key = $vals['key'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_update_master_key_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->seq_number);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 2:
    + if ($ftype == TType::STRING) {
    + $xfer += $input->readString($this->key);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_master_key_args');
    + if ($this->seq_number !== null) {
    + $xfer += $output->writeFieldBegin('seq_number', TType::I32, 1);
    + $xfer += $output->writeI32($this->seq_number);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->key !== null) {
    + $xfer += $output->writeFieldBegin('key', TType::STRING, 2);
    + $xfer += $output->writeString($this->key);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_update_master_key_result {
    + static $_TSPEC;
    +
    + /**
    + * @var \metastore\NoSuchObjectException
    + */
    + public $o1 = null;
    + /**
    + * @var \metastore\MetaException
    + */
    + public $o2 = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'o1',
    + 'type' => TType::STRUCT,
    + 'class' => '\metastore\NoSuchObjectException',
    + ),
    + 2 => array(
    + 'var' => 'o2',
    + 'type' => TType::STRUCT,
    + 'class' => '\metastore\MetaException',
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['o1'])) {
    + $this->o1 = $vals['o1'];
    + }
    + if (isset($vals['o2'])) {
    + $this->o2 = $vals['o2'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_update_master_key_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::STRUCT) {
    + $this->o1 = new \metastore\NoSuchObjectException();
    + $xfer += $this->o1->read($input);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 2:
    + if ($ftype == TType::STRUCT) {
    + $this->o2 = new \metastore\MetaException();
    + $xfer += $this->o2->read($input);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_master_key_result');
    + if ($this->o1 !== null) {
    + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
    + $xfer += $this->o1->write($output);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->o2 !== null) {
    + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
    + $xfer += $this->o2->write($output);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_remove_master_key_args {
    + static $_TSPEC;
    +
    + /**
    + * @var int
    + */
    + public $key_seq = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 1 => array(
    + 'var' => 'key_seq',
    + 'type' => TType::I32,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['key_seq'])) {
    + $this->key_seq = $vals['key_seq'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_remove_master_key_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 1:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->key_seq);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_master_key_args');
    + if ($this->key_seq !== null) {
    + $xfer += $output->writeFieldBegin('key_seq', TType::I32, 1);
    + $xfer += $output->writeI32($this->key_seq);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_remove_master_key_result {
    + static $_TSPEC;
    +
    + /**
    + * @var bool
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::BOOL,
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_remove_master_key_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::BOOL) {
    + $xfer += $input->readBool($this->success);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_master_key_result');
    + if ($this->success !== null) {
    + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
    + $xfer += $output->writeBool($this->success);
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_master_keys_args {
    + static $_TSPEC;
    +
    +
    + public function __construct() {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + );
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_master_keys_args';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_master_keys_args');
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
    +class ThriftHiveMetastore_get_master_keys_result {
    + static $_TSPEC;
    +
    + /**
    + * @var string[]
    + */
    + public $success = null;
    +
    + public function __construct($vals=null) {
    + if (!isset(self::$_TSPEC)) {
    + self::$_TSPEC = array(
    + 0 => array(
    + 'var' => 'success',
    + 'type' => TType::LST,
    + 'etype' => TType::STRING,
    + 'elem' => array(
    + 'type' => TType::STRING,
    + ),
    + ),
    + );
    + }
    + if (is_array($vals)) {
    + if (isset($vals['success'])) {
    + $this->success = $vals['success'];
    + }
    + }
    + }
    +
    + public function getName() {
    + return 'ThriftHiveMetastore_get_master_keys_result';
    + }
    +
    + public function read($input)
    + {
    + $xfer = 0;
    + $fname = null;
    + $ftype = 0;
    + $fid = 0;
    + $xfer += $input->readStructBegin($fname);
    + while (true)
    + {
    + $xfer += $input->readFieldBegin($fname, $ftype, $fid);
    + if ($ftype == TType::STOP) {
    + break;
    + }
    + switch ($fid)
    + {
    + case 0:
    + if ($ftype == TType::LST) {
    + $this->success = array();
    + $_size957 = 0;
    + $_etype960 = 0;
    + $xfer += $input->readListBegin($_etype960, $_size957);
    + for ($_i961 = 0; $_i961 < $_size957; ++$_i961)
    + {
    + $elem962 = null;
    + $xfer += $input->readString($elem962);
    + $this->success []= $elem962;
    + }
    + $xfer += $input->readListEnd();
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + default:
    + $xfer += $input->skip($ftype);
    + break;
    + }
    + $xfer += $input->readFieldEnd();
    + }
    + $xfer += $input->readStructEnd();
    + return $xfer;
    + }
    +
    + public function write($output) {
    + $xfer = 0;
    + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_master_keys_result');
    + if ($this->success !== null) {
    + if (!is_array($this->success)) {
    + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
    + }
    + $xfer += $output->writeFieldBegin('success', TType::LST, 0);
    + {
    + $output->writeListBegin(TType::STRING, count($this->success));
    + {
    + foreach ($this->success as $iter963)
    + {
    + $xfer += $output->writeString($iter963);
    + }
    + }
    + $output->writeListEnd();
    + }
    + $xfer += $output->writeFieldEnd();
    + }
    + $xfer += $output->writeFieldStop();
    + $xfer += $output->writeStructEnd();
    + return $xfer;
    + }
    +
    +}
    +
      class ThriftHiveMetastore_get_open_txns_args {
        static $_TSPEC;


    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
    index 9a53d56..516b926 100755
    --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
    +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
    @@ -135,6 +135,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
        print(' string get_delegation_token(string token_owner, string renewer_kerberos_principal_name)')
        print(' i64 renew_delegation_token(string token_str_form)')
        print(' void cancel_delegation_token(string token_str_form)')
    + print(' bool add_token(string token_identifier, string delegation_token)')
    + print(' bool remove_token(string token_identifier)')
    + print(' string get_token(string token_identifier)')
    + print(' get_all_token_identifiers()')
    + print(' i32 add_master_key(string key)')
    + print(' void update_master_key(i32 seq_number, string key)')
    + print(' bool remove_master_key(i32 key_seq)')
    + print(' get_master_keys()')
        print(' GetOpenTxnsResponse get_open_txns()')
        print(' GetOpenTxnsInfoResponse get_open_txns_info()')
        print(' OpenTxnsResponse open_txns(OpenTxnRequest rqst)')
    @@ -894,6 +902,54 @@ elif cmd == 'cancel_delegation_token':
          sys.exit(1)
        pp.pprint(client.cancel_delegation_token(args[0],))

    +elif cmd == 'add_token':
    + if len(args) != 2:
    + print('add_token requires 2 args')
    + sys.exit(1)
    + pp.pprint(client.add_token(args[0],args[1],))
    +
    +elif cmd == 'remove_token':
    + if len(args) != 1:
    + print('remove_token requires 1 args')
    + sys.exit(1)
    + pp.pprint(client.remove_token(args[0],))
    +
    +elif cmd == 'get_token':
    + if len(args) != 1:
    + print('get_token requires 1 args')
    + sys.exit(1)
    + pp.pprint(client.get_token(args[0],))
    +
    +elif cmd == 'get_all_token_identifiers':
    + if len(args) != 0:
    + print('get_all_token_identifiers requires 0 args')
    + sys.exit(1)
    + pp.pprint(client.get_all_token_identifiers())
    +
    +elif cmd == 'add_master_key':
    + if len(args) != 1:
    + print('add_master_key requires 1 args')
    + sys.exit(1)
    + pp.pprint(client.add_master_key(args[0],))
    +
    +elif cmd == 'update_master_key':
    + if len(args) != 2:
    + print('update_master_key requires 2 args')
    + sys.exit(1)
    + pp.pprint(client.update_master_key(eval(args[0]),args[1],))
    +
    +elif cmd == 'remove_master_key':
    + if len(args) != 1:
    + print('remove_master_key requires 1 args')
    + sys.exit(1)
    + pp.pprint(client.remove_master_key(eval(args[0]),))
    +
    +elif cmd == 'get_master_keys':
    + if len(args) != 0:
    + print('get_master_keys requires 0 args')
    + sys.exit(1)
    + pp.pprint(client.get_master_keys())
    +
      elif cmd == 'get_open_txns':
        if len(args) != 0:
          print('get_open_txns requires 0 args')
  • Ctang at Mar 8, 2016 at 8:06 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    index 18cb41a..6e5de20 100644
    --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    @@ -29527,11 +29527,11 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr
      }


    -ThriftHiveMetastore_get_open_txns_args::~ThriftHiveMetastore_get_open_txns_args() throw() {
    +ThriftHiveMetastore_add_token_args::~ThriftHiveMetastore_add_token_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_add_token_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29550,7 +29550,28 @@ uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - xfer += iprot->skip(ftype);
    + switch (fid)
    + {
    + case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->token_identifier);
    + this->__isset.token_identifier = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 2:
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->delegation_token);
    + this->__isset.delegation_token = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
          xfer += iprot->readFieldEnd();
        }

    @@ -29559,10 +29580,18 @@ uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_get_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_add_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_args");
    +
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString(this->token_identifier);
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2);
    + xfer += oprot->writeString(this->delegation_token);
    + xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -29570,14 +29599,22 @@ uint32_t ThriftHiveMetastore_get_open_txns_args::write(::apache::thrift::protoco
      }


    -ThriftHiveMetastore_get_open_txns_pargs::~ThriftHiveMetastore_get_open_txns_pargs() throw() {
    +ThriftHiveMetastore_add_token_pargs::~ThriftHiveMetastore_add_token_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_add_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_pargs");
    +
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString((*(this->token_identifier)));
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2);
    + xfer += oprot->writeString((*(this->delegation_token)));
    + xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -29585,11 +29622,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_pargs::write(::apache::thrift::protoc
      }


    -ThriftHiveMetastore_get_open_txns_result::~ThriftHiveMetastore_get_open_txns_result() throw() {
    +ThriftHiveMetastore_add_token_result::~ThriftHiveMetastore_add_token_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_add_token_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29611,8 +29648,8 @@ uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protoc
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool(this->success);
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -29630,15 +29667,15 @@ uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protoc
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_get_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_add_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_result");

        if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
    + xfer += oprot->writeBool(this->success);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -29647,11 +29684,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_result::write(::apache::thrift::proto
      }


    -ThriftHiveMetastore_get_open_txns_presult::~ThriftHiveMetastore_get_open_txns_presult() throw() {
    +ThriftHiveMetastore_add_token_presult::~ThriftHiveMetastore_add_token_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_add_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29673,8 +29710,8 @@ uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::proto
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool((*(this->success)));
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -29693,11 +29730,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::proto
      }


    -ThriftHiveMetastore_get_open_txns_info_args::~ThriftHiveMetastore_get_open_txns_info_args() throw() {
    +ThriftHiveMetastore_remove_token_args::~ThriftHiveMetastore_remove_token_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_token_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29716,7 +29753,20 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::pro
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - xfer += iprot->skip(ftype);
    + switch (fid)
    + {
    + case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->token_identifier);
    + this->__isset.token_identifier = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
          xfer += iprot->readFieldEnd();
        }

    @@ -29725,10 +29775,14 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::pro
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_get_open_txns_info_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_args");
    +
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString(this->token_identifier);
    + xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -29736,14 +29790,18 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_args::write(::apache::thrift::pr
      }


    -ThriftHiveMetastore_get_open_txns_info_pargs::~ThriftHiveMetastore_get_open_txns_info_pargs() throw() {
    +ThriftHiveMetastore_remove_token_pargs::~ThriftHiveMetastore_remove_token_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_info_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_pargs");
    +
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString((*(this->token_identifier)));
    + xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -29751,11 +29809,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_pargs::write(::apache::thrift::p
      }


    -ThriftHiveMetastore_get_open_txns_info_result::~ThriftHiveMetastore_get_open_txns_info_result() throw() {
    +ThriftHiveMetastore_remove_token_result::~ThriftHiveMetastore_remove_token_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_token_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29777,8 +29835,8 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::p
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool(this->success);
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -29796,15 +29854,15 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::p
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_get_open_txns_info_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_result");

        if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
    + xfer += oprot->writeBool(this->success);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -29813,11 +29871,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_result::write(::apache::thrift::
      }


    -ThriftHiveMetastore_get_open_txns_info_presult::~ThriftHiveMetastore_get_open_txns_info_presult() throw() {
    +ThriftHiveMetastore_remove_token_presult::~ThriftHiveMetastore_remove_token_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29839,8 +29897,8 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool((*(this->success)));
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -29859,11 +29917,11 @@ uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::
      }


    -ThriftHiveMetastore_open_txns_args::~ThriftHiveMetastore_open_txns_args() throw() {
    +ThriftHiveMetastore_get_token_args::~ThriftHiveMetastore_get_token_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_token_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29885,9 +29943,9 @@ uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TP
          switch (fid)
          {
            case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->token_identifier);
    + this->__isset.token_identifier = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -29904,13 +29962,13 @@ uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TP
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_args");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString(this->token_identifier);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -29919,17 +29977,17 @@ uint32_t ThriftHiveMetastore_open_txns_args::write(::apache::thrift::protocol::T
      }


    -ThriftHiveMetastore_open_txns_pargs::~ThriftHiveMetastore_open_txns_pargs() throw() {
    +ThriftHiveMetastore_get_token_pargs::~ThriftHiveMetastore_get_token_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_pargs");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString((*(this->token_identifier)));
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -29938,11 +29996,11 @@ uint32_t ThriftHiveMetastore_open_txns_pargs::write(::apache::thrift::protocol::
      }


    -ThriftHiveMetastore_open_txns_result::~ThriftHiveMetastore_open_txns_result() throw() {
    +ThriftHiveMetastore_get_token_result::~ThriftHiveMetastore_get_token_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_token_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -29964,8 +30022,8 @@ uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->success);
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -29983,15 +30041,15 @@ uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_result");

        if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
    + xfer += oprot->writeString(this->success);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -30000,11 +30058,11 @@ uint32_t ThriftHiveMetastore_open_txns_result::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_open_txns_presult::~ThriftHiveMetastore_open_txns_presult() throw() {
    +ThriftHiveMetastore_get_token_presult::~ThriftHiveMetastore_get_token_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30026,8 +30084,8 @@ uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol:
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString((*(this->success)));
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -30046,11 +30104,69 @@ uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_abort_txn_args::~ThriftHiveMetastore_abort_txn_args() throw() {
    +ThriftHiveMetastore_get_all_token_identifiers_args::~ThriftHiveMetastore_get_all_token_identifiers_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +
    + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    + uint32_t xfer = 0;
    + std::string fname;
    + ::apache::thrift::protocol::TType ftype;
    + int16_t fid;
    +
    + xfer += iprot->readStructBegin(fname);
    +
    + using ::apache::thrift::protocol::TProtocolException;
    +
    +
    + while (true)
    + {
    + xfer += iprot->readFieldBegin(fname, ftype, fid);
    + if (ftype == ::apache::thrift::protocol::T_STOP) {
    + break;
    + }
    + xfer += iprot->skip(ftype);
    + xfer += iprot->readFieldEnd();
    + }
    +
    + xfer += iprot->readStructEnd();
    +
    + return xfer;
    +}
    +
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    + uint32_t xfer = 0;
    + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_args");
    +
    + xfer += oprot->writeFieldStop();
    + xfer += oprot->writeStructEnd();
    + return xfer;
    +}
    +
    +
    +ThriftHiveMetastore_get_all_token_identifiers_pargs::~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw() {
    +}
    +
    +
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    + uint32_t xfer = 0;
    + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_pargs");
    +
    + xfer += oprot->writeFieldStop();
    + xfer += oprot->writeStructEnd();
    + return xfer;
    +}
    +
    +
    +ThriftHiveMetastore_get_all_token_identifiers_result::~ThriftHiveMetastore_get_all_token_identifiers_result() throw() {
    +}
    +
    +
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30071,10 +30187,22 @@ uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TP
          }
          switch (fid)
          {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    + case 0:
    + if (ftype == ::apache::thrift::protocol::T_LIST) {
    + {
    + this->success.clear();
    + uint32_t _size1289;
    + ::apache::thrift::protocol::TType _etype1292;
    + xfer += iprot->readListBegin(_etype1292, _size1289);
    + this->success.resize(_size1289);
    + uint32_t _i1293;
    + for (_i1293 = 0; _i1293 < _size1289; ++_i1293)
    + {
    + xfer += iprot->readString(this->success[_i1293]);
    + }
    + xfer += iprot->readListEnd();
    + }
    + this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -30091,45 +30219,94 @@ uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TP
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_abort_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +
        uint32_t xfer = 0;
    - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_args");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_result");

    + if (this->__isset.success) {
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
    + {
    + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    + std::vector<std::string> ::const_iterator _iter1294;
    + for (_iter1294 = this->success.begin(); _iter1294 != this->success.end(); ++_iter1294)
    + {
    + xfer += oprot->writeString((*_iter1294));
    + }
    + xfer += oprot->writeListEnd();
    + }
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
      }


    -ThriftHiveMetastore_abort_txn_pargs::~ThriftHiveMetastore_abort_txn_pargs() throw() {
    +ThriftHiveMetastore_get_all_token_identifiers_presult::~ThriftHiveMetastore_get_all_token_identifiers_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_abort_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_all_token_identifiers_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +
    + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_pargs");
    + std::string fname;
    + ::apache::thrift::protocol::TType ftype;
    + int16_t fid;

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += iprot->readStructBegin(fname);
    +
    + using ::apache::thrift::protocol::TProtocolException;
    +
    +
    + while (true)
    + {
    + xfer += iprot->readFieldBegin(fname, ftype, fid);
    + if (ftype == ::apache::thrift::protocol::T_STOP) {
    + break;
    + }
    + switch (fid)
    + {
    + case 0:
    + if (ftype == ::apache::thrift::protocol::T_LIST) {
    + {
    + (*(this->success)).clear();
    + uint32_t _size1295;
    + ::apache::thrift::protocol::TType _etype1298;
    + xfer += iprot->readListBegin(_etype1298, _size1295);
    + (*(this->success)).resize(_size1295);
    + uint32_t _i1299;
    + for (_i1299 = 0; _i1299 < _size1295; ++_i1299)
    + {
    + xfer += iprot->readString((*(this->success))[_i1299]);
    + }
    + xfer += iprot->readListEnd();
    + }
    + this->__isset.success = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
    + xfer += iprot->readFieldEnd();
    + }
    +
    + xfer += iprot->readStructEnd();

    - xfer += oprot->writeFieldStop();
    - xfer += oprot->writeStructEnd();
        return xfer;
      }


    -ThriftHiveMetastore_abort_txn_result::~ThriftHiveMetastore_abort_txn_result() throw() {
    +ThriftHiveMetastore_add_master_key_args::~ThriftHiveMetastore_add_master_key_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_add_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30151,6 +30328,93 @@ uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::
          switch (fid)
          {
            case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->key);
    + this->__isset.key = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
    + xfer += iprot->readFieldEnd();
    + }
    +
    + xfer += iprot->readStructEnd();
    +
    + return xfer;
    +}
    +
    +uint32_t ThriftHiveMetastore_add_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    + uint32_t xfer = 0;
    + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_args");
    +
    + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString(this->key);
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldStop();
    + xfer += oprot->writeStructEnd();
    + return xfer;
    +}
    +
    +
    +ThriftHiveMetastore_add_master_key_pargs::~ThriftHiveMetastore_add_master_key_pargs() throw() {
    +}
    +
    +
    +uint32_t ThriftHiveMetastore_add_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    + uint32_t xfer = 0;
    + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_pargs");
    +
    + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
    + xfer += oprot->writeString((*(this->key)));
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldStop();
    + xfer += oprot->writeStructEnd();
    + return xfer;
    +}
    +
    +
    +ThriftHiveMetastore_add_master_key_result::~ThriftHiveMetastore_add_master_key_result() throw() {
    +}
    +
    +
    +uint32_t ThriftHiveMetastore_add_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +
    + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    + uint32_t xfer = 0;
    + std::string fname;
    + ::apache::thrift::protocol::TType ftype;
    + int16_t fid;
    +
    + xfer += iprot->readStructBegin(fname);
    +
    + using ::apache::thrift::protocol::TProtocolException;
    +
    +
    + while (true)
    + {
    + xfer += iprot->readFieldBegin(fname, ftype, fid);
    + if (ftype == ::apache::thrift::protocol::T_STOP) {
    + break;
    + }
    + switch (fid)
    + {
    + case 0:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + xfer += iprot->readI32(this->success);
    + this->__isset.success = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
                xfer += this->o1.read(iprot);
                this->__isset.o1 = true;
    @@ -30170,13 +30434,17 @@ uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_abort_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_add_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_result");

    - if (this->__isset.o1) {
    + if (this->__isset.success) {
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
    + xfer += oprot->writeI32(this->success);
    + xfer += oprot->writeFieldEnd();
    + } else if (this->__isset.o1) {
          xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
          xfer += this->o1.write(oprot);
          xfer += oprot->writeFieldEnd();
    @@ -30187,11 +30455,11 @@ uint32_t ThriftHiveMetastore_abort_txn_result::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_abort_txn_presult::~ThriftHiveMetastore_abort_txn_presult() throw() {
    +ThriftHiveMetastore_add_master_key_presult::~ThriftHiveMetastore_add_master_key_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_add_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30212,6 +30480,14 @@ uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol:
          }
          switch (fid)
          {
    + case 0:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + xfer += iprot->readI32((*(this->success)));
    + this->__isset.success = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
            case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
                xfer += this->o1.read(iprot);
    @@ -30233,11 +30509,11 @@ uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_commit_txn_args::~ThriftHiveMetastore_commit_txn_args() throw() {
    +ThriftHiveMetastore_update_master_key_args::~ThriftHiveMetastore_update_master_key_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_update_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30259,9 +30535,17 @@ uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::T
          switch (fid)
          {
            case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + xfer += iprot->readI32(this->seq_number);
    + this->__isset.seq_number = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 2:
    + if (ftype == ::apache::thrift::protocol::T_STRING) {
    + xfer += iprot->readString(this->key);
    + this->__isset.key = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -30278,13 +30562,17 @@ uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::T
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_commit_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_update_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_args");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    + xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1);
    + xfer += oprot->writeI32(this->seq_number);
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2);
    + xfer += oprot->writeString(this->key);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -30293,17 +30581,21 @@ uint32_t ThriftHiveMetastore_commit_txn_args::write(::apache::thrift::protocol::
      }


    -ThriftHiveMetastore_commit_txn_pargs::~ThriftHiveMetastore_commit_txn_pargs() throw() {
    +ThriftHiveMetastore_update_master_key_pargs::~ThriftHiveMetastore_update_master_key_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_commit_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_update_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_pargs");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    + xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1);
    + xfer += oprot->writeI32((*(this->seq_number)));
    + xfer += oprot->writeFieldEnd();
    +
    + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2);
    + xfer += oprot->writeString((*(this->key)));
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -30312,11 +30604,11 @@ uint32_t ThriftHiveMetastore_commit_txn_pargs::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_commit_txn_result::~ThriftHiveMetastore_commit_txn_result() throw() {
    +ThriftHiveMetastore_update_master_key_result::~ThriftHiveMetastore_update_master_key_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_commit_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_update_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30365,11 +30657,11 @@ uint32_t ThriftHiveMetastore_commit_txn_result::read(::apache::thrift::protocol:
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_commit_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_update_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_result");

        if (this->__isset.o1) {
          xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    @@ -30386,11 +30678,11 @@ uint32_t ThriftHiveMetastore_commit_txn_result::write(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_commit_txn_presult::~ThriftHiveMetastore_commit_txn_presult() throw() {
    +ThriftHiveMetastore_update_master_key_presult::~ThriftHiveMetastore_update_master_key_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_commit_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_update_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30440,11 +30732,11 @@ uint32_t ThriftHiveMetastore_commit_txn_presult::read(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_lock_args::~ThriftHiveMetastore_lock_args() throw() {
    +ThriftHiveMetastore_remove_master_key_args::~ThriftHiveMetastore_remove_master_key_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30466,9 +30758,9 @@ uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtoc
          switch (fid)
          {
            case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + xfer += iprot->readI32(this->key_seq);
    + this->__isset.key_seq = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -30485,13 +30777,13 @@ uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtoc
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_args");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1);
    + xfer += oprot->writeI32(this->key_seq);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -30500,17 +30792,17 @@ uint32_t ThriftHiveMetastore_lock_args::write(::apache::thrift::protocol::TProto
      }


    -ThriftHiveMetastore_lock_pargs::~ThriftHiveMetastore_lock_pargs() throw() {
    +ThriftHiveMetastore_remove_master_key_pargs::~ThriftHiveMetastore_remove_master_key_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_pargs");

    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1);
    + xfer += oprot->writeI32((*(this->key_seq)));
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -30519,11 +30811,11 @@ uint32_t ThriftHiveMetastore_lock_pargs::write(::apache::thrift::protocol::TProt
      }


    -ThriftHiveMetastore_lock_result::~ThriftHiveMetastore_lock_result() throw() {
    +ThriftHiveMetastore_remove_master_key_result::~ThriftHiveMetastore_remove_master_key_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30545,29 +30837,13 @@ uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProt
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool(this->success);
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
              break;
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -30580,23 +30856,15 @@ uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProt
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_remove_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_result");

        if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o1) {
    - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->o1.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o2) {
    - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
    - xfer += this->o2.write(oprot);
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
    + xfer += oprot->writeBool(this->success);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -30605,11 +30873,11 @@ uint32_t ThriftHiveMetastore_lock_result::write(::apache::thrift::protocol::TPro
      }


    -ThriftHiveMetastore_lock_presult::~ThriftHiveMetastore_lock_presult() throw() {
    +ThriftHiveMetastore_remove_master_key_presult::~ThriftHiveMetastore_remove_master_key_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_remove_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30631,29 +30899,13 @@ uint32_t ThriftHiveMetastore_lock_presult::read(::apache::thrift::protocol::TPro
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool((*(this->success)));
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
              break;
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -30667,11 +30919,11 @@ uint32_t ThriftHiveMetastore_lock_presult::read(::apache::thrift::protocol::TPro
      }


    -ThriftHiveMetastore_check_lock_args::~ThriftHiveMetastore_check_lock_args() throw() {
    +ThriftHiveMetastore_get_master_keys_args::~ThriftHiveMetastore_get_master_keys_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_check_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_master_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30690,20 +30942,7 @@ uint32_t ThriftHiveMetastore_check_lock_args::read(::apache::thrift::protocol::T
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - switch (fid)
    - {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - default:
    - xfer += iprot->skip(ftype);
    - break;
    - }
    + xfer += iprot->skip(ftype);
          xfer += iprot->readFieldEnd();
        }

    @@ -30712,14 +30951,10 @@ uint32_t ThriftHiveMetastore_check_lock_args::read(::apache::thrift::protocol::T
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_check_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_master_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_args");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_args");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -30727,18 +30962,14 @@ uint32_t ThriftHiveMetastore_check_lock_args::write(::apache::thrift::protocol::
      }


    -ThriftHiveMetastore_check_lock_pargs::~ThriftHiveMetastore_check_lock_pargs() throw() {
    +ThriftHiveMetastore_get_master_keys_pargs::~ThriftHiveMetastore_get_master_keys_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_check_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_master_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_pargs");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_pargs");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -30746,11 +30977,11 @@ uint32_t ThriftHiveMetastore_check_lock_pargs::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_check_lock_result::~ThriftHiveMetastore_check_lock_result() throw() {
    +ThriftHiveMetastore_get_master_keys_result::~ThriftHiveMetastore_get_master_keys_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_check_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_master_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30772,37 +31003,25 @@ uint32_t ThriftHiveMetastore_check_lock_result::read(::apache::thrift::protocol:
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_LIST) {
    + {
    + this->success.clear();
    + uint32_t _size1300;
    + ::apache::thrift::protocol::TType _etype1303;
    + xfer += iprot->readListBegin(_etype1303, _size1300);
    + this->success.resize(_size1300);
    + uint32_t _i1304;
    + for (_i1304 = 0; _i1304 < _size1300; ++_i1304)
    + {
    + xfer += iprot->readString(this->success[_i1304]);
    + }
    + xfer += iprot->readListEnd();
    + }
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
              break;
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 3:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o3.read(iprot);
    - this->__isset.o3 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -30815,27 +31034,23 @@ uint32_t ThriftHiveMetastore_check_lock_result::read(::apache::thrift::protocol:
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_check_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_master_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_result");

        if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o1) {
    - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->o1.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o2) {
    - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
    - xfer += this->o2.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o3) {
    - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3);
    - xfer += this->o3.write(oprot);
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
    + {
    + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    + std::vector<std::string> ::const_iterator _iter1305;
    + for (_iter1305 = this->success.begin(); _iter1305 != this->success.end(); ++_iter1305)
    + {
    + xfer += oprot->writeString((*_iter1305));
    + }
    + xfer += oprot->writeListEnd();
    + }
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -30844,11 +31059,11 @@ uint32_t ThriftHiveMetastore_check_lock_result::write(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_check_lock_presult::~ThriftHiveMetastore_check_lock_presult() throw() {
    +ThriftHiveMetastore_get_master_keys_presult::~ThriftHiveMetastore_get_master_keys_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_check_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_master_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30870,37 +31085,25 @@ uint32_t ThriftHiveMetastore_check_lock_presult::read(::apache::thrift::protocol
          switch (fid)
          {
            case 0:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    + if (ftype == ::apache::thrift::protocol::T_LIST) {
    + {
    + (*(this->success)).clear();
    + uint32_t _size1306;
    + ::apache::thrift::protocol::TType _etype1309;
    + xfer += iprot->readListBegin(_etype1309, _size1306);
    + (*(this->success)).resize(_size1306);
    + uint32_t _i1310;
    + for (_i1310 = 0; _i1310 < _size1306; ++_i1310)
    + {
    + xfer += iprot->readString((*(this->success))[_i1310]);
    + }
    + xfer += iprot->readListEnd();
    + }
                this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
              break;
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 3:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o3.read(iprot);
    - this->__isset.o3 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -30914,11 +31117,11 @@ uint32_t ThriftHiveMetastore_check_lock_presult::read(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_unlock_args::~ThriftHiveMetastore_unlock_args() throw() {
    +ThriftHiveMetastore_get_open_txns_args::~ThriftHiveMetastore_get_open_txns_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_unlock_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -30937,20 +31140,7 @@ uint32_t ThriftHiveMetastore_unlock_args::read(::apache::thrift::protocol::TProt
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - switch (fid)
    - {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - default:
    - xfer += iprot->skip(ftype);
    - break;
    - }
    + xfer += iprot->skip(ftype);
          xfer += iprot->readFieldEnd();
        }

    @@ -30959,14 +31149,10 @@ uint32_t ThriftHiveMetastore_unlock_args::read(::apache::thrift::protocol::TProt
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_unlock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_args");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_args");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -30974,18 +31160,14 @@ uint32_t ThriftHiveMetastore_unlock_args::write(::apache::thrift::protocol::TPro
      }


    -ThriftHiveMetastore_unlock_pargs::~ThriftHiveMetastore_unlock_pargs() throw() {
    +ThriftHiveMetastore_get_open_txns_pargs::~ThriftHiveMetastore_get_open_txns_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_unlock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_pargs");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_pargs");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -30993,11 +31175,11 @@ uint32_t ThriftHiveMetastore_unlock_pargs::write(::apache::thrift::protocol::TPr
      }


    -ThriftHiveMetastore_unlock_result::~ThriftHiveMetastore_unlock_result() throw() {
    +ThriftHiveMetastore_get_open_txns_result::~ThriftHiveMetastore_get_open_txns_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_unlock_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31018,18 +31200,10 @@ uint32_t ThriftHiveMetastore_unlock_result::read(::apache::thrift::protocol::TPr
          }
          switch (fid)
          {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    + case 0:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    + xfer += this->success.read(iprot);
    + this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31046,19 +31220,15 @@ uint32_t ThriftHiveMetastore_unlock_result::read(::apache::thrift::protocol::TPr
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_unlock_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_result");

    - if (this->__isset.o1) {
    - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->o1.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o2) {
    - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
    - xfer += this->o2.write(oprot);
    + if (this->__isset.success) {
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    + xfer += this->success.write(oprot);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -31067,11 +31237,11 @@ uint32_t ThriftHiveMetastore_unlock_result::write(::apache::thrift::protocol::TP
      }


    -ThriftHiveMetastore_unlock_presult::~ThriftHiveMetastore_unlock_presult() throw() {
    +ThriftHiveMetastore_get_open_txns_presult::~ThriftHiveMetastore_get_open_txns_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_unlock_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31092,18 +31262,10 @@ uint32_t ThriftHiveMetastore_unlock_presult::read(::apache::thrift::protocol::TP
          }
          switch (fid)
          {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    + case 0:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    + xfer += (*(this->success)).read(iprot);
    + this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31121,11 +31283,11 @@ uint32_t ThriftHiveMetastore_unlock_presult::read(::apache::thrift::protocol::TP
      }


    -ThriftHiveMetastore_show_locks_args::~ThriftHiveMetastore_show_locks_args() throw() {
    +ThriftHiveMetastore_get_open_txns_info_args::~ThriftHiveMetastore_get_open_txns_info_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_locks_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31144,20 +31306,7 @@ uint32_t ThriftHiveMetastore_show_locks_args::read(::apache::thrift::protocol::T
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - switch (fid)
    - {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->rqst.read(iprot);
    - this->__isset.rqst = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - default:
    - xfer += iprot->skip(ftype);
    - break;
    - }
    + xfer += iprot->skip(ftype);
          xfer += iprot->readFieldEnd();
        }

    @@ -31166,14 +31315,10 @@ uint32_t ThriftHiveMetastore_show_locks_args::read(::apache::thrift::protocol::T
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_show_locks_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_args");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->rqst.write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_args");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -31181,18 +31326,14 @@ uint32_t ThriftHiveMetastore_show_locks_args::write(::apache::thrift::protocol::
      }


    -ThriftHiveMetastore_show_locks_pargs::~ThriftHiveMetastore_show_locks_pargs() throw() {
    +ThriftHiveMetastore_get_open_txns_info_pargs::~ThriftHiveMetastore_get_open_txns_info_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_locks_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_pargs");
    -
    - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->rqst)).write(oprot);
    - xfer += oprot->writeFieldEnd();
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_pargs");

        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
    @@ -31200,11 +31341,11 @@ uint32_t ThriftHiveMetastore_show_locks_pargs::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_show_locks_result::~ThriftHiveMetastore_show_locks_result() throw() {
    +ThriftHiveMetastore_get_open_txns_info_result::~ThriftHiveMetastore_get_open_txns_info_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_locks_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31245,11 +31386,11 @@ uint32_t ThriftHiveMetastore_show_locks_result::read(::apache::thrift::protocol:
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_show_locks_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_result");

        if (this->__isset.success) {
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    @@ -31262,11 +31403,11 @@ uint32_t ThriftHiveMetastore_show_locks_result::write(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_show_locks_presult::~ThriftHiveMetastore_show_locks_presult() throw() {
    +ThriftHiveMetastore_get_open_txns_info_presult::~ThriftHiveMetastore_get_open_txns_info_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_locks_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31308,11 +31449,11 @@ uint32_t ThriftHiveMetastore_show_locks_presult::read(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_heartbeat_args::~ThriftHiveMetastore_heartbeat_args() throw() {
    +ThriftHiveMetastore_open_txns_args::~ThriftHiveMetastore_open_txns_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31335,8 +31476,8 @@ uint32_t ThriftHiveMetastore_heartbeat_args::read(::apache::thrift::protocol::TP
          {
            case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->ids.read(iprot);
    - this->__isset.ids = true;
    + xfer += this->rqst.read(iprot);
    + this->__isset.rqst = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31353,13 +31494,13 @@ uint32_t ThriftHiveMetastore_heartbeat_args::read(::apache::thrift::protocol::TP
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_heartbeat_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_args");

    - xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->ids.write(oprot);
    + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += this->rqst.write(oprot);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -31368,17 +31509,17 @@ uint32_t ThriftHiveMetastore_heartbeat_args::write(::apache::thrift::protocol::T
      }


    -ThriftHiveMetastore_heartbeat_pargs::~ThriftHiveMetastore_heartbeat_pargs() throw() {
    +ThriftHiveMetastore_open_txns_pargs::~ThriftHiveMetastore_open_txns_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_pargs");

    - xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->ids)).write(oprot);
    + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += (*(this->rqst)).write(oprot);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -31387,11 +31528,11 @@ uint32_t ThriftHiveMetastore_heartbeat_pargs::write(::apache::thrift::protocol::
      }


    -ThriftHiveMetastore_heartbeat_result::~ThriftHiveMetastore_heartbeat_result() throw() {
    +ThriftHiveMetastore_open_txns_result::~ThriftHiveMetastore_open_txns_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31412,26 +31553,10 @@ uint32_t ThriftHiveMetastore_heartbeat_result::read(::apache::thrift::protocol::
          }
          switch (fid)
          {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 3:
    + case 0:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o3.read(iprot);
    - this->__isset.o3 = true;
    + xfer += this->success.read(iprot);
    + this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31448,23 +31573,15 @@ uint32_t ThriftHiveMetastore_heartbeat_result::read(::apache::thrift::protocol::
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_heartbeat_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_result");

    - if (this->__isset.o1) {
    - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->o1.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o2) {
    - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
    - xfer += this->o2.write(oprot);
    - xfer += oprot->writeFieldEnd();
    - } else if (this->__isset.o3) {
    - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3);
    - xfer += this->o3.write(oprot);
    + if (this->__isset.success) {
    + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    + xfer += this->success.write(oprot);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -31473,11 +31590,11 @@ uint32_t ThriftHiveMetastore_heartbeat_result::write(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_heartbeat_presult::~ThriftHiveMetastore_heartbeat_presult() throw() {
    +ThriftHiveMetastore_open_txns_presult::~ThriftHiveMetastore_open_txns_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31498,26 +31615,10 @@ uint32_t ThriftHiveMetastore_heartbeat_presult::read(::apache::thrift::protocol:
          }
          switch (fid)
          {
    - case 1:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o1.read(iprot);
    - this->__isset.o1 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 2:
    - if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o2.read(iprot);
    - this->__isset.o2 = true;
    - } else {
    - xfer += iprot->skip(ftype);
    - }
    - break;
    - case 3:
    + case 0:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->o3.read(iprot);
    - this->__isset.o3 = true;
    + xfer += (*(this->success)).read(iprot);
    + this->__isset.success = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31535,11 +31636,11 @@ uint32_t ThriftHiveMetastore_heartbeat_presult::read(::apache::thrift::protocol:
      }


    -ThriftHiveMetastore_heartbeat_txn_range_args::~ThriftHiveMetastore_heartbeat_txn_range_args() throw() {
    +ThriftHiveMetastore_abort_txn_args::~ThriftHiveMetastore_abort_txn_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31562,8 +31663,8 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::read(::apache::thrift::pr
          {
            case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->txns.read(iprot);
    - this->__isset.txns = true;
    + xfer += this->rqst.read(iprot);
    + this->__isset.rqst = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31580,13 +31681,13 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::read(::apache::thrift::pr
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_abort_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_args");

    - xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += this->txns.write(oprot);
    + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += this->rqst.write(oprot);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -31595,17 +31696,17 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::write(::apache::thrift::p
      }


    -ThriftHiveMetastore_heartbeat_txn_range_pargs::~ThriftHiveMetastore_heartbeat_txn_range_pargs() throw() {
    +ThriftHiveMetastore_abort_txn_pargs::~ThriftHiveMetastore_abort_txn_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_abort_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_pargs");

    - xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1);
    - xfer += (*(this->txns)).write(oprot);
    + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += (*(this->rqst)).write(oprot);
        xfer += oprot->writeFieldEnd();

        xfer += oprot->writeFieldStop();
    @@ -31614,11 +31715,11 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_pargs::write(::apache::thrift::
      }


    -ThriftHiveMetastore_heartbeat_txn_range_result::~ThriftHiveMetastore_heartbeat_txn_range_result() throw() {
    +ThriftHiveMetastore_abort_txn_result::~ThriftHiveMetastore_abort_txn_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31639,10 +31740,10 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::read(::apache::thrift::
          }
          switch (fid)
          {
    - case 0:
    + case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += this->success.read(iprot);
    - this->__isset.success = true;
    + xfer += this->o1.read(iprot);
    + this->__isset.o1 = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31659,15 +31760,15 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::read(::apache::thrift::
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_abort_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_result");

    - if (this->__isset.success) {
    - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
    - xfer += this->success.write(oprot);
    + if (this->__isset.o1) {
    + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += this->o1.write(oprot);
          xfer += oprot->writeFieldEnd();
        }
        xfer += oprot->writeFieldStop();
    @@ -31676,11 +31777,11 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::write(::apache::thrift:
      }


    -ThriftHiveMetastore_heartbeat_txn_range_presult::~ThriftHiveMetastore_heartbeat_txn_range_presult() throw() {
    +ThriftHiveMetastore_abort_txn_presult::~ThriftHiveMetastore_abort_txn_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_heartbeat_txn_range_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31701,10 +31802,10 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_presult::read(::apache::thrift:
          }
          switch (fid)
          {
    - case 0:
    + case 1:
              if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    - xfer += (*(this->success)).read(iprot);
    - this->__isset.success = true;
    + xfer += this->o1.read(iprot);
    + this->__isset.o1 = true;
              } else {
                xfer += iprot->skip(ftype);
              }
    @@ -31722,11 +31823,11 @@ uint32_t ThriftHiveMetastore_heartbeat_txn_range_presult::read(::apache::thrift:
      }


    -ThriftHiveMetastore_compact_args::~ThriftHiveMetastore_compact_args() throw() {
    +ThriftHiveMetastore_commit_txn_args::~ThriftHiveMetastore_commit_txn_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31767,10 +31868,10 @@ uint32_t ThriftHiveMetastore_compact_args::read(::apache::thrift::protocol::TPro
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_commit_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_args");

        xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
        xfer += this->rqst.write(oprot);
    @@ -31782,14 +31883,14 @@ uint32_t ThriftHiveMetastore_compact_args::write(::apache::thrift::protocol::TPr
      }


    -ThriftHiveMetastore_compact_pargs::~ThriftHiveMetastore_compact_pargs() throw() {
    +ThriftHiveMetastore_commit_txn_pargs::~ThriftHiveMetastore_commit_txn_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_commit_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_pargs");

        xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
        xfer += (*(this->rqst)).write(oprot);
    @@ -31801,11 +31902,11 @@ uint32_t ThriftHiveMetastore_compact_pargs::write(::apache::thrift::protocol::TP
      }


    -ThriftHiveMetastore_compact_result::~ThriftHiveMetastore_compact_result() throw() {
    +ThriftHiveMetastore_commit_txn_result::~ThriftHiveMetastore_commit_txn_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_commit_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31824,7 +31925,28 @@ uint32_t ThriftHiveMetastore_compact_result::read(::apache::thrift::protocol::TP
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - xfer += iprot->skip(ftype);
    + switch (fid)
    + {
    + case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o1.read(iprot);
    + this->__isset.o1 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 2:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o2.read(iprot);
    + this->__isset.o2 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
          xfer += iprot->readFieldEnd();
        }

    @@ -31833,23 +31955,32 @@ uint32_t ThriftHiveMetastore_compact_result::read(::apache::thrift::protocol::TP
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_commit_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const {

        uint32_t xfer = 0;

    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_result");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_result");

    + if (this->__isset.o1) {
    + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
    + xfer += this->o1.write(oprot);
    + xfer += oprot->writeFieldEnd();
    + } else if (this->__isset.o2) {
    + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
    + xfer += this->o2.write(oprot);
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
      }


    -ThriftHiveMetastore_compact_presult::~ThriftHiveMetastore_compact_presult() throw() {
    +ThriftHiveMetastore_commit_txn_presult::~ThriftHiveMetastore_commit_txn_presult() throw() {
      }


    -uint32_t ThriftHiveMetastore_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_commit_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31868,7 +31999,28 @@ uint32_t ThriftHiveMetastore_compact_presult::read(::apache::thrift::protocol::T
          if (ftype == ::apache::thrift::protocol::T_STOP) {
            break;
          }
    - xfer += iprot->skip(ftype);
    + switch (fid)
    + {
    + case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o1.read(iprot);
    + this->__isset.o1 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 2:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o2.read(iprot);
    + this->__isset.o2 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + default:
    + xfer += iprot->skip(ftype);
    + break;
    + }
          xfer += iprot->readFieldEnd();
        }

    @@ -31878,11 +32030,11 @@ uint32_t ThriftHiveMetastore_compact_presult::read(::apache::thrift::protocol::T
      }


    -ThriftHiveMetastore_show_compact_args::~ThriftHiveMetastore_show_compact_args() throw() {
    +ThriftHiveMetastore_lock_args::~ThriftHiveMetastore_lock_args() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31923,10 +32075,10 @@ uint32_t ThriftHiveMetastore_show_compact_args::read(::apache::thrift::protocol:
        return xfer;
      }

    -uint32_t ThriftHiveMetastore_show_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_args");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_args");

        xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
        xfer += this->rqst.write(oprot);
    @@ -31938,14 +32090,14 @@ uint32_t ThriftHiveMetastore_show_compact_args::write(::apache::thrift::protocol
      }


    -ThriftHiveMetastore_show_compact_pargs::~ThriftHiveMetastore_show_compact_pargs() throw() {
    +ThriftHiveMetastore_lock_pargs::~ThriftHiveMetastore_lock_pargs() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
    +uint32_t ThriftHiveMetastore_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
        uint32_t xfer = 0;
        apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
    - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_pargs");
    + xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_pargs");

        xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1);
        xfer += (*(this->rqst)).write(oprot);
    @@ -31957,11 +32109,11 @@ uint32_t ThriftHiveMetastore_show_compact_pargs::write(::apache::thrift::protoco
      }


    -ThriftHiveMetastore_show_compact_result::~ThriftHiveMetastore_show_compact_result() throw() {
    +ThriftHiveMetastore_lock_result::~ThriftHiveMetastore_lock_result() throw() {
      }


    -uint32_t ThriftHiveMetastore_show_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) {
    +uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
        uint32_t xfer = 0;
    @@ -31990,6 +32142,22 @@ uint32_t ThriftHiveMetastore_show_compact_result::read(::apache::thrift::protoco
                xfer += iprot->skip(ftype);
              }
              break;
    + case 1:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o1.read(iprot);
    + this->__isset.o1 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 2:
    + if (ftype == ::apache::thrift::protocol::T_STRUCT) {
    + xfer += this->o2.read(iprot);
    + this->__isset.o2 = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + b

    <TRUNCATED>
  • Ctang at Mar 8, 2016 at 8:06 pm
    HIVE-12270: Add DBTokenStore support to HS2 delegation token (Chaoyu Tang, reviewed by Szehon Ho)


    Project: http://git-wip-us.apache.org/repos/asf/hive/repo
    Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/87131d0c
    Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/87131d0c
    Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/87131d0c

    Branch: refs/heads/master
    Commit: 87131d0c7cce973d8792ed354f70ec73b0f52dcd
    Parents: 41e8201
    Author: ctang <ctang@cloudera.com>
    Authored: Tue Mar 8 15:05:54 2016 -0500
    Committer: ctang <ctang@cloudera.com>
    Committed: Tue Mar 8 15:05:54 2016 -0500

    ----------------------------------------------------------------------
      .../org/apache/hive/minikdc/MiniHiveKdc.java | 15 +
      .../hive/minikdc/TestJdbcWithDBTokenStore.java | 40 +
      .../hive/minikdc/TestJdbcWithMiniKdc.java | 12 +-
      .../hadoop/hive/thrift/TestDBTokenStore.java | 3 +-
      metastore/if/hive_metastore.thrift | 24 +
      .../gen/thrift/gen-cpp/ThriftHiveMetastore.cpp | 22340 ++++++++++-------
      .../gen/thrift/gen-cpp/ThriftHiveMetastore.h | 1409 +-
      .../ThriftHiveMetastore_server.skeleton.cpp | 40 +
      .../hive/metastore/api/ThriftHiveMetastore.java | 9220 ++++++-
      .../gen-php/metastore/ThriftHiveMetastore.php | 1756 ++
      .../hive_metastore/ThriftHiveMetastore-remote | 56 +
      .../hive_metastore/ThriftHiveMetastore.py | 1639 +-
      .../gen/thrift/gen-rb/thrift_hive_metastore.rb | 450 +
      .../hadoop/hive/metastore/HiveMetaStore.java | 159 +
      .../hive/metastore/HiveMetaStoreClient.java | 42 +
      .../hadoop/hive/metastore/IMetaStoreClient.java | 19 +-
      .../gen-py/TCLIService/TCLIService-remote | 0
      .../hive/service/auth/HiveAuthFactory.java | 33 +-
      .../apache/hadoop/hive/thrift/DBTokenStore.java | 49 +-
      .../hive/thrift/HiveDelegationTokenManager.java | 1 +
      20 files changed, 26383 insertions(+), 10924 deletions(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/MiniHiveKdc.java
    ----------------------------------------------------------------------
    diff --git a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/MiniHiveKdc.java b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/MiniHiveKdc.java
    index dedbf35..4e3a9c5 100644
    --- a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/MiniHiveKdc.java
    +++ b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/MiniHiveKdc.java
    @@ -179,5 +179,20 @@ public class MiniHiveKdc {
              withMiniKdc(hivePrincipal, hiveKeytab).build();
        }

    + /**
    + * Create a MiniHS2 with the hive service principal and keytab in MiniHiveKdc
    + * @param miniHiveKdc
    + * @param hiveConf
    + * @return new MiniHS2 instance
    + * @throws Exception
    + */
    + public static MiniHS2 getMiniHS2WithKerbWithRemoteHMS(MiniHiveKdc miniHiveKdc, HiveConf hiveConf) throws Exception {
    + String hivePrincipal =
    + miniHiveKdc.getFullyQualifiedServicePrincipal(MiniHiveKdc.HIVE_SERVICE_PRINCIPAL);
    + String hiveKeytab = miniHiveKdc.getKeyTabFile(
    + miniHiveKdc.getServicePrincipalForUser(MiniHiveKdc.HIVE_SERVICE_PRINCIPAL));

    + return new MiniHS2.Builder().withConf(hiveConf).withRemoteMetastore().
    + withMiniKdc(hivePrincipal, hiveKeytab).build();
    + }
      }

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
    ----------------------------------------------------------------------
    diff --git a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
    new file mode 100644
    index 0000000..d690aaa
    --- /dev/null
    +++ b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
    @@ -0,0 +1,40 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements. See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership. The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License. You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.hive.minikdc;
    +
    +import org.apache.hadoop.hive.conf.HiveConf;
    +import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
    +import org.apache.hive.jdbc.miniHS2.MiniHS2;
    +import org.junit.BeforeClass;
    +
    +public class TestJdbcWithDBTokenStore extends TestJdbcWithMiniKdc{
    +
    + @BeforeClass
    + public static void beforeTest() throws Exception {
    + Class.forName(MiniHS2.getJdbcDriverName());
    + confOverlay.put(ConfVars.HIVE_SERVER2_SESSION_HOOK.varname,
    + SessionHookTest.class.getName());
    +
    + HiveConf hiveConf = new HiveConf();
    + hiveConf.setVar(ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS, "org.apache.hadoop.hive.thrift.DBTokenStore");
    + miniHiveKdc = MiniHiveKdc.getMiniHiveKdc(hiveConf);
    + miniHS2 = MiniHiveKdc.getMiniHS2WithKerbWithRemoteHMS(miniHiveKdc, hiveConf);
    + miniHS2.start(confOverlay);
    + }
    +}
    \ No newline at end of file

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java
    ----------------------------------------------------------------------
    diff --git a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java
    index 3ef2ce3..71a08fb 100644
    --- a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java
    +++ b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithMiniKdc.java
    @@ -57,10 +57,10 @@ public class TestJdbcWithMiniKdc {
          }
        }

    - private static MiniHS2 miniHS2 = null;
    - private static MiniHiveKdc miniHiveKdc = null;
    - private static Map<String, String> confOverlay = new HashMap<String, String>();
    - private Connection hs2Conn;
    + protected static MiniHS2 miniHS2 = null;
    + protected static MiniHiveKdc miniHiveKdc = null;
    + protected static Map<String, String> confOverlay = new HashMap<String, String>();
    + protected Connection hs2Conn;

        @BeforeClass
        public static void beforeTest() throws Exception {
    @@ -241,7 +241,7 @@ public class TestJdbcWithMiniKdc {
         * @param expectedValue
         * @throws Exception
         */
    - private void verifyProperty(String propertyName, String expectedValue) throws Exception {
    + protected void verifyProperty(String propertyName, String expectedValue) throws Exception {
          Statement stmt = hs2Conn .createStatement();
          ResultSet res = stmt.executeQuery("set " + propertyName);
          assertTrue(res.next());
    @@ -251,7 +251,7 @@ public class TestJdbcWithMiniKdc {
        }

        // Store the given token in the UGI
    - private void storeToken(String tokenStr, UserGroupInformation ugi)
    + protected void storeToken(String tokenStr, UserGroupInformation ugi)
            throws Exception {
          Utils.setTokenStr(ugi,
              tokenStr, HiveAuthFactory.HS2_CLIENT_TOKEN);

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/itests/hive-unit/src/test/java/org/apache/hadoop/hive/thrift/TestDBTokenStore.java
    ----------------------------------------------------------------------
    diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/thrift/TestDBTokenStore.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/thrift/TestDBTokenStore.java
    index f5934ee..4bfa224 100644
    --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/thrift/TestDBTokenStore.java
    +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/thrift/TestDBTokenStore.java
    @@ -27,6 +27,7 @@ import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
      import org.apache.hadoop.hive.metastore.api.MetaException;
      import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
      import org.apache.hadoop.hive.thrift.DelegationTokenStore.TokenStoreException;
    +import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.Server.ServerMode;
      import org.apache.hadoop.io.Text;
      import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation;
      import org.apache.hadoop.security.token.delegation.HiveDelegationTokenSupport;
    @@ -37,7 +38,7 @@ public class TestDBTokenStore extends TestCase{
        public void testDBTokenStore() throws TokenStoreException, MetaException, IOException {

          DelegationTokenStore ts = new DBTokenStore();
    - ts.init(new HMSHandler("Test handler"), null);
    + ts.init(new HMSHandler("Test handler"), ServerMode.METASTORE);
          assertEquals(0, ts.getMasterKeys().length);
          assertEquals(false,ts.removeMasterKey(-1));
          try{

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/if/hive_metastore.thrift
    ----------------------------------------------------------------------
    diff --git a/metastore/if/hive_metastore.thrift b/metastore/if/hive_metastore.thrift
    index 3635054..6a55962 100755
    --- a/metastore/if/hive_metastore.thrift
    +++ b/metastore/if/hive_metastore.thrift
    @@ -1294,6 +1294,30 @@ service ThriftHiveMetastore extends fb303.FacebookService
        // method to cancel delegation token obtained from metastore server
        void cancel_delegation_token(1:string token_str_form) throws (1:MetaException o1)

    + // add a delegation token
    + bool add_token(1:string token_identifier, 2:string delegation_token)
    +
    + // remove a delegation token
    + bool remove_token(1:string token_identifier)
    +
    + // get a delegation token by identifier
    + string get_token(1:string token_identifier)
    +
    + // get all delegation token identifiers
    + list<string> get_all_token_identifiers()
    +
    + // add master key
    + i32 add_master_key(1:string key) throws (1:MetaException o1)
    +
    + // update master key
    + void update_master_key(1:i32 seq_number, 2:string key) throws (1:NoSuchObjectException o1, 2:MetaException o2)
    +
    + // remove master key
    + bool remove_master_key(1:i32 key_seq)
    +
    + // get master keys
    + list<string> get_master_keys()
    +
        // Transaction and lock management calls
        // Get just list of open transactions
        GetOpenTxnsResponse get_open_txns()
  • Ctang at Mar 8, 2016 at 8:06 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    index 078c1cd..8a8f8b1 100644
    --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    @@ -133,6 +133,14 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService
        virtual void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) = 0;
        virtual int64_t renew_delegation_token(const std::string& token_str_form) = 0;
        virtual void cancel_delegation_token(const std::string& token_str_form) = 0;
    + virtual bool add_token(const std::string& token_identifier, const std::string& delegation_token) = 0;
    + virtual bool remove_token(const std::string& token_identifier) = 0;
    + virtual void get_token(std::string& _return, const std::string& token_identifier) = 0;
    + virtual void get_all_token_identifiers(std::vector<std::string> & _return) = 0;
    + virtual int32_t add_master_key(const std::string& key) = 0;
    + virtual void update_master_key(const int32_t seq_number, const std::string& key) = 0;
    + virtual bool remove_master_key(const int32_t key_seq) = 0;
    + virtual void get_master_keys(std::vector<std::string> & _return) = 0;
        virtual void get_open_txns(GetOpenTxnsResponse& _return) = 0;
        virtual void get_open_txns_info(GetOpenTxnsInfoResponse& _return) = 0;
        virtual void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) = 0;
    @@ -543,6 +551,34 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
        void cancel_delegation_token(const std::string& /* token_str_form */) {
          return;
        }
    + bool add_token(const std::string& /* token_identifier */, const std::string& /* delegation_token */) {
    + bool _return = false;
    + return _return;
    + }
    + bool remove_token(const std::string& /* token_identifier */) {
    + bool _return = false;
    + return _return;
    + }
    + void get_token(std::string& /* _return */, const std::string& /* token_identifier */) {
    + return;
    + }
    + void get_all_token_identifiers(std::vector<std::string> & /* _return */) {
    + return;
    + }
    + int32_t add_master_key(const std::string& /* key */) {
    + int32_t _return = 0;
    + return _return;
    + }
    + void update_master_key(const int32_t /* seq_number */, const std::string& /* key */) {
    + return;
    + }
    + bool remove_master_key(const int32_t /* key_seq */) {
    + bool _return = false;
    + return _return;
    + }
    + void get_master_keys(std::vector<std::string> & /* _return */) {
    + return;
    + }
        void get_open_txns(GetOpenTxnsResponse& /* _return */) {
          return;
        }
    @@ -15023,26 +15059,43 @@ class ThriftHiveMetastore_cancel_delegation_token_presult {

      };

    +typedef struct _ThriftHiveMetastore_add_token_args__isset {
    + _ThriftHiveMetastore_add_token_args__isset() : token_identifier(false), delegation_token(false) {}
    + bool token_identifier :1;
    + bool delegation_token :1;
    +} _ThriftHiveMetastore_add_token_args__isset;

    -class ThriftHiveMetastore_get_open_txns_args {
    +class ThriftHiveMetastore_add_token_args {
       public:

    - ThriftHiveMetastore_get_open_txns_args(const ThriftHiveMetastore_get_open_txns_args&);
    - ThriftHiveMetastore_get_open_txns_args& operator=(const ThriftHiveMetastore_get_open_txns_args&);
    - ThriftHiveMetastore_get_open_txns_args() {
    + ThriftHiveMetastore_add_token_args(const ThriftHiveMetastore_add_token_args&);
    + ThriftHiveMetastore_add_token_args& operator=(const ThriftHiveMetastore_add_token_args&);
    + ThriftHiveMetastore_add_token_args() : token_identifier(), delegation_token() {
        }

    - virtual ~ThriftHiveMetastore_get_open_txns_args() throw();
    + virtual ~ThriftHiveMetastore_add_token_args() throw();
    + std::string token_identifier;
    + std::string delegation_token;

    - bool operator == (const ThriftHiveMetastore_get_open_txns_args & /* rhs */) const
    + _ThriftHiveMetastore_add_token_args__isset __isset;
    +
    + void __set_token_identifier(const std::string& val);
    +
    + void __set_delegation_token(const std::string& val);
    +
    + bool operator == (const ThriftHiveMetastore_add_token_args & rhs) const
        {
    + if (!(token_identifier == rhs.token_identifier))
    + return false;
    + if (!(delegation_token == rhs.delegation_token))
    + return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_get_open_txns_args &rhs) const {
    + bool operator != (const ThriftHiveMetastore_add_token_args &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_get_open_txns_args & ) const;
    + bool operator < (const ThriftHiveMetastore_add_token_args & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    @@ -15050,91 +15103,104 @@ class ThriftHiveMetastore_get_open_txns_args {
      };


    -class ThriftHiveMetastore_get_open_txns_pargs {
    +class ThriftHiveMetastore_add_token_pargs {
       public:


    - virtual ~ThriftHiveMetastore_get_open_txns_pargs() throw();
    + virtual ~ThriftHiveMetastore_add_token_pargs() throw();
    + const std::string* token_identifier;
    + const std::string* delegation_token;

        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_get_open_txns_result__isset {
    - _ThriftHiveMetastore_get_open_txns_result__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_add_token_result__isset {
    + _ThriftHiveMetastore_add_token_result__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_get_open_txns_result__isset;
    +} _ThriftHiveMetastore_add_token_result__isset;

    -class ThriftHiveMetastore_get_open_txns_result {
    +class ThriftHiveMetastore_add_token_result {
       public:

    - ThriftHiveMetastore_get_open_txns_result(const ThriftHiveMetastore_get_open_txns_result&);
    - ThriftHiveMetastore_get_open_txns_result& operator=(const ThriftHiveMetastore_get_open_txns_result&);
    - ThriftHiveMetastore_get_open_txns_result() {
    + ThriftHiveMetastore_add_token_result(const ThriftHiveMetastore_add_token_result&);
    + ThriftHiveMetastore_add_token_result& operator=(const ThriftHiveMetastore_add_token_result&);
    + ThriftHiveMetastore_add_token_result() : success(0) {
        }

    - virtual ~ThriftHiveMetastore_get_open_txns_result() throw();
    - GetOpenTxnsResponse success;
    + virtual ~ThriftHiveMetastore_add_token_result() throw();
    + bool success;

    - _ThriftHiveMetastore_get_open_txns_result__isset __isset;
    + _ThriftHiveMetastore_add_token_result__isset __isset;

    - void __set_success(const GetOpenTxnsResponse& val);
    + void __set_success(const bool val);

    - bool operator == (const ThriftHiveMetastore_get_open_txns_result & rhs) const
    + bool operator == (const ThriftHiveMetastore_add_token_result & rhs) const
        {
          if (!(success == rhs.success))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_get_open_txns_result &rhs) const {
    + bool operator != (const ThriftHiveMetastore_add_token_result &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_get_open_txns_result & ) const;
    + bool operator < (const ThriftHiveMetastore_add_token_result & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_get_open_txns_presult__isset {
    - _ThriftHiveMetastore_get_open_txns_presult__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_add_token_presult__isset {
    + _ThriftHiveMetastore_add_token_presult__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_get_open_txns_presult__isset;
    +} _ThriftHiveMetastore_add_token_presult__isset;

    -class ThriftHiveMetastore_get_open_txns_presult {
    +class ThriftHiveMetastore_add_token_presult {
       public:


    - virtual ~ThriftHiveMetastore_get_open_txns_presult() throw();
    - GetOpenTxnsResponse* success;
    + virtual ~ThriftHiveMetastore_add_token_presult() throw();
    + bool* success;

    - _ThriftHiveMetastore_get_open_txns_presult__isset __isset;
    + _ThriftHiveMetastore_add_token_presult__isset __isset;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

      };

    +typedef struct _ThriftHiveMetastore_remove_token_args__isset {
    + _ThriftHiveMetastore_remove_token_args__isset() : token_identifier(false) {}
    + bool token_identifier :1;
    +} _ThriftHiveMetastore_remove_token_args__isset;

    -class ThriftHiveMetastore_get_open_txns_info_args {
    +class ThriftHiveMetastore_remove_token_args {
       public:

    - ThriftHiveMetastore_get_open_txns_info_args(const ThriftHiveMetastore_get_open_txns_info_args&);
    - ThriftHiveMetastore_get_open_txns_info_args& operator=(const ThriftHiveMetastore_get_open_txns_info_args&);
    - ThriftHiveMetastore_get_open_txns_info_args() {
    + ThriftHiveMetastore_remove_token_args(const ThriftHiveMetastore_remove_token_args&);
    + ThriftHiveMetastore_remove_token_args& operator=(const ThriftHiveMetastore_remove_token_args&);
    + ThriftHiveMetastore_remove_token_args() : token_identifier() {
        }

    - virtual ~ThriftHiveMetastore_get_open_txns_info_args() throw();
    + virtual ~ThriftHiveMetastore_remove_token_args() throw();
    + std::string token_identifier;

    - bool operator == (const ThriftHiveMetastore_get_open_txns_info_args & /* rhs */) const
    + _ThriftHiveMetastore_remove_token_args__isset __isset;
    +
    + void __set_token_identifier(const std::string& val);
    +
    + bool operator == (const ThriftHiveMetastore_remove_token_args & rhs) const
        {
    + if (!(token_identifier == rhs.token_identifier))
    + return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_get_open_txns_info_args &rhs) const {
    + bool operator != (const ThriftHiveMetastore_remove_token_args &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_get_open_txns_info_args & ) const;
    + bool operator < (const ThriftHiveMetastore_remove_token_args & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    @@ -15142,102 +15208,103 @@ class ThriftHiveMetastore_get_open_txns_info_args {
      };


    -class ThriftHiveMetastore_get_open_txns_info_pargs {
    +class ThriftHiveMetastore_remove_token_pargs {
       public:


    - virtual ~ThriftHiveMetastore_get_open_txns_info_pargs() throw();
    + virtual ~ThriftHiveMetastore_remove_token_pargs() throw();
    + const std::string* token_identifier;

        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_get_open_txns_info_result__isset {
    - _ThriftHiveMetastore_get_open_txns_info_result__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_remove_token_result__isset {
    + _ThriftHiveMetastore_remove_token_result__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_get_open_txns_info_result__isset;
    +} _ThriftHiveMetastore_remove_token_result__isset;

    -class ThriftHiveMetastore_get_open_txns_info_result {
    +class ThriftHiveMetastore_remove_token_result {
       public:

    - ThriftHiveMetastore_get_open_txns_info_result(const ThriftHiveMetastore_get_open_txns_info_result&);
    - ThriftHiveMetastore_get_open_txns_info_result& operator=(const ThriftHiveMetastore_get_open_txns_info_result&);
    - ThriftHiveMetastore_get_open_txns_info_result() {
    + ThriftHiveMetastore_remove_token_result(const ThriftHiveMetastore_remove_token_result&);
    + ThriftHiveMetastore_remove_token_result& operator=(const ThriftHiveMetastore_remove_token_result&);
    + ThriftHiveMetastore_remove_token_result() : success(0) {
        }

    - virtual ~ThriftHiveMetastore_get_open_txns_info_result() throw();
    - GetOpenTxnsInfoResponse success;
    + virtual ~ThriftHiveMetastore_remove_token_result() throw();
    + bool success;

    - _ThriftHiveMetastore_get_open_txns_info_result__isset __isset;
    + _ThriftHiveMetastore_remove_token_result__isset __isset;

    - void __set_success(const GetOpenTxnsInfoResponse& val);
    + void __set_success(const bool val);

    - bool operator == (const ThriftHiveMetastore_get_open_txns_info_result & rhs) const
    + bool operator == (const ThriftHiveMetastore_remove_token_result & rhs) const
        {
          if (!(success == rhs.success))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_get_open_txns_info_result &rhs) const {
    + bool operator != (const ThriftHiveMetastore_remove_token_result &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_get_open_txns_info_result & ) const;
    + bool operator < (const ThriftHiveMetastore_remove_token_result & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_get_open_txns_info_presult__isset {
    - _ThriftHiveMetastore_get_open_txns_info_presult__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_remove_token_presult__isset {
    + _ThriftHiveMetastore_remove_token_presult__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_get_open_txns_info_presult__isset;
    +} _ThriftHiveMetastore_remove_token_presult__isset;

    -class ThriftHiveMetastore_get_open_txns_info_presult {
    +class ThriftHiveMetastore_remove_token_presult {
       public:


    - virtual ~ThriftHiveMetastore_get_open_txns_info_presult() throw();
    - GetOpenTxnsInfoResponse* success;
    + virtual ~ThriftHiveMetastore_remove_token_presult() throw();
    + bool* success;

    - _ThriftHiveMetastore_get_open_txns_info_presult__isset __isset;
    + _ThriftHiveMetastore_remove_token_presult__isset __isset;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

      };

    -typedef struct _ThriftHiveMetastore_open_txns_args__isset {
    - _ThriftHiveMetastore_open_txns_args__isset() : rqst(false) {}
    - bool rqst :1;
    -} _ThriftHiveMetastore_open_txns_args__isset;
    +typedef struct _ThriftHiveMetastore_get_token_args__isset {
    + _ThriftHiveMetastore_get_token_args__isset() : token_identifier(false) {}
    + bool token_identifier :1;
    +} _ThriftHiveMetastore_get_token_args__isset;

    -class ThriftHiveMetastore_open_txns_args {
    +class ThriftHiveMetastore_get_token_args {
       public:

    - ThriftHiveMetastore_open_txns_args(const ThriftHiveMetastore_open_txns_args&);
    - ThriftHiveMetastore_open_txns_args& operator=(const ThriftHiveMetastore_open_txns_args&);
    - ThriftHiveMetastore_open_txns_args() {
    + ThriftHiveMetastore_get_token_args(const ThriftHiveMetastore_get_token_args&);
    + ThriftHiveMetastore_get_token_args& operator=(const ThriftHiveMetastore_get_token_args&);
    + ThriftHiveMetastore_get_token_args() : token_identifier() {
        }

    - virtual ~ThriftHiveMetastore_open_txns_args() throw();
    - OpenTxnRequest rqst;
    + virtual ~ThriftHiveMetastore_get_token_args() throw();
    + std::string token_identifier;

    - _ThriftHiveMetastore_open_txns_args__isset __isset;
    + _ThriftHiveMetastore_get_token_args__isset __isset;

    - void __set_rqst(const OpenTxnRequest& val);
    + void __set_token_identifier(const std::string& val);

    - bool operator == (const ThriftHiveMetastore_open_txns_args & rhs) const
    + bool operator == (const ThriftHiveMetastore_get_token_args & rhs) const
        {
    - if (!(rqst == rhs.rqst))
    + if (!(token_identifier == rhs.token_identifier))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_open_txns_args &rhs) const {
    + bool operator != (const ThriftHiveMetastore_get_token_args &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_open_txns_args & ) const;
    + bool operator < (const ThriftHiveMetastore_get_token_args & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    @@ -15245,103 +15312,92 @@ class ThriftHiveMetastore_open_txns_args {
      };


    -class ThriftHiveMetastore_open_txns_pargs {
    +class ThriftHiveMetastore_get_token_pargs {
       public:


    - virtual ~ThriftHiveMetastore_open_txns_pargs() throw();
    - const OpenTxnRequest* rqst;
    + virtual ~ThriftHiveMetastore_get_token_pargs() throw();
    + const std::string* token_identifier;

        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_open_txns_result__isset {
    - _ThriftHiveMetastore_open_txns_result__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_get_token_result__isset {
    + _ThriftHiveMetastore_get_token_result__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_open_txns_result__isset;
    +} _ThriftHiveMetastore_get_token_result__isset;

    -class ThriftHiveMetastore_open_txns_result {
    +class ThriftHiveMetastore_get_token_result {
       public:

    - ThriftHiveMetastore_open_txns_result(const ThriftHiveMetastore_open_txns_result&);
    - ThriftHiveMetastore_open_txns_result& operator=(const ThriftHiveMetastore_open_txns_result&);
    - ThriftHiveMetastore_open_txns_result() {
    + ThriftHiveMetastore_get_token_result(const ThriftHiveMetastore_get_token_result&);
    + ThriftHiveMetastore_get_token_result& operator=(const ThriftHiveMetastore_get_token_result&);
    + ThriftHiveMetastore_get_token_result() : success() {
        }

    - virtual ~ThriftHiveMetastore_open_txns_result() throw();
    - OpenTxnsResponse success;
    + virtual ~ThriftHiveMetastore_get_token_result() throw();
    + std::string success;

    - _ThriftHiveMetastore_open_txns_result__isset __isset;
    + _ThriftHiveMetastore_get_token_result__isset __isset;

    - void __set_success(const OpenTxnsResponse& val);
    + void __set_success(const std::string& val);

    - bool operator == (const ThriftHiveMetastore_open_txns_result & rhs) const
    + bool operator == (const ThriftHiveMetastore_get_token_result & rhs) const
        {
          if (!(success == rhs.success))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_open_txns_result &rhs) const {
    + bool operator != (const ThriftHiveMetastore_get_token_result &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_open_txns_result & ) const;
    + bool operator < (const ThriftHiveMetastore_get_token_result & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_open_txns_presult__isset {
    - _ThriftHiveMetastore_open_txns_presult__isset() : success(false) {}
    +typedef struct _ThriftHiveMetastore_get_token_presult__isset {
    + _ThriftHiveMetastore_get_token_presult__isset() : success(false) {}
        bool success :1;
    -} _ThriftHiveMetastore_open_txns_presult__isset;
    +} _ThriftHiveMetastore_get_token_presult__isset;

    -class ThriftHiveMetastore_open_txns_presult {
    +class ThriftHiveMetastore_get_token_presult {
       public:


    - virtual ~ThriftHiveMetastore_open_txns_presult() throw();
    - OpenTxnsResponse* success;
    + virtual ~ThriftHiveMetastore_get_token_presult() throw();
    + std::string* success;

    - _ThriftHiveMetastore_open_txns_presult__isset __isset;
    + _ThriftHiveMetastore_get_token_presult__isset __isset;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

      };

    -typedef struct _ThriftHiveMetastore_abort_txn_args__isset {
    - _ThriftHiveMetastore_abort_txn_args__isset() : rqst(false) {}
    - bool rqst :1;
    -} _ThriftHiveMetastore_abort_txn_args__isset;

    -class ThriftHiveMetastore_abort_txn_args {
    +class ThriftHiveMetastore_get_all_token_identifiers_args {
       public:

    - ThriftHiveMetastore_abort_txn_args(const ThriftHiveMetastore_abort_txn_args&);
    - ThriftHiveMetastore_abort_txn_args& operator=(const ThriftHiveMetastore_abort_txn_args&);
    - ThriftHiveMetastore_abort_txn_args() {
    + ThriftHiveMetastore_get_all_token_identifiers_args(const ThriftHiveMetastore_get_all_token_identifiers_args&);
    + ThriftHiveMetastore_get_all_token_identifiers_args& operator=(const ThriftHiveMetastore_get_all_token_identifiers_args&);
    + ThriftHiveMetastore_get_all_token_identifiers_args() {
        }

    - virtual ~ThriftHiveMetastore_abort_txn_args() throw();
    - AbortTxnRequest rqst;
    -
    - _ThriftHiveMetastore_abort_txn_args__isset __isset;
    -
    - void __set_rqst(const AbortTxnRequest& val);
    + virtual ~ThriftHiveMetastore_get_all_token_identifiers_args() throw();

    - bool operator == (const ThriftHiveMetastore_abort_txn_args & rhs) const
    + bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_args & /* rhs */) const
        {
    - if (!(rqst == rhs.rqst))
    - return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_abort_txn_args &rhs) const {
    + bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_args &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_abort_txn_args & ) const;
    + bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_args & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    @@ -15349,103 +15405,102 @@ class ThriftHiveMetastore_abort_txn_args {
      };


    -class ThriftHiveMetastore_abort_txn_pargs {
    +class ThriftHiveMetastore_get_all_token_identifiers_pargs {
       public:


    - virtual ~ThriftHiveMetastore_abort_txn_pargs() throw();
    - const AbortTxnRequest* rqst;
    + virtual ~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw();

        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_abort_txn_result__isset {
    - _ThriftHiveMetastore_abort_txn_result__isset() : o1(false) {}
    - bool o1 :1;
    -} _ThriftHiveMetastore_abort_txn_result__isset;
    +typedef struct _ThriftHiveMetastore_get_all_token_identifiers_result__isset {
    + _ThriftHiveMetastore_get_all_token_identifiers_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_all_token_identifiers_result__isset;

    -class ThriftHiveMetastore_abort_txn_result {
    +class ThriftHiveMetastore_get_all_token_identifiers_result {
       public:

    - ThriftHiveMetastore_abort_txn_result(const ThriftHiveMetastore_abort_txn_result&);
    - ThriftHiveMetastore_abort_txn_result& operator=(const ThriftHiveMetastore_abort_txn_result&);
    - ThriftHiveMetastore_abort_txn_result() {
    + ThriftHiveMetastore_get_all_token_identifiers_result(const ThriftHiveMetastore_get_all_token_identifiers_result&);
    + ThriftHiveMetastore_get_all_token_identifiers_result& operator=(const ThriftHiveMetastore_get_all_token_identifiers_result&);
    + ThriftHiveMetastore_get_all_token_identifiers_result() {
        }

    - virtual ~ThriftHiveMetastore_abort_txn_result() throw();
    - NoSuchTxnException o1;
    + virtual ~ThriftHiveMetastore_get_all_token_identifiers_result() throw();
    + std::vector<std::string> success;

    - _ThriftHiveMetastore_abort_txn_result__isset __isset;
    + _ThriftHiveMetastore_get_all_token_identifiers_result__isset __isset;

    - void __set_o1(const NoSuchTxnException& val);
    + void __set_success(const std::vector<std::string> & val);

    - bool operator == (const ThriftHiveMetastore_abort_txn_result & rhs) const
    + bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_result & rhs) const
        {
    - if (!(o1 == rhs.o1))
    + if (!(success == rhs.success))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_abort_txn_result &rhs) const {
    + bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_result &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_abort_txn_result & ) const;
    + bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_result & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_abort_txn_presult__isset {
    - _ThriftHiveMetastore_abort_txn_presult__isset() : o1(false) {}
    - bool o1 :1;
    -} _ThriftHiveMetastore_abort_txn_presult__isset;
    +typedef struct _ThriftHiveMetastore_get_all_token_identifiers_presult__isset {
    + _ThriftHiveMetastore_get_all_token_identifiers_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_all_token_identifiers_presult__isset;

    -class ThriftHiveMetastore_abort_txn_presult {
    +class ThriftHiveMetastore_get_all_token_identifiers_presult {
       public:


    - virtual ~ThriftHiveMetastore_abort_txn_presult() throw();
    - NoSuchTxnException o1;
    + virtual ~ThriftHiveMetastore_get_all_token_identifiers_presult() throw();
    + std::vector<std::string> * success;

    - _ThriftHiveMetastore_abort_txn_presult__isset __isset;
    + _ThriftHiveMetastore_get_all_token_identifiers_presult__isset __isset;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

      };

    -typedef struct _ThriftHiveMetastore_commit_txn_args__isset {
    - _ThriftHiveMetastore_commit_txn_args__isset() : rqst(false) {}
    - bool rqst :1;
    -} _ThriftHiveMetastore_commit_txn_args__isset;
    +typedef struct _ThriftHiveMetastore_add_master_key_args__isset {
    + _ThriftHiveMetastore_add_master_key_args__isset() : key(false) {}
    + bool key :1;
    +} _ThriftHiveMetastore_add_master_key_args__isset;

    -class ThriftHiveMetastore_commit_txn_args {
    +class ThriftHiveMetastore_add_master_key_args {
       public:

    - ThriftHiveMetastore_commit_txn_args(const ThriftHiveMetastore_commit_txn_args&);
    - ThriftHiveMetastore_commit_txn_args& operator=(const ThriftHiveMetastore_commit_txn_args&);
    - ThriftHiveMetastore_commit_txn_args() {
    + ThriftHiveMetastore_add_master_key_args(const ThriftHiveMetastore_add_master_key_args&);
    + ThriftHiveMetastore_add_master_key_args& operator=(const ThriftHiveMetastore_add_master_key_args&);
    + ThriftHiveMetastore_add_master_key_args() : key() {
        }

    - virtual ~ThriftHiveMetastore_commit_txn_args() throw();
    - CommitTxnRequest rqst;
    + virtual ~ThriftHiveMetastore_add_master_key_args() throw();
    + std::string key;

    - _ThriftHiveMetastore_commit_txn_args__isset __isset;
    + _ThriftHiveMetastore_add_master_key_args__isset __isset;

    - void __set_rqst(const CommitTxnRequest& val);
    + void __set_key(const std::string& val);

    - bool operator == (const ThriftHiveMetastore_commit_txn_args & rhs) const
    + bool operator == (const ThriftHiveMetastore_add_master_key_args & rhs) const
        {
    - if (!(rqst == rhs.rqst))
    + if (!(key == rhs.key))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_commit_txn_args &rhs) const {
    + bool operator != (const ThriftHiveMetastore_add_master_key_args &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_commit_txn_args & ) const;
    + bool operator < (const ThriftHiveMetastore_add_master_key_args & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    @@ -15453,83 +15508,902 @@ class ThriftHiveMetastore_commit_txn_args {
      };


    -class ThriftHiveMetastore_commit_txn_pargs {
    +class ThriftHiveMetastore_add_master_key_pargs {
       public:


    - virtual ~ThriftHiveMetastore_commit_txn_pargs() throw();
    - const CommitTxnRequest* rqst;
    + virtual ~ThriftHiveMetastore_add_master_key_pargs() throw();
    + const std::string* key;

        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_commit_txn_result__isset {
    - _ThriftHiveMetastore_commit_txn_result__isset() : o1(false), o2(false) {}
    +typedef struct _ThriftHiveMetastore_add_master_key_result__isset {
    + _ThriftHiveMetastore_add_master_key_result__isset() : success(false), o1(false) {}
    + bool success :1;
        bool o1 :1;
    - bool o2 :1;
    -} _ThriftHiveMetastore_commit_txn_result__isset;
    +} _ThriftHiveMetastore_add_master_key_result__isset;

    -class ThriftHiveMetastore_commit_txn_result {
    +class ThriftHiveMetastore_add_master_key_result {
       public:

    - ThriftHiveMetastore_commit_txn_result(const ThriftHiveMetastore_commit_txn_result&);
    - ThriftHiveMetastore_commit_txn_result& operator=(const ThriftHiveMetastore_commit_txn_result&);
    - ThriftHiveMetastore_commit_txn_result() {
    + ThriftHiveMetastore_add_master_key_result(const ThriftHiveMetastore_add_master_key_result&);
    + ThriftHiveMetastore_add_master_key_result& operator=(const ThriftHiveMetastore_add_master_key_result&);
    + ThriftHiveMetastore_add_master_key_result() : success(0) {
        }

    - virtual ~ThriftHiveMetastore_commit_txn_result() throw();
    - NoSuchTxnException o1;
    - TxnAbortedException o2;
    + virtual ~ThriftHiveMetastore_add_master_key_result() throw();
    + int32_t success;
    + MetaException o1;

    - _ThriftHiveMetastore_commit_txn_result__isset __isset;
    + _ThriftHiveMetastore_add_master_key_result__isset __isset;

    - void __set_o1(const NoSuchTxnException& val);
    + void __set_success(const int32_t val);

    - void __set_o2(const TxnAbortedException& val);
    + void __set_o1(const MetaException& val);

    - bool operator == (const ThriftHiveMetastore_commit_txn_result & rhs) const
    + bool operator == (const ThriftHiveMetastore_add_master_key_result & rhs) const
        {
    - if (!(o1 == rhs.o1))
    + if (!(success == rhs.success))
            return false;
    - if (!(o2 == rhs.o2))
    + if (!(o1 == rhs.o1))
            return false;
          return true;
        }
    - bool operator != (const ThriftHiveMetastore_commit_txn_result &rhs) const {
    + bool operator != (const ThriftHiveMetastore_add_master_key_result &rhs) const {
          return !(*this == rhs);
        }

    - bool operator < (const ThriftHiveMetastore_commit_txn_result & ) const;
    + bool operator < (const ThriftHiveMetastore_add_master_key_result & ) const;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
        uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

      };

    -typedef struct _ThriftHiveMetastore_commit_txn_presult__isset {
    - _ThriftHiveMetastore_commit_txn_presult__isset() : o1(false), o2(false) {}
    +typedef struct _ThriftHiveMetastore_add_master_key_presult__isset {
    + _ThriftHiveMetastore_add_master_key_presult__isset() : success(false), o1(false) {}
    + bool success :1;
        bool o1 :1;
    - bool o2 :1;
    -} _ThriftHiveMetastore_commit_txn_presult__isset;
    +} _ThriftHiveMetastore_add_master_key_presult__isset;

    -class ThriftHiveMetastore_commit_txn_presult {
    +class ThriftHiveMetastore_add_master_key_presult {
       public:


    - virtual ~ThriftHiveMetastore_commit_txn_presult() throw();
    - NoSuchTxnException o1;
    - TxnAbortedException o2;
    + virtual ~ThriftHiveMetastore_add_master_key_presult() throw();
    + int32_t* success;
    + MetaException o1;

    - _ThriftHiveMetastore_commit_txn_presult__isset __isset;
    + _ThriftHiveMetastore_add_master_key_presult__isset __isset;

        uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

      };

    -typedef struct _ThriftHiveMetastore_lock_args__isset {
    - _ThriftHiveMetastore_lock_args__isset() : rqst(false) {}
    - bool rqst :1;
    +typedef struct _ThriftHiveMetastore_update_master_key_args__isset {
    + _ThriftHiveMetastore_update_master_key_args__isset() : seq_number(false), key(false) {}
    + bool seq_number :1;
    + bool key :1;
    +} _ThriftHiveMetastore_update_master_key_args__isset;
    +
    +class ThriftHiveMetastore_update_master_key_args {
    + public:
    +
    + ThriftHiveMetastore_update_master_key_args(const ThriftHiveMetastore_update_master_key_args&);
    + ThriftHiveMetastore_update_master_key_args& operator=(const ThriftHiveMetastore_update_master_key_args&);
    + ThriftHiveMetastore_update_master_key_args() : seq_number(0), key() {
    + }
    +
    + virtual ~ThriftHiveMetastore_update_master_key_args() throw();
    + int32_t seq_number;
    + std::string key;
    +
    + _ThriftHiveMetastore_update_master_key_args__isset __isset;
    +
    + void __set_seq_number(const int32_t val);
    +
    + void __set_key(const std::string& val);
    +
    + bool operator == (const ThriftHiveMetastore_update_master_key_args & rhs) const
    + {
    + if (!(seq_number == rhs.seq_number))
    + return false;
    + if (!(key == rhs.key))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_update_master_key_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_update_master_key_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_update_master_key_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_update_master_key_pargs() throw();
    + const int32_t* seq_number;
    + const std::string* key;
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_update_master_key_result__isset {
    + _ThriftHiveMetastore_update_master_key_result__isset() : o1(false), o2(false) {}
    + bool o1 :1;
    + bool o2 :1;
    +} _ThriftHiveMetastore_update_master_key_result__isset;
    +
    +class ThriftHiveMetastore_update_master_key_result {
    + public:
    +
    + ThriftHiveMetastore_update_master_key_result(const ThriftHiveMetastore_update_master_key_result&);
    + ThriftHiveMetastore_update_master_key_result& operator=(const ThriftHiveMetastore_update_master_key_result&);
    + ThriftHiveMetastore_update_master_key_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_update_master_key_result() throw();
    + NoSuchObjectException o1;
    + MetaException o2;
    +
    + _ThriftHiveMetastore_update_master_key_result__isset __isset;
    +
    + void __set_o1(const NoSuchObjectException& val);
    +
    + void __set_o2(const MetaException& val);
    +
    + bool operator == (const ThriftHiveMetastore_update_master_key_result & rhs) const
    + {
    + if (!(o1 == rhs.o1))
    + return false;
    + if (!(o2 == rhs.o2))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_update_master_key_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_update_master_key_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_update_master_key_presult__isset {
    + _ThriftHiveMetastore_update_master_key_presult__isset() : o1(false), o2(false) {}
    + bool o1 :1;
    + bool o2 :1;
    +} _ThriftHiveMetastore_update_master_key_presult__isset;
    +
    +class ThriftHiveMetastore_update_master_key_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_update_master_key_presult() throw();
    + NoSuchObjectException o1;
    + MetaException o2;
    +
    + _ThriftHiveMetastore_update_master_key_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_remove_master_key_args__isset {
    + _ThriftHiveMetastore_remove_master_key_args__isset() : key_seq(false) {}
    + bool key_seq :1;
    +} _ThriftHiveMetastore_remove_master_key_args__isset;
    +
    +class ThriftHiveMetastore_remove_master_key_args {
    + public:
    +
    + ThriftHiveMetastore_remove_master_key_args(const ThriftHiveMetastore_remove_master_key_args&);
    + ThriftHiveMetastore_remove_master_key_args& operator=(const ThriftHiveMetastore_remove_master_key_args&);
    + ThriftHiveMetastore_remove_master_key_args() : key_seq(0) {
    + }
    +
    + virtual ~ThriftHiveMetastore_remove_master_key_args() throw();
    + int32_t key_seq;
    +
    + _ThriftHiveMetastore_remove_master_key_args__isset __isset;
    +
    + void __set_key_seq(const int32_t val);
    +
    + bool operator == (const ThriftHiveMetastore_remove_master_key_args & rhs) const
    + {
    + if (!(key_seq == rhs.key_seq))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_remove_master_key_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_remove_master_key_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_remove_master_key_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_remove_master_key_pargs() throw();
    + const int32_t* key_seq;
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_remove_master_key_result__isset {
    + _ThriftHiveMetastore_remove_master_key_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_remove_master_key_result__isset;
    +
    +class ThriftHiveMetastore_remove_master_key_result {
    + public:
    +
    + ThriftHiveMetastore_remove_master_key_result(const ThriftHiveMetastore_remove_master_key_result&);
    + ThriftHiveMetastore_remove_master_key_result& operator=(const ThriftHiveMetastore_remove_master_key_result&);
    + ThriftHiveMetastore_remove_master_key_result() : success(0) {
    + }
    +
    + virtual ~ThriftHiveMetastore_remove_master_key_result() throw();
    + bool success;
    +
    + _ThriftHiveMetastore_remove_master_key_result__isset __isset;
    +
    + void __set_success(const bool val);
    +
    + bool operator == (const ThriftHiveMetastore_remove_master_key_result & rhs) const
    + {
    + if (!(success == rhs.success))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_remove_master_key_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_remove_master_key_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_remove_master_key_presult__isset {
    + _ThriftHiveMetastore_remove_master_key_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_remove_master_key_presult__isset;
    +
    +class ThriftHiveMetastore_remove_master_key_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_remove_master_key_presult() throw();
    + bool* success;
    +
    + _ThriftHiveMetastore_remove_master_key_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_master_keys_args {
    + public:
    +
    + ThriftHiveMetastore_get_master_keys_args(const ThriftHiveMetastore_get_master_keys_args&);
    + ThriftHiveMetastore_get_master_keys_args& operator=(const ThriftHiveMetastore_get_master_keys_args&);
    + ThriftHiveMetastore_get_master_keys_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_master_keys_args() throw();
    +
    + bool operator == (const ThriftHiveMetastore_get_master_keys_args & /* rhs */) const
    + {
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_master_keys_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_master_keys_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_master_keys_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_master_keys_pargs() throw();
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_master_keys_result__isset {
    + _ThriftHiveMetastore_get_master_keys_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_master_keys_result__isset;
    +
    +class ThriftHiveMetastore_get_master_keys_result {
    + public:
    +
    + ThriftHiveMetastore_get_master_keys_result(const ThriftHiveMetastore_get_master_keys_result&);
    + ThriftHiveMetastore_get_master_keys_result& operator=(const ThriftHiveMetastore_get_master_keys_result&);
    + ThriftHiveMetastore_get_master_keys_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_master_keys_result() throw();
    + std::vector<std::string> success;
    +
    + _ThriftHiveMetastore_get_master_keys_result__isset __isset;
    +
    + void __set_success(const std::vector<std::string> & val);
    +
    + bool operator == (const ThriftHiveMetastore_get_master_keys_result & rhs) const
    + {
    + if (!(success == rhs.success))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_master_keys_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_master_keys_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_master_keys_presult__isset {
    + _ThriftHiveMetastore_get_master_keys_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_master_keys_presult__isset;
    +
    +class ThriftHiveMetastore_get_master_keys_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_master_keys_presult() throw();
    + std::vector<std::string> * success;
    +
    + _ThriftHiveMetastore_get_master_keys_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_open_txns_args {
    + public:
    +
    + ThriftHiveMetastore_get_open_txns_args(const ThriftHiveMetastore_get_open_txns_args&);
    + ThriftHiveMetastore_get_open_txns_args& operator=(const ThriftHiveMetastore_get_open_txns_args&);
    + ThriftHiveMetastore_get_open_txns_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_args() throw();
    +
    + bool operator == (const ThriftHiveMetastore_get_open_txns_args & /* rhs */) const
    + {
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_open_txns_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_open_txns_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_open_txns_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_pargs() throw();
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_open_txns_result__isset {
    + _ThriftHiveMetastore_get_open_txns_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_open_txns_result__isset;
    +
    +class ThriftHiveMetastore_get_open_txns_result {
    + public:
    +
    + ThriftHiveMetastore_get_open_txns_result(const ThriftHiveMetastore_get_open_txns_result&);
    + ThriftHiveMetastore_get_open_txns_result& operator=(const ThriftHiveMetastore_get_open_txns_result&);
    + ThriftHiveMetastore_get_open_txns_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_result() throw();
    + GetOpenTxnsResponse success;
    +
    + _ThriftHiveMetastore_get_open_txns_result__isset __isset;
    +
    + void __set_success(const GetOpenTxnsResponse& val);
    +
    + bool operator == (const ThriftHiveMetastore_get_open_txns_result & rhs) const
    + {
    + if (!(success == rhs.success))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_open_txns_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_open_txns_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_open_txns_presult__isset {
    + _ThriftHiveMetastore_get_open_txns_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_open_txns_presult__isset;
    +
    +class ThriftHiveMetastore_get_open_txns_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_presult() throw();
    + GetOpenTxnsResponse* success;
    +
    + _ThriftHiveMetastore_get_open_txns_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_open_txns_info_args {
    + public:
    +
    + ThriftHiveMetastore_get_open_txns_info_args(const ThriftHiveMetastore_get_open_txns_info_args&);
    + ThriftHiveMetastore_get_open_txns_info_args& operator=(const ThriftHiveMetastore_get_open_txns_info_args&);
    + ThriftHiveMetastore_get_open_txns_info_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_info_args() throw();
    +
    + bool operator == (const ThriftHiveMetastore_get_open_txns_info_args & /* rhs */) const
    + {
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_open_txns_info_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_open_txns_info_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_get_open_txns_info_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_info_pargs() throw();
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_open_txns_info_result__isset {
    + _ThriftHiveMetastore_get_open_txns_info_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_open_txns_info_result__isset;
    +
    +class ThriftHiveMetastore_get_open_txns_info_result {
    + public:
    +
    + ThriftHiveMetastore_get_open_txns_info_result(const ThriftHiveMetastore_get_open_txns_info_result&);
    + ThriftHiveMetastore_get_open_txns_info_result& operator=(const ThriftHiveMetastore_get_open_txns_info_result&);
    + ThriftHiveMetastore_get_open_txns_info_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_info_result() throw();
    + GetOpenTxnsInfoResponse success;
    +
    + _ThriftHiveMetastore_get_open_txns_info_result__isset __isset;
    +
    + void __set_success(const GetOpenTxnsInfoResponse& val);
    +
    + bool operator == (const ThriftHiveMetastore_get_open_txns_info_result & rhs) const
    + {
    + if (!(success == rhs.success))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_get_open_txns_info_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_get_open_txns_info_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_get_open_txns_info_presult__isset {
    + _ThriftHiveMetastore_get_open_txns_info_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_get_open_txns_info_presult__isset;
    +
    +class ThriftHiveMetastore_get_open_txns_info_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_get_open_txns_info_presult() throw();
    + GetOpenTxnsInfoResponse* success;
    +
    + _ThriftHiveMetastore_get_open_txns_info_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_open_txns_args__isset {
    + _ThriftHiveMetastore_open_txns_args__isset() : rqst(false) {}
    + bool rqst :1;
    +} _ThriftHiveMetastore_open_txns_args__isset;
    +
    +class ThriftHiveMetastore_open_txns_args {
    + public:
    +
    + ThriftHiveMetastore_open_txns_args(const ThriftHiveMetastore_open_txns_args&);
    + ThriftHiveMetastore_open_txns_args& operator=(const ThriftHiveMetastore_open_txns_args&);
    + ThriftHiveMetastore_open_txns_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_open_txns_args() throw();
    + OpenTxnRequest rqst;
    +
    + _ThriftHiveMetastore_open_txns_args__isset __isset;
    +
    + void __set_rqst(const OpenTxnRequest& val);
    +
    + bool operator == (const ThriftHiveMetastore_open_txns_args & rhs) const
    + {
    + if (!(rqst == rhs.rqst))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_open_txns_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_open_txns_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_open_txns_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_open_txns_pargs() throw();
    + const OpenTxnRequest* rqst;
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_open_txns_result__isset {
    + _ThriftHiveMetastore_open_txns_result__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_open_txns_result__isset;
    +
    +class ThriftHiveMetastore_open_txns_result {
    + public:
    +
    + ThriftHiveMetastore_open_txns_result(const ThriftHiveMetastore_open_txns_result&);
    + ThriftHiveMetastore_open_txns_result& operator=(const ThriftHiveMetastore_open_txns_result&);
    + ThriftHiveMetastore_open_txns_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_open_txns_result() throw();
    + OpenTxnsResponse success;
    +
    + _ThriftHiveMetastore_open_txns_result__isset __isset;
    +
    + void __set_success(const OpenTxnsResponse& val);
    +
    + bool operator == (const ThriftHiveMetastore_open_txns_result & rhs) const
    + {
    + if (!(success == rhs.success))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_open_txns_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_open_txns_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_open_txns_presult__isset {
    + _ThriftHiveMetastore_open_txns_presult__isset() : success(false) {}
    + bool success :1;
    +} _ThriftHiveMetastore_open_txns_presult__isset;
    +
    +class ThriftHiveMetastore_open_txns_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_open_txns_presult() throw();
    + OpenTxnsResponse* success;
    +
    + _ThriftHiveMetastore_open_txns_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_abort_txn_args__isset {
    + _ThriftHiveMetastore_abort_txn_args__isset() : rqst(false) {}
    + bool rqst :1;
    +} _ThriftHiveMetastore_abort_txn_args__isset;
    +
    +class ThriftHiveMetastore_abort_txn_args {
    + public:
    +
    + ThriftHiveMetastore_abort_txn_args(const ThriftHiveMetastore_abort_txn_args&);
    + ThriftHiveMetastore_abort_txn_args& operator=(const ThriftHiveMetastore_abort_txn_args&);
    + ThriftHiveMetastore_abort_txn_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_abort_txn_args() throw();
    + AbortTxnRequest rqst;
    +
    + _ThriftHiveMetastore_abort_txn_args__isset __isset;
    +
    + void __set_rqst(const AbortTxnRequest& val);
    +
    + bool operator == (const ThriftHiveMetastore_abort_txn_args & rhs) const
    + {
    + if (!(rqst == rhs.rqst))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_abort_txn_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_abort_txn_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_abort_txn_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_abort_txn_pargs() throw();
    + const AbortTxnRequest* rqst;
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_abort_txn_result__isset {
    + _ThriftHiveMetastore_abort_txn_result__isset() : o1(false) {}
    + bool o1 :1;
    +} _ThriftHiveMetastore_abort_txn_result__isset;
    +
    +class ThriftHiveMetastore_abort_txn_result {
    + public:
    +
    + ThriftHiveMetastore_abort_txn_result(const ThriftHiveMetastore_abort_txn_result&);
    + ThriftHiveMetastore_abort_txn_result& operator=(const ThriftHiveMetastore_abort_txn_result&);
    + ThriftHiveMetastore_abort_txn_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_abort_txn_result() throw();
    + NoSuchTxnException o1;
    +
    + _ThriftHiveMetastore_abort_txn_result__isset __isset;
    +
    + void __set_o1(const NoSuchTxnException& val);
    +
    + bool operator == (const ThriftHiveMetastore_abort_txn_result & rhs) const
    + {
    + if (!(o1 == rhs.o1))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_abort_txn_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_abort_txn_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_abort_txn_presult__isset {
    + _ThriftHiveMetastore_abort_txn_presult__isset() : o1(false) {}
    + bool o1 :1;
    +} _ThriftHiveMetastore_abort_txn_presult__isset;
    +
    +class ThriftHiveMetastore_abort_txn_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_abort_txn_presult() throw();
    + NoSuchTxnException o1;
    +
    + _ThriftHiveMetastore_abort_txn_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_commit_txn_args__isset {
    + _ThriftHiveMetastore_commit_txn_args__isset() : rqst(false) {}
    + bool rqst :1;
    +} _ThriftHiveMetastore_commit_txn_args__isset;
    +
    +class ThriftHiveMetastore_commit_txn_args {
    + public:
    +
    + ThriftHiveMetastore_commit_txn_args(const ThriftHiveMetastore_commit_txn_args&);
    + ThriftHiveMetastore_commit_txn_args& operator=(const ThriftHiveMetastore_commit_txn_args&);
    + ThriftHiveMetastore_commit_txn_args() {
    + }
    +
    + virtual ~ThriftHiveMetastore_commit_txn_args() throw();
    + CommitTxnRequest rqst;
    +
    + _ThriftHiveMetastore_commit_txn_args__isset __isset;
    +
    + void __set_rqst(const CommitTxnRequest& val);
    +
    + bool operator == (const ThriftHiveMetastore_commit_txn_args & rhs) const
    + {
    + if (!(rqst == rhs.rqst))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_commit_txn_args &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_commit_txn_args & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +
    +class ThriftHiveMetastore_commit_txn_pargs {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_commit_txn_pargs() throw();
    + const CommitTxnRequest* rqst;
    +
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_commit_txn_result__isset {
    + _ThriftHiveMetastore_commit_txn_result__isset() : o1(false), o2(false) {}
    + bool o1 :1;
    + bool o2 :1;
    +} _ThriftHiveMetastore_commit_txn_result__isset;
    +
    +class ThriftHiveMetastore_commit_txn_result {
    + public:
    +
    + ThriftHiveMetastore_commit_txn_result(const ThriftHiveMetastore_commit_txn_result&);
    + ThriftHiveMetastore_commit_txn_result& operator=(const ThriftHiveMetastore_commit_txn_result&);
    + ThriftHiveMetastore_commit_txn_result() {
    + }
    +
    + virtual ~ThriftHiveMetastore_commit_txn_result() throw();
    + NoSuchTxnException o1;
    + TxnAbortedException o2;
    +
    + _ThriftHiveMetastore_commit_txn_result__isset __isset;
    +
    + void __set_o1(const NoSuchTxnException& val);
    +
    + void __set_o2(const TxnAbortedException& val);
    +
    + bool operator == (const ThriftHiveMetastore_commit_txn_result & rhs) const
    + {
    + if (!(o1 == rhs.o1))
    + return false;
    + if (!(o2 == rhs.o2))
    + return false;
    + return true;
    + }
    + bool operator != (const ThriftHiveMetastore_commit_txn_result &rhs) const {
    + return !(*this == rhs);
    + }
    +
    + bool operator < (const ThriftHiveMetastore_commit_txn_result & ) const;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_commit_txn_presult__isset {
    + _ThriftHiveMetastore_commit_txn_presult__isset() : o1(false), o2(false) {}
    + bool o1 :1;
    + bool o2 :1;
    +} _ThriftHiveMetastore_commit_txn_presult__isset;
    +
    +class ThriftHiveMetastore_commit_txn_presult {
    + public:
    +
    +
    + virtual ~ThriftHiveMetastore_commit_txn_presult() throw();
    + NoSuchTxnException o1;
    + TxnAbortedException o2;
    +
    + _ThriftHiveMetastore_commit_txn_presult__isset __isset;
    +
    + uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
    +
    +};
    +
    +typedef struct _ThriftHiveMetastore_lock_args__isset {
    + _ThriftHiveMetastore_lock_args__isset() : rqst(false) {}
    + bool rqst :1;
      } _ThriftHiveMetastore_lock_args__isset;

      class ThriftHiveMetastore_lock_args {
    @@ -17859,6 +18733,30 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public
        void cancel_delegation_token(const std::string& token_str_form);
        void send_cancel_delegation_token(const std::string& token_str_form);
        void recv_cancel_delegation_token();
    + bool add_token(const std::string& token_identifier, const std::string& delegation_token);
    + void send_add_token(const std::string& token_identifier, const std::string& delegation_token);
    + bool recv_add_token();
    + bool remove_token(const std::string& token_identifier);
    + void send_remove_token(const std::string& token_identifier);
    + bool recv_remove_token();
    + void get_token(std::string& _return, const std::string& token_identifier);
    + void send_get_token(const std::string& token_identifier);
    + void recv_get_token(std::string& _return);
    + void get_all_token_identifiers(std::vector<std::string> & _return);
    + void send_get_all_token_identifiers();
    + void recv_get_all_token_identifiers(std::vector<std::string> & _return);
    + int32_t add_master_key(const std::string& key);
    + void send_add_master_key(const std::string& key);
    + int32_t recv_add_master_key();
    + void update_master_key(const int32_t seq_number, const std::string& key);
    + void send_update_master_key(const int32_t seq_number, const std::string& key);
    + void recv_update_master_key();
    + bool remove_master_key(const int32_t key_seq);
    + void send_remove_master_key(const int32_t key_seq);
    + bool recv_remove_master_key();
    + void get_master_keys(std::vector<std::string> & _return);
    + void send_get_master_keys();
    + void recv_get_master_keys(std::vector<std::string> & _return);
        void get_open_txns(GetOpenTxnsResponse& _return);
        void send_get_open_txns();
        void recv_get_open_txns(GetOpenTxnsResponse& _return);
    @@ -18052,6 +18950,14 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
        void process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
        void process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
        void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_add_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_remove_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_get_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_get_all_token_identifiers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_add_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_update_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_remove_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    + void process_get_master_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
        void process_get_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
        void process_get_open_txns_info(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
        void process_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
    @@ -18191,6 +19097,14 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
          processMap_["get_delegation_token"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token;
          processMap_["renew_delegation_token"] = &ThriftHiveMetastoreProcessor::process_renew_delegation_token;
          processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token;
    + processMap_["add_token"] = &ThriftHiveMetastoreProcessor::process_add_token;
    + processMap_["remove_token"] = &ThriftHiveMetastoreProcessor::process_remove_token;
    + processMap_["get_token"] = &ThriftHiveMetastoreProcessor::process_get_token;
    + processMap_["get_all_token_identifiers"] = &ThriftHiveMetastoreProcessor::process_get_all_token_identifiers;
    + processMap_["add_master_key"] = &ThriftHiveMetastoreProcessor::process_add_master_key;
    + processMap_["update_master_key"] = &ThriftHiveMetastoreProcessor::process_update_master_key;
    + processMap_["remove_master_key"] = &ThriftHiveMetastoreProcessor::process_remove_master_key;
    + processMap_["get_master_keys"] = &ThriftHiveMetastoreProcessor::process_get_master_keys;
          processMap_["get_open_txns"] = &ThriftHiveMetastoreProcessor::process_get_open_txns;
          processMap_["get_open_txns_info"] = &ThriftHiveMetastoreProcessor::process_get_open_txns_info;
          processMap_["open_txns"] = &ThriftHiveMetastoreProcessor::process_open_txns;
    @@ -19312,6 +20226,81 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
          ifaces_[i]->cancel_delegation_token(token_str_form);
        }

    + bool add_token(const std::string& token_identifier, const std::string& delegation_token) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->add_token(token_identifier, delegation_token);
    + }
    + return ifaces_[i]->add_token(token_identifier, delegation_token);
    + }
    +
    + bool remove_token(const std::string& token_identifier) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->remove_token(token_identifier);
    + }
    + return ifaces_[i]->remove_token(token_identifier);
    + }
    +
    + void get_token(std::string& _return, const std::string& token_identifier) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->get_token(_return, token_identifier);
    + }
    + ifaces_[i]->get_token(_return, token_identifier);
    + return;
    + }
    +
    + void get_all_token_identifiers(std::vector<std::string> & _return) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->get_all_token_identifiers(_return);
    + }
    + ifaces_[i]->get_all_token_identifiers(_return);
    + return;
    + }
    +
    + int32_t add_master_key(const std::string& key) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->add_master_key(key);
    + }
    + return ifaces_[i]->add_master_key(key);
    + }
    +
    + void update_master_key(const int32_t seq_number, const std::string& key) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->update_master_key(seq_number, key);
    + }
    + ifaces_[i]->update_master_key(seq_number, key);
    + }
    +
    + bool remove_master_key(const int32_t key_seq) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->remove_master_key(key_seq);
    + }
    + return ifaces_[i]->remove_master_key(key_seq);
    + }
    +
    + void get_master_keys(std::vector<std::string> & _return) {
    + size_t sz = ifaces_.size();
    + size_t i = 0;
    + for (; i < (sz - 1); ++i) {
    + ifaces_[i]->get_master_keys(_return);
    + }
    + ifaces_[i]->get_master_keys(_return);
    + return;
    + }
    +
        void get_open_txns(GetOpenTxnsResponse& _return) {
          size_t sz = ifaces_.size();
          size_t i = 0;
    @@ -19894,6 +20883,30 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf
        void cancel_delegation_token(const std::string& token_str_form);
        int32_t send_cancel_delegation_token(const std::string& token_str_form);
        void recv_cancel_delegation_token(const int32_t seqid);
    + bool add_token(const std::string& token_identifier, const std::string& delegation_token);
    + int32_t send_add_token(const std::string& token_identifier, const std::string& delegation_token);
    + bool recv_add_token(const int32_t seqid);
    + bool remove_token(const std::string& token_identifier);
    + int32_t send_remove_token(const std::string& token_identifier);
    + bool recv_remove_token(const int32_t seqid);
    + void get_token(std::string& _return, const std::string& token_identifier);
    + int32_t send_get_token(const std::string& token_identifier);
    + void recv_get_token(std::string& _return, const int32_t seqid);
    + void get_all_token_identifiers(std::vector<std::string> & _return);
    + int32_t send_get_all_token_identifiers();
    + void recv_get_all_token_identifiers(std::vector<std::string> & _return, const int32_t seqid);
    + int32_t add_master_key(const std::string& key);
    + int32_t send_add_master_key(const std::string& key);
    + int32_t recv_add_master_key(const int32_t seqid);
    + void update_master_key(const int32_t seq_number, const std::string& key);
    + int32_t send_update_master_key(const int32_t seq_number, const std::string& key);
    + void recv_update_master_key(const int32_t seqid);
    + bool remove_master_key(const int32_t key_seq);
    + int32_t send_remove_master_key(const int32_t key_seq);
    + bool recv_remove_master_key(const int32_t seqid);
    + void get_master_keys(std::vector<std::string> & _return);
    + int32_t send_get_master_keys();
    + void recv_get_master_keys(std::vector<std::string> & _return, const int32_t seqid);
        void get_open_txns(GetOpenTxnsResponse& _return);
        int32_t send_get_open_txns();
        void recv_get_open_txns(GetOpenTxnsResponse& _return, const int32_t seqid);

    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
    index 6e21a9a..3e7c6e7 100644
    --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
    @@ -577,6 +577,46 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
          printf("cancel_delegation_token\n");
        }

    + bool add_token(const std::string& token_identifier, const std::string& delegation_token) {
    + // Your implementation goes here
    + printf("add_token\n");
    + }
    +
    + bool remove_token(const std::string& token_identifier) {
    + // Your implementation goes here
    + printf("remove_token\n");
    + }
    +
    + void get_token(std::string& _return, const std::string& token_identifier) {
    + // Your implementation goes here
    + printf("get_token\n");
    + }
    +
    + void get_all_token_identifiers(std::vector<std::string> & _return) {
    + // Your implementation goes here
    + printf("get_all_token_identifiers\n");
    + }
    +
    + int32_t add_master_key(const std::string& key) {
    + // Your implementation goes here
    + printf("add_master_key\n");
    + }
    +
    + void update_master_key(const int32_t seq_number, const std::string& key) {
    + // Your implementation goes here
    + printf("update_master_key\n");
    + }
    +
    + bool remove_master_key(const int32_t key_seq) {
    + // Your implementation goes here
    + printf("remove_master_key\n");
    + }
    +
    + void get_master_keys(std::vector<std::string> & _return) {
    + // Your implementation goes here
    + printf("get_master_keys\n");
    + }
    +
        void get_open_txns(GetOpenTxnsResponse& _return) {
          // Your implementation goes here
          printf("get_open_txns\n");
  • Ctang at Mar 8, 2016 at 8:06 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/87131d0c/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    index bcc7790..13e30db 100644
    --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    @@ -264,6 +264,22 @@ public class ThriftHiveMetastore {

          public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException;

    + public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException;
    +
    + public boolean remove_token(String token_identifier) throws org.apache.thrift.TException;
    +
    + public String get_token(String token_identifier) throws org.apache.thrift.TException;
    +
    + public List<String> get_all_token_identifiers() throws org.apache.thrift.TException;
    +
    + public int add_master_key(String key) throws MetaException, org.apache.thrift.TException;
    +
    + public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;
    +
    + public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException;
    +
    + public List<String> get_master_keys() throws org.apache.thrift.TException;
    +
          public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException;

          public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException;
    @@ -538,6 +554,22 @@ public class ThriftHiveMetastore {

          public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    + public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
    + public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    +
          public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

          public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
    @@ -3975,6 +4007,196 @@ public class ThriftHiveMetastore {
            return;
          }

    + public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException
    + {
    + send_add_token(token_identifier, delegation_token);
    + return recv_add_token();
    + }
    +
    + public void send_add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException
    + {
    + add_token_args args = new add_token_args();
    + args.setToken_identifier(token_identifier);
    + args.setDelegation_token(delegation_token);
    + sendBase("add_token", args);
    + }
    +
    + public boolean recv_add_token() throws org.apache.thrift.TException
    + {
    + add_token_result result = new add_token_result();
    + receiveBase(result, "add_token");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_token failed: unknown result");
    + }
    +
    + public boolean remove_token(String token_identifier) throws org.apache.thrift.TException
    + {
    + send_remove_token(token_identifier);
    + return recv_remove_token();
    + }
    +
    + public void send_remove_token(String token_identifier) throws org.apache.thrift.TException
    + {
    + remove_token_args args = new remove_token_args();
    + args.setToken_identifier(token_identifier);
    + sendBase("remove_token", args);
    + }
    +
    + public boolean recv_remove_token() throws org.apache.thrift.TException
    + {
    + remove_token_result result = new remove_token_result();
    + receiveBase(result, "remove_token");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_token failed: unknown result");
    + }
    +
    + public String get_token(String token_identifier) throws org.apache.thrift.TException
    + {
    + send_get_token(token_identifier);
    + return recv_get_token();
    + }
    +
    + public void send_get_token(String token_identifier) throws org.apache.thrift.TException
    + {
    + get_token_args args = new get_token_args();
    + args.setToken_identifier(token_identifier);
    + sendBase("get_token", args);
    + }
    +
    + public String recv_get_token() throws org.apache.thrift.TException
    + {
    + get_token_result result = new get_token_result();
    + receiveBase(result, "get_token");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_token failed: unknown result");
    + }
    +
    + public List<String> get_all_token_identifiers() throws org.apache.thrift.TException
    + {
    + send_get_all_token_identifiers();
    + return recv_get_all_token_identifiers();
    + }
    +
    + public void send_get_all_token_identifiers() throws org.apache.thrift.TException
    + {
    + get_all_token_identifiers_args args = new get_all_token_identifiers_args();
    + sendBase("get_all_token_identifiers", args);
    + }
    +
    + public List<String> recv_get_all_token_identifiers() throws org.apache.thrift.TException
    + {
    + get_all_token_identifiers_result result = new get_all_token_identifiers_result();
    + receiveBase(result, "get_all_token_identifiers");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result");
    + }
    +
    + public int add_master_key(String key) throws MetaException, org.apache.thrift.TException
    + {
    + send_add_master_key(key);
    + return recv_add_master_key();
    + }
    +
    + public void send_add_master_key(String key) throws org.apache.thrift.TException
    + {
    + add_master_key_args args = new add_master_key_args();
    + args.setKey(key);
    + sendBase("add_master_key", args);
    + }
    +
    + public int recv_add_master_key() throws MetaException, org.apache.thrift.TException
    + {
    + add_master_key_result result = new add_master_key_result();
    + receiveBase(result, "add_master_key");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + if (result.o1 != null) {
    + throw result.o1;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result");
    + }
    +
    + public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    + {
    + send_update_master_key(seq_number, key);
    + recv_update_master_key();
    + }
    +
    + public void send_update_master_key(int seq_number, String key) throws org.apache.thrift.TException
    + {
    + update_master_key_args args = new update_master_key_args();
    + args.setSeq_number(seq_number);
    + args.setKey(key);
    + sendBase("update_master_key", args);
    + }
    +
    + public void recv_update_master_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    + {
    + update_master_key_result result = new update_master_key_result();
    + receiveBase(result, "update_master_key");
    + if (result.o1 != null) {
    + throw result.o1;
    + }
    + if (result.o2 != null) {
    + throw result.o2;
    + }
    + return;
    + }
    +
    + public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException
    + {
    + send_remove_master_key(key_seq);
    + return recv_remove_master_key();
    + }
    +
    + public void send_remove_master_key(int key_seq) throws org.apache.thrift.TException
    + {
    + remove_master_key_args args = new remove_master_key_args();
    + args.setKey_seq(key_seq);
    + sendBase("remove_master_key", args);
    + }
    +
    + public boolean recv_remove_master_key() throws org.apache.thrift.TException
    + {
    + remove_master_key_result result = new remove_master_key_result();
    + receiveBase(result, "remove_master_key");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result");
    + }
    +
    + public List<String> get_master_keys() throws org.apache.thrift.TException
    + {
    + send_get_master_keys();
    + return recv_get_master_keys();
    + }
    +
    + public void send_get_master_keys() throws org.apache.thrift.TException
    + {
    + get_master_keys_args args = new get_master_keys_args();
    + sendBase("get_master_keys", args);
    + }
    +
    + public List<String> recv_get_master_keys() throws org.apache.thrift.TException
    + {
    + get_master_keys_result result = new get_master_keys_result();
    + receiveBase(result, "get_master_keys");
    + if (result.isSetSuccess()) {
    + return result.success;
    + }
    + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result");
    + }
    +
          public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException
          {
            send_get_open_txns();
    @@ -8606,6 +8828,262 @@ public class ThriftHiveMetastore {
            }
          }

    + public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + add_token_call method_call = new add_token_call(token_identifier, delegation_token, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class add_token_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private String token_identifier;
    + private String delegation_token;
    + public add_token_call(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.token_identifier = token_identifier;
    + this.delegation_token = delegation_token;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_token", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + add_token_args args = new add_token_args();
    + args.setToken_identifier(token_identifier);
    + args.setDelegation_token(delegation_token);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public boolean getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_add_token();
    + }
    + }
    +
    + public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + remove_token_call method_call = new remove_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class remove_token_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private String token_identifier;
    + public remove_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.token_identifier = token_identifier;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_token", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + remove_token_args args = new remove_token_args();
    + args.setToken_identifier(token_identifier);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public boolean getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_remove_token();
    + }
    + }
    +
    + public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + get_token_call method_call = new get_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class get_token_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private String token_identifier;
    + public get_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.token_identifier = token_identifier;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_token", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + get_token_args args = new get_token_args();
    + args.setToken_identifier(token_identifier);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public String getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_get_token();
    + }
    + }
    +
    + public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + get_all_token_identifiers_call method_call = new get_all_token_identifiers_call(resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class get_all_token_identifiers_call extends org.apache.thrift.async.TAsyncMethodCall {
    + public get_all_token_identifiers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_token_identifiers", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + get_all_token_identifiers_args args = new get_all_token_identifiers_args();
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public List<String> getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_get_all_token_identifiers();
    + }
    + }
    +
    + public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + add_master_key_call method_call = new add_master_key_call(key, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class add_master_key_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private String key;
    + public add_master_key_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.key = key;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + add_master_key_args args = new add_master_key_args();
    + args.setKey(key);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public int getResult() throws MetaException, org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_add_master_key();
    + }
    + }
    +
    + public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + update_master_key_call method_call = new update_master_key_call(seq_number, key, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class update_master_key_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private int seq_number;
    + private String key;
    + public update_master_key_call(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.seq_number = seq_number;
    + this.key = key;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + update_master_key_args args = new update_master_key_args();
    + args.setSeq_number(seq_number);
    + args.setKey(key);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + (new Client(prot)).recv_update_master_key();
    + }
    + }
    +
    + public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + remove_master_key_call method_call = new remove_master_key_call(key_seq, resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class remove_master_key_call extends org.apache.thrift.async.TAsyncMethodCall {
    + private int key_seq;
    + public remove_master_key_call(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + this.key_seq = key_seq;
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + remove_master_key_args args = new remove_master_key_args();
    + args.setKey_seq(key_seq);
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public boolean getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_remove_master_key();
    + }
    + }
    +
    + public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
    + checkReady();
    + get_master_keys_call method_call = new get_master_keys_call(resultHandler, this, ___protocolFactory, ___transport);
    + this.___currentMethod = method_call;
    + ___manager.call(method_call);
    + }
    +
    + public static class get_master_keys_call extends org.apache.thrift.async.TAsyncMethodCall {
    + public get_master_keys_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
    + super(client, protocolFactory, transport, resultHandler, false);
    + }
    +
    + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
    + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_master_keys", org.apache.thrift.protocol.TMessageType.CALL, 0));
    + get_master_keys_args args = new get_master_keys_args();
    + args.write(prot);
    + prot.writeMessageEnd();
    + }
    +
    + public List<String> getResult() throws org.apache.thrift.TException {
    + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    + throw new IllegalStateException("Method call not finished!");
    + }
    + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
    + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
    + return (new Client(prot)).recv_get_master_keys();
    + }
    + }
    +
          public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
            checkReady();
            get_open_txns_call method_call = new get_open_txns_call(resultHandler, this, ___protocolFactory, ___transport);
    @@ -9486,6 +9964,14 @@ public class ThriftHiveMetastore {
            processMap.put("get_delegation_token", new get_delegation_token());
            processMap.put("renew_delegation_token", new renew_delegation_token());
            processMap.put("cancel_delegation_token", new cancel_delegation_token());
    + processMap.put("add_token", new add_token());
    + processMap.put("remove_token", new remove_token());
    + processMap.put("get_token", new get_token());
    + processMap.put("get_all_token_identifiers", new get_all_token_identifiers());
    + processMap.put("add_master_key", new add_master_key());
    + processMap.put("update_master_key", new update_master_key());
    + processMap.put("remove_master_key", new remove_master_key());
    + processMap.put("get_master_keys", new get_master_keys());
            processMap.put("get_open_txns", new get_open_txns());
            processMap.put("get_open_txns_info", new get_open_txns_info());
            processMap.put("open_txns", new open_txns());
    @@ -12457,6 +12943,180 @@ public class ThriftHiveMetastore {
            }
          }

    + public static class add_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_token_args> {
    + public add_token() {
    + super("add_token");
    + }
    +
    + public add_token_args getEmptyArgsInstance() {
    + return new add_token_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public add_token_result getResult(I iface, add_token_args args) throws org.apache.thrift.TException {
    + add_token_result result = new add_token_result();
    + result.success = iface.add_token(args.token_identifier, args.delegation_token);
    + result.setSuccessIsSet(true);
    + return result;
    + }
    + }
    +
    + public static class remove_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_token_args> {
    + public remove_token() {
    + super("remove_token");
    + }
    +
    + public remove_token_args getEmptyArgsInstance() {
    + return new remove_token_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public remove_token_result getResult(I iface, remove_token_args args) throws org.apache.thrift.TException {
    + remove_token_result result = new remove_token_result();
    + result.success = iface.remove_token(args.token_identifier);
    + result.setSuccessIsSet(true);
    + return result;
    + }
    + }
    +
    + public static class get_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_token_args> {
    + public get_token() {
    + super("get_token");
    + }
    +
    + public get_token_args getEmptyArgsInstance() {
    + return new get_token_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public get_token_result getResult(I iface, get_token_args args) throws org.apache.thrift.TException {
    + get_token_result result = new get_token_result();
    + result.success = iface.get_token(args.token_identifier);
    + return result;
    + }
    + }
    +
    + public static class get_all_token_identifiers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_token_identifiers_args> {
    + public get_all_token_identifiers() {
    + super("get_all_token_identifiers");
    + }
    +
    + public get_all_token_identifiers_args getEmptyArgsInstance() {
    + return new get_all_token_identifiers_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public get_all_token_identifiers_result getResult(I iface, get_all_token_identifiers_args args) throws org.apache.thrift.TException {
    + get_all_token_identifiers_result result = new get_all_token_identifiers_result();
    + result.success = iface.get_all_token_identifiers();
    + return result;
    + }
    + }
    +
    + public static class add_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_master_key_args> {
    + public add_master_key() {
    + super("add_master_key");
    + }
    +
    + public add_master_key_args getEmptyArgsInstance() {
    + return new add_master_key_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public add_master_key_result getResult(I iface, add_master_key_args args) throws org.apache.thrift.TException {
    + add_master_key_result result = new add_master_key_result();
    + try {
    + result.success = iface.add_master_key(args.key);
    + result.setSuccessIsSet(true);
    + } catch (MetaException o1) {
    + result.o1 = o1;
    + }
    + return result;
    + }
    + }
    +
    + public static class update_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_master_key_args> {
    + public update_master_key() {
    + super("update_master_key");
    + }
    +
    + public update_master_key_args getEmptyArgsInstance() {
    + return new update_master_key_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public update_master_key_result getResult(I iface, update_master_key_args args) throws org.apache.thrift.TException {
    + update_master_key_result result = new update_master_key_result();
    + try {
    + iface.update_master_key(args.seq_number, args.key);
    + } catch (NoSuchObjectException o1) {
    + result.o1 = o1;
    + } catch (MetaException o2) {
    + result.o2 = o2;
    + }
    + return result;
    + }
    + }
    +
    + public static class remove_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_master_key_args> {
    + public remove_master_key() {
    + super("remove_master_key");
    + }
    +
    + public remove_master_key_args getEmptyArgsInstance() {
    + return new remove_master_key_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public remove_master_key_result getResult(I iface, remove_master_key_args args) throws org.apache.thrift.TException {
    + remove_master_key_result result = new remove_master_key_result();
    + result.success = iface.remove_master_key(args.key_seq);
    + result.setSuccessIsSet(true);
    + return result;
    + }
    + }
    +
    + public static class get_master_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_master_keys_args> {
    + public get_master_keys() {
    + super("get_master_keys");
    + }
    +
    + public get_master_keys_args getEmptyArgsInstance() {
    + return new get_master_keys_args();
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public get_master_keys_result getResult(I iface, get_master_keys_args args) throws org.apache.thrift.TException {
    + get_master_keys_result result = new get_master_keys_result();
    + result.success = iface.get_master_keys();
    + return result;
    + }
    + }
    +
          public static class get_open_txns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_open_txns_args> {
            public get_open_txns() {
              super("get_open_txns");
    @@ -13105,6 +13765,14 @@ public class ThriftHiveMetastore {
            processMap.put("get_delegation_token", new get_delegation_token());
            processMap.put("renew_delegation_token", new renew_delegation_token());
            processMap.put("cancel_delegation_token", new cancel_delegation_token());
    + processMap.put("add_token", new add_token());
    + processMap.put("remove_token", new remove_token());
    + processMap.put("get_token", new get_token());
    + processMap.put("get_all_token_identifiers", new get_all_token_identifiers());
    + processMap.put("add_master_key", new add_master_key());
    + processMap.put("update_master_key", new update_master_key());
    + processMap.put("remove_master_key", new remove_master_key());
    + processMap.put("get_master_keys", new get_master_keys());
            processMap.put("get_open_txns", new get_open_txns());
            processMap.put("get_open_txns_info", new get_open_txns_info());
            processMap.put("open_txns", new open_txns());
    @@ -20101,21 +20769,22 @@ public class ThriftHiveMetastore {
            }
          }

    - public static class get_open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_args, GetOpenTxnsResponse> {
    - public get_open_txns() {
    - super("get_open_txns");
    + public static class add_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_token_args, Boolean> {
    + public add_token() {
    + super("add_token");
            }

    - public get_open_txns_args getEmptyArgsInstance() {
    - return new get_open_txns_args();
    + public add_token_args getEmptyArgsInstance() {
    + return new add_token_args();
            }

    - public AsyncMethodCallback<GetOpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<GetOpenTxnsResponse>() {
    - public void onComplete(GetOpenTxnsResponse o) {
    - get_open_txns_result result = new get_open_txns_result();
    + return new AsyncMethodCallback<Boolean>() {
    + public void onComplete(Boolean o) {
    + add_token_result result = new add_token_result();
                  result.success = o;
    + result.setSuccessIsSet(true);
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
                    return;
    @@ -20127,7 +20796,7 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - get_open_txns_result result = new get_open_txns_result();
    + add_token_result result = new add_token_result();
                  {
                    msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
                    msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    @@ -20147,26 +20816,27 @@ public class ThriftHiveMetastore {
              return false;
            }

    - public void start(I iface, get_open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsResponse> resultHandler) throws TException {
    - iface.get_open_txns(resultHandler);
    + public void start(I iface, add_token_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
    + iface.add_token(args.token_identifier, args.delegation_token,resultHandler);
            }
          }

    - public static class get_open_txns_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_info_args, GetOpenTxnsInfoResponse> {
    - public get_open_txns_info() {
    - super("get_open_txns_info");
    + public static class remove_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remove_token_args, Boolean> {
    + public remove_token() {
    + super("remove_token");
            }

    - public get_open_txns_info_args getEmptyArgsInstance() {
    - return new get_open_txns_info_args();
    + public remove_token_args getEmptyArgsInstance() {
    + return new remove_token_args();
            }

    - public AsyncMethodCallback<GetOpenTxnsInfoResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<GetOpenTxnsInfoResponse>() {
    - public void onComplete(GetOpenTxnsInfoResponse o) {
    - get_open_txns_info_result result = new get_open_txns_info_result();
    + return new AsyncMethodCallback<Boolean>() {
    + public void onComplete(Boolean o) {
    + remove_token_result result = new remove_token_result();
                  result.success = o;
    + result.setSuccessIsSet(true);
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
                    return;
    @@ -20178,7 +20848,7 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - get_open_txns_info_result result = new get_open_txns_info_result();
    + remove_token_result result = new remove_token_result();
                  {
                    msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
                    msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    @@ -20198,25 +20868,25 @@ public class ThriftHiveMetastore {
              return false;
            }

    - public void start(I iface, get_open_txns_info_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsInfoResponse> resultHandler) throws TException {
    - iface.get_open_txns_info(resultHandler);
    + public void start(I iface, remove_token_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
    + iface.remove_token(args.token_identifier,resultHandler);
            }
          }

    - public static class open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, open_txns_args, OpenTxnsResponse> {
    - public open_txns() {
    - super("open_txns");
    + public static class get_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_token_args, String> {
    + public get_token() {
    + super("get_token");
            }

    - public open_txns_args getEmptyArgsInstance() {
    - return new open_txns_args();
    + public get_token_args getEmptyArgsInstance() {
    + return new get_token_args();
            }

    - public AsyncMethodCallback<OpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<OpenTxnsResponse>() {
    - public void onComplete(OpenTxnsResponse o) {
    - open_txns_result result = new open_txns_result();
    + return new AsyncMethodCallback<String>() {
    + public void onComplete(String o) {
    + get_token_result result = new get_token_result();
                  result.success = o;
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    @@ -20229,63 +20899,7 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - open_txns_result result = new open_txns_result();
    - {
    - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    - }
    - try {
    - fcall.sendResponse(fb,msg,msgType,seqid);
    - return;
    - } catch (Exception ex) {
    - LOGGER.error("Exception writing to internal frame buffer", ex);
    - }
    - fb.close();
    - }
    - };
    - }
    -
    - protected boolean isOneway() {
    - return false;
    - }
    -
    - public void start(I iface, open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<OpenTxnsResponse> resultHandler) throws TException {
    - iface.open_txns(args.rqst,resultHandler);
    - }
    - }
    -
    - public static class abort_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abort_txn_args, Void> {
    - public abort_txn() {
    - super("abort_txn");
    - }
    -
    - public abort_txn_args getEmptyArgsInstance() {
    - return new abort_txn_args();
    - }
    -
    - public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    - final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<Void>() {
    - public void onComplete(Void o) {
    - abort_txn_result result = new abort_txn_result();
    - try {
    - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    - return;
    - } catch (Exception e) {
    - LOGGER.error("Exception writing to internal frame buffer", e);
    - }
    - fb.close();
    - }
    - public void onError(Exception e) {
    - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    - org.apache.thrift.TBase msg;
    - abort_txn_result result = new abort_txn_result();
    - if (e instanceof NoSuchTxnException) {
    - result.o1 = (NoSuchTxnException) e;
    - result.setO1IsSet(true);
    - msg = result;
    - }
    - else
    + get_token_result result = new get_token_result();
                  {
                    msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
                    msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    @@ -20305,86 +20919,25 @@ public class ThriftHiveMetastore {
              return false;
            }

    - public void start(I iface, abort_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
    - iface.abort_txn(args.rqst,resultHandler);
    + public void start(I iface, get_token_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
    + iface.get_token(args.token_identifier,resultHandler);
            }
          }

    - public static class commit_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, commit_txn_args, Void> {
    - public commit_txn() {
    - super("commit_txn");
    + public static class get_all_token_identifiers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_token_identifiers_args, List<String>> {
    + public get_all_token_identifiers() {
    + super("get_all_token_identifiers");
            }

    - public commit_txn_args getEmptyArgsInstance() {
    - return new commit_txn_args();
    + public get_all_token_identifiers_args getEmptyArgsInstance() {
    + return new get_all_token_identifiers_args();
            }

    - public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    - final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<Void>() {
    - public void onComplete(Void o) {
    - commit_txn_result result = new commit_txn_result();
    - try {
    - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    - return;
    - } catch (Exception e) {
    - LOGGER.error("Exception writing to internal frame buffer", e);
    - }
    - fb.close();
    - }
    - public void onError(Exception e) {
    - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    - org.apache.thrift.TBase msg;
    - commit_txn_result result = new commit_txn_result();
    - if (e instanceof NoSuchTxnException) {
    - result.o1 = (NoSuchTxnException) e;
    - result.setO1IsSet(true);
    - msg = result;
    - }
    - else if (e instanceof TxnAbortedException) {
    - result.o2 = (TxnAbortedException) e;
    - result.setO2IsSet(true);
    - msg = result;
    - }
    - else
    - {
    - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    - }
    - try {
    - fcall.sendResponse(fb,msg,msgType,seqid);
    - return;
    - } catch (Exception ex) {
    - LOGGER.error("Exception writing to internal frame buffer", ex);
    - }
    - fb.close();
    - }
    - };
    - }
    -
    - protected boolean isOneway() {
    - return false;
    - }
    -
    - public void start(I iface, commit_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
    - iface.commit_txn(args.rqst,resultHandler);
    - }
    - }
    -
    - public static class lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, lock_args, LockResponse> {
    - public lock() {
    - super("lock");
    - }
    -
    - public lock_args getEmptyArgsInstance() {
    - return new lock_args();
    - }
    -
    - public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<LockResponse>() {
    - public void onComplete(LockResponse o) {
    - lock_result result = new lock_result();
    + return new AsyncMethodCallback<List<String>>() {
    + public void onComplete(List<String> o) {
    + get_all_token_identifiers_result result = new get_all_token_identifiers_result();
                  result.success = o;
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    @@ -20397,18 +20950,7 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - lock_result result = new lock_result();
    - if (e instanceof NoSuchTxnException) {
    - result.o1 = (NoSuchTxnException) e;
    - result.setO1IsSet(true);
    - msg = result;
    - }
    - else if (e instanceof TxnAbortedException) {
    - result.o2 = (TxnAbortedException) e;
    - result.setO2IsSet(true);
    - msg = result;
    - }
    - else
    + get_all_token_identifiers_result result = new get_all_token_identifiers_result();
                  {
                    msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
                    msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    @@ -20428,26 +20970,27 @@ public class ThriftHiveMetastore {
              return false;
            }

    - public void start(I iface, lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException {
    - iface.lock(args.rqst,resultHandler);
    + public void start(I iface, get_all_token_identifiers_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
    + iface.get_all_token_identifiers(resultHandler);
            }
          }

    - public static class check_lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, check_lock_args, LockResponse> {
    - public check_lock() {
    - super("check_lock");
    + public static class add_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_master_key_args, Integer> {
    + public add_master_key() {
    + super("add_master_key");
            }

    - public check_lock_args getEmptyArgsInstance() {
    - return new check_lock_args();
    + public add_master_key_args getEmptyArgsInstance() {
    + return new add_master_key_args();
            }

    - public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
    - return new AsyncMethodCallback<LockResponse>() {
    - public void onComplete(LockResponse o) {
    - check_lock_result result = new check_lock_result();
    + return new AsyncMethodCallback<Integer>() {
    + public void onComplete(Integer o) {
    + add_master_key_result result = new add_master_key_result();
                  result.success = o;
    + result.setSuccessIsSet(true);
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
                    return;
    @@ -20459,22 +21002,12 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - check_lock_result result = new check_lock_result();
    - if (e instanceof NoSuchTxnException) {
    - result.o1 = (NoSuchTxnException) e;
    + add_master_key_result result = new add_master_key_result();
    + if (e instanceof MetaException) {
    + result.o1 = (MetaException) e;
                              result.setO1IsSet(true);
                              msg = result;
                  }
    - else if (e instanceof TxnAbortedException) {
    - result.o2 = (TxnAbortedException) e;
    - result.setO2IsSet(true);
    - msg = result;
    - }
    - else if (e instanceof NoSuchLockException) {
    - result.o3 = (NoSuchLockException) e;
    - result.setO3IsSet(true);
    - msg = result;
    - }
                   else
                  {
                    msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    @@ -20495,25 +21028,25 @@ public class ThriftHiveMetastore {
              return false;
            }

    - public void start(I iface, check_lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException {
    - iface.check_lock(args.rqst,resultHandler);
    + public void start(I iface, add_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
    + iface.add_master_key(args.key,resultHandler);
            }
          }

    - public static class unlock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unlock_args, Void> {
    - public unlock() {
    - super("unlock");
    + public static class update_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_master_key_args, Void> {
    + public update_master_key() {
    + super("update_master_key");
            }

    - public unlock_args getEmptyArgsInstance() {
    - return new unlock_args();
    + public update_master_key_args getEmptyArgsInstance() {
    + return new update_master_key_args();
            }

            public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
              final org.apache.thrift.AsyncProcessFunction fcall = this;
              return new AsyncMethodCallback<Void>() {
                public void onComplete(Void o) {
    - unlock_result result = new unlock_result();
    + update_master_key_result result = new update_master_key_result();
                  try {
                    fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
                    return;
    @@ -20525,14 +21058,577 @@ public class ThriftHiveMetastore {
                public void onError(Exception e) {
                  byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
                  org.apache.thrift.TBase msg;
    - unlock_result result = new unlock_result();
    - if (e instanceof NoSuchLockException) {
    - result.o1 = (NoSuchLockException) e;
    + update_master_key_result result = new update_master_key_result();
    + if (e instanceof NoSuchObjectException) {
    + result.o1 = (NoSuchObjectException) e;
                              result.setO1IsSet(true);
                              msg = result;
                  }
    - else if (e instanceof TxnOpenException) {
    - result.o2 = (TxnOpenException) e;
    + else if (e instanceof MetaException) {
    + result.o2 = (MetaException) e;
    + result.setO2IsSet(true);
    + msg = result;
    + }
    + else
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, update_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
    + iface.update_master_key(args.seq_number, args.key,resultHandler);
    + }
    + }
    +
    + public static class remove_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remove_master_key_args, Boolean> {
    + public remove_master_key() {
    + super("remove_master_key");
    + }
    +
    + public remove_master_key_args getEmptyArgsInstance() {
    + return new remove_master_key_args();
    + }
    +
    + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<Boolean>() {
    + public void onComplete(Boolean o) {
    + remove_master_key_result result = new remove_master_key_result();
    + result.success = o;
    + result.setSuccessIsSet(true);
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + remove_master_key_result result = new remove_master_key_result();
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, remove_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
    + iface.remove_master_key(args.key_seq,resultHandler);
    + }
    + }
    +
    + public static class get_master_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_master_keys_args, List<String>> {
    + public get_master_keys() {
    + super("get_master_keys");
    + }
    +
    + public get_master_keys_args getEmptyArgsInstance() {
    + return new get_master_keys_args();
    + }
    +
    + public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<List<String>>() {
    + public void onComplete(List<String> o) {
    + get_master_keys_result result = new get_master_keys_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + get_master_keys_result result = new get_master_keys_result();
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, get_master_keys_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
    + iface.get_master_keys(resultHandler);
    + }
    + }
    +
    + public static class get_open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_args, GetOpenTxnsResponse> {
    + public get_open_txns() {
    + super("get_open_txns");
    + }
    +
    + public get_open_txns_args getEmptyArgsInstance() {
    + return new get_open_txns_args();
    + }
    +
    + public AsyncMethodCallback<GetOpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<GetOpenTxnsResponse>() {
    + public void onComplete(GetOpenTxnsResponse o) {
    + get_open_txns_result result = new get_open_txns_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + get_open_txns_result result = new get_open_txns_result();
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, get_open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsResponse> resultHandler) throws TException {
    + iface.get_open_txns(resultHandler);
    + }
    + }
    +
    + public static class get_open_txns_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_info_args, GetOpenTxnsInfoResponse> {
    + public get_open_txns_info() {
    + super("get_open_txns_info");
    + }
    +
    + public get_open_txns_info_args getEmptyArgsInstance() {
    + return new get_open_txns_info_args();
    + }
    +
    + public AsyncMethodCallback<GetOpenTxnsInfoResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<GetOpenTxnsInfoResponse>() {
    + public void onComplete(GetOpenTxnsInfoResponse o) {
    + get_open_txns_info_result result = new get_open_txns_info_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + get_open_txns_info_result result = new get_open_txns_info_result();
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, get_open_txns_info_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsInfoResponse> resultHandler) throws TException {
    + iface.get_open_txns_info(resultHandler);
    + }
    + }
    +
    + public static class open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, open_txns_args, OpenTxnsResponse> {
    + public open_txns() {
    + super("open_txns");
    + }
    +
    + public open_txns_args getEmptyArgsInstance() {
    + return new open_txns_args();
    + }
    +
    + public AsyncMethodCallback<OpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<OpenTxnsResponse>() {
    + public void onComplete(OpenTxnsResponse o) {
    + open_txns_result result = new open_txns_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + open_txns_result result = new open_txns_result();
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<OpenTxnsResponse> resultHandler) throws TException {
    + iface.open_txns(args.rqst,resultHandler);
    + }
    + }
    +
    + public static class abort_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abort_txn_args, Void> {
    + public abort_txn() {
    + super("abort_txn");
    + }
    +
    + public abort_txn_args getEmptyArgsInstance() {
    + return new abort_txn_args();
    + }
    +
    + public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<Void>() {
    + public void onComplete(Void o) {
    + abort_txn_result result = new abort_txn_result();
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + abort_txn_result result = new abort_txn_result();
    + if (e instanceof NoSuchTxnException) {
    + result.o1 = (NoSuchTxnException) e;
    + result.setO1IsSet(true);
    + msg = result;
    + }
    + else
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, abort_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
    + iface.abort_txn(args.rqst,resultHandler);
    + }
    + }
    +
    + public static class commit_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, commit_txn_args, Void> {
    + public commit_txn() {
    + super("commit_txn");
    + }
    +
    + public commit_txn_args getEmptyArgsInstance() {
    + return new commit_txn_args();
    + }
    +
    + public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<Void>() {
    + public void onComplete(Void o) {
    + commit_txn_result result = new commit_txn_result();
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + commit_txn_result result = new commit_txn_result();
    + if (e instanceof NoSuchTxnException) {
    + result.o1 = (NoSuchTxnException) e;
    + result.setO1IsSet(true);
    + msg = result;
    + }
    + else if (e instanceof TxnAbortedException) {
    + result.o2 = (TxnAbortedException) e;
    + result.setO2IsSet(true);
    + msg = result;
    + }
    + else
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, commit_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
    + iface.commit_txn(args.rqst,resultHandler);
    + }
    + }
    +
    + public static class lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, lock_args, LockResponse> {
    + public lock() {
    + super("lock");
    + }
    +
    + public lock_args getEmptyArgsInstance() {
    + return new lock_args();
    + }
    +
    + public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<LockResponse>() {
    + public void onComplete(LockResponse o) {
    + lock_result result = new lock_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + lock_result result = new lock_result();
    + if (e instanceof NoSuchTxnException) {
    + result.o1 = (NoSuchTxnException) e;
    + result.setO1IsSet(true);
    + msg = result;
    + }
    + else if (e instanceof TxnAbortedException) {
    + result.o2 = (TxnAbortedException) e;
    + result.setO2IsSet(true);
    + msg = result;
    + }
    + else
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException {
    + iface.lock(args.rqst,resultHandler);
    + }
    + }
    +
    + public static class check_lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, check_lock_args, LockResponse> {
    + public check_lock() {
    + super("check_lock");
    + }
    +
    + public check_lock_args getEmptyArgsInstance() {
    + return new check_lock_args();
    + }
    +
    + public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<LockResponse>() {
    + public void onComplete(LockResponse o) {
    + check_lock_result result = new check_lock_result();
    + result.success = o;
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + check_lock_result result = new check_lock_result();
    + if (e instanceof NoSuchTxnException) {
    + result.o1 = (NoSuchTxnException) e;
    + result.setO1IsSet(true);
    + msg = result;
    + }
    + else if (e instanceof TxnAbortedException) {
    + result.o2 = (TxnAbortedException) e;
    + result.setO2IsSet(true);
    + msg = result;
    + }
    + else if (e instanceof NoSuchLockException) {
    + result.o3 = (NoSuchLockException) e;
    + result.setO3IsSet(true);
    + msg = result;
    + }
    + else
    + {
    + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
    + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
    + }
    + try {
    + fcall.sendResponse(fb,msg,msgType,seqid);
    + return;
    + } catch (Exception ex) {
    + LOGGER.error("Exception writing to internal frame buffer", ex);
    + }
    + fb.close();
    + }
    + };
    + }
    +
    + protected boolean isOneway() {
    + return false;
    + }
    +
    + public void start(I iface, check_lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException {
    + iface.check_lock(args.rqst,resultHandler);
    + }
    + }
    +
    + public static class unlock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unlock_args, Void> {
    + public unlock() {
    + super("unlock");
    + }
    +
    + public unlock_args getEmptyArgsInstance() {
    + return new unlock_args();
    + }
    +
    + public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
    + final org.apache.thrift.AsyncProcessFunction fcall = this;
    + return new AsyncMethodCallback<Void>() {
    + public void onComplete(Void o) {
    + unlock_result result = new unlock_result();
    + try {
    + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
    + return;
    + } catch (Exception e) {
    + LOGGER.error("Exception writing to internal frame buffer", e);
    + }
    + fb.close();
    + }
    + public void onError(Exception e) {
    + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
    + org.apache.thrift.TBase msg;
    + unlock_result result = new unlock_result();
    + if (e instanceof NoSuchLockException) {
    + result.o1 = (NoSuchLockException) e;
    + result.setO1IsSet(true);
    + msg = result;
    + }
    + else if (e instanceof TxnOpenException) {
    + result.o2 = (TxnOpenException) e;
                              result.setO2IsSet(true);
                              msg = result;
                  }
    @@ -141432,85 +142528,6312 @@ public class ThriftHiveMetastore {
          static {
            Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
            tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
    - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
    - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
    + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
    + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
    + metaDataMap = Collections.unmodifiableMap(tmpMap);
    + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_ugi_result.class, metaDataMap);
    + }
    +
    + public set_ugi_result() {
    + }
    +
    + public set_ugi_result(
    + List<String> success,
    + MetaException o1)
    + {
    + this();
    + this.success = success;
    + this.o1 = o1;
    + }
    +
    + /**
    + * Performs a deep copy on <i>other</i>.
    + */
    + public set_ugi_result(set_ugi_result other) {
    + if (other.isSetSuccess()) {
    + List<String> __this__success = new ArrayList<String>(other.success);
    + this.success = __this__success;
    + }
    + if (other.isSetO1()) {
    + this.o1 = new MetaException(other.o1);
    + }
    + }
    +
    + public set_ugi_result deepCopy() {
    + return new set_ugi_result(this);
    + }
    +
    + @Override
    + public void clear() {
    + this.success = null;
    + this.o1 = null;
    + }
    +
    + public int getSuccessSize() {
    + return (this.success == null) ? 0 : this.success.size();
    + }
    +
    + public java.util.Iterator<String> getSuccessIterator() {
    + return (this.success == null) ? null : this.success.iterator();
    + }
    +
    + public void addToSuccess(String elem) {
    + if (this.success == null) {
    + this.success = new ArrayList<String>();
    + }
    + this.success.add(elem);
    + }
    +
    + public List<String> getSuccess() {
    + return this.success;
    + }
    +
    + public void setSuccess(List<String> success) {
    + this.success = success;
    + }
    +
    + public void unsetSuccess() {
    + this.success = null;
    + }
    +
    + /** Returns true if field success is set (has been assigned a value) and false otherwise */
    + public boolean isSetSuccess() {
    + return this.success != null;
    + }
    +
    + public void setSuccessIsSet(boolean value) {
    + if (!value) {
    + this.success = null;
    + }
    + }
    +
    + public MetaException getO1() {
    + return this.o1;
    + }
    +
    + public void setO1(MetaException o1) {
    + this.o1 = o1;
    + }
    +
    + public void unsetO1() {
    + this.o1 = null;
    + }
    +
    + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */
    + public boolean isSetO1() {
    + return this.o1 != null;
    + }
    +
    + public void setO1IsSet(boolean value) {
    + if (!value) {
    + this.o1 = null;
    + }
    + }
    +
    + public void setFieldValue(_Fields field, Object value) {
    + switch (field) {
    + case SUCCESS:
    + if (value == null) {
    + unsetSuccess();
    + } else {
    + setSuccess((List<String>)value);
    + }
    + break;
    +
    + case O1:
    + if (value == null) {
    + unsetO1();
    + } else {
    + setO1((MetaException)value);
    + }
    + break;
    +
    + }
    + }
    +
    + public Object getFieldValue(_Fields field) {
    + switch (field) {
    + case SUCCESS:
    + return getSuccess();
    +
    + case O1:
    + return getO1();
    +
    + }
    + throw new IllegalStateException();
    + }
    +
    + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    + public boolean isSet(_Fields field) {
    + if (field == null) {
    + throw new IllegalArgumentException();
    + }
    +
    + switch (field) {
    + case SUCCESS:
    + return isSetSuccess();
    + case O1:
    + return isSetO1();
    + }
    + throw new IllegalStateException();
    + }
    +
    + @Override
    + public boolean equals(Object that) {
    + if (that == null)
    + return false;
    + if (that instanceof set_ugi_result)
    + return this.equals((set_ugi_result)that);
    + return false;
    + }
    +
    + public boolean equals(set_ugi_result that) {
    + if (that == null)
    + return false;
    +
    + boolean this_present_success = true && this.isSetSuccess();
    + boolean that_present_success = true && that.isSetSuccess();
    + if (this_present_success || that_present_success) {
    + if (!(this_present_success && that_present_success))
    + return false;
    + if (!this.success.equals(that.success))
    + return false;
    + }
    +
    + boolean this_present_o1 = true && this.isSetO1();
    + boolean that_present_o1 = true && that.isSetO1();
    + if (this_present_o1 || that_present_o1) {
    + if (!(this_present_o1 && that_present_o1))
    + return false;
    + if (!this.o1.equals(that.o1))
    + return false;
    + }
    +
    + return true;
    + }
    +
    + @Override
    + public int hashCode() {
    + List<Object> list = new ArrayList<Object>();
    +
    + boolean present_success = true && (isSetSuccess());
    + list.add(present_success);
    + if (present_success)
    + list.add(success);
    +
    + boolean present_o1 = true && (isSetO1());
    + list.add(present_o1);
    + if (present_o1)
    + list.add(o1);
    +
    + return list.hashCode();
    + }
    +
    + @Override
    + public int compareTo(set_ugi_result other) {
    + if (!getClass().equals(other.getClass())) {
    + return getClass().getName().compareTo(other.getClass().getName());
    + }
    +
    + int lastComparison = 0;
    +
    + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetSuccess()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
    + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetO1()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
    + return 0;
    + }
    +
    + public _Fields fieldForId(int fieldId) {
    + return _Fields.findByThriftId(fieldId);
    + }
    +
    + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    + schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    + }
    +
    + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    + schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    + }
    +
    + @Override
    + public String toString() {
    + StringBuilder sb = new StringBuilder("set_ugi_result(");
    + boolean first = true;
    +
    + sb.append("success:");
    + if (this.success == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.success);
    + }
    + first = false;
    + if (!first) sb.append(", ");
    + sb.append("o1:");
    + if (this.o1 == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.o1);
    + }
    + first = false;
    + sb.append(")");
    + return sb.toString();
    + }
    +
    + public void validate() throws org.apache.thrift.TException {
    + // check for required fields
    + // check for sub-struct validity
    + }
    +
    + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    + try {
    + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    + } catch (org.apache.thrift.TException te) {
    + throw new java.io.IOException(te);
    + }
    + }
    +
    + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    + try {
    + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    + } catch (org.apache.thrift.TException te) {
    + throw new java.io.IOException(te);
    + }
    + }
    +
    + private static class set_ugi_resultStandardSchemeFactory implements SchemeFactory {
    + public set_ugi_resultStandardScheme getScheme() {
    + return new set_ugi_resultStandardScheme();
    + }
    + }
    +
    + private static class set_ugi_resultStandardScheme extends StandardScheme<set_ugi_result> {
    +
    + public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result struct) throws org.apache.thrift.TException {
    + org.apache.thrift.protocol.TField schemeField;
    + iprot.readStructBegin();
    + while (true)
    + {
    + schemeField = iprot.readFieldBeg

    <TRUNCATED>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedMar 8, '16 at 8:06p
activeMar 8, '16 at 8:06p
posts7
users1
websitehive.apache.org

1 user in discussion

Ctang: 7 posts

People

Translate

site design / logo © 2021 Grokbase