示例#1
0
            public static HdfsServerConstants.StartupOption GetEnum(string value)
            {
                Matcher matcher = HdfsServerConstants.StartupOption.EnumWithRollingUpgradeOption.
                                  Matcher(value);

                if (matcher.Matches())
                {
                    HdfsServerConstants.StartupOption option = HdfsServerConstants.StartupOption.ValueOf
                                                                   (matcher.Group(1));
                    option.SetRollingUpgradeStartupOption(matcher.Group(2));
                    return(option);
                }
                else
                {
                    return(HdfsServerConstants.StartupOption.ValueOf(value));
                }
            }
示例#2
0
 public bool Matches(HdfsServerConstants.StartupOption option)
 {
     return(option == HdfsServerConstants.StartupOption.Rollingupgrade && option.GetRollingUpgradeStartupOption
                () == this);
 }