예제 #1
0
        /// <exception cref="Org.Apache.Hadoop.Hdfs.Util.XMLUtils.InvalidXmlException"/>
        public static CachePoolInfo ReadCachePoolInfo(XMLUtils.Stanza st)
        {
            string        poolName = st.GetValue("POOLNAME");
            CachePoolInfo info     = new CachePoolInfo(poolName);

            if (st.HasChildren("OWNERNAME"))
            {
                info.SetOwnerName(st.GetValue("OWNERNAME"));
            }
            if (st.HasChildren("GROUPNAME"))
            {
                info.SetGroupName(st.GetValue("GROUPNAME"));
            }
            if (st.HasChildren("MODE"))
            {
                info.SetMode(FSEditLogOp.FsPermissionFromXml(st));
            }
            if (st.HasChildren("LIMIT"))
            {
                info.SetLimit(long.Parse(st.GetValue("LIMIT")));
            }
            if (st.HasChildren("MAXRELATIVEEXPIRY"))
            {
                info.SetMaxRelativeExpiryMs(long.Parse(st.GetValue("MAXRELATIVEEXPIRY")));
            }
            return(info);
        }