/// <exception cref="System.IO.IOException"/>
        private DelegationKey GetKeyFromZK(int keyId)
        {
            string nodePath = GetNodePath(ZkDtsmMasterKeyRoot, DelegationKeyPrefix + keyId);

            try
            {
                byte[] data = zkClient.GetData().ForPath(nodePath);
                if ((data == null) || (data.Length == 0))
                {
                    return(null);
                }
                ByteArrayInputStream bin = new ByteArrayInputStream(data);
                DataInputStream      din = new DataInputStream(bin);
                DelegationKey        key = new DelegationKey();
                key.ReadFields(din);
                return(key);
            }
            catch (KeeperException.NoNodeException)
            {
                Log.Error("No node in path [" + nodePath + "]");
            }
            catch (Exception ex)
            {
                throw new IOException(ex);
            }
            return(null);
        }
        /// <exception cref="System.IO.IOException"/>
        private void ProcessKeyAddOrUpdate(byte[] data)
        {
            ByteArrayInputStream bin = new ByteArrayInputStream(data);
            DataInputStream      din = new DataInputStream(bin);
            DelegationKey        key = new DelegationKey();

            key.ReadFields(din);
            lock (this)
            {
                allKeys[key.GetKeyId()] = key;
            }
        }