Author: bikas Date: Tue Oct 29 21:03:54 2013 New Revision: 1536888 URL: http://svn.apache.org/r1536888 Log: YARN-1068. Add admin support for HA operations (Karthik Kambatla via bikas)
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java?rev=1536888&r1=1536887&r2=1536888&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java Tue Oct 29 21:03:54 2013 @@ -63,7 +63,7 @@ public abstract class HAAdmin extends Co private int rpcTimeoutForChecks = -1; - private static Map<String, UsageInfo> USAGE = + protected final static Map<String, UsageInfo> USAGE = ImmutableMap.<String, UsageInfo>builder() .put("-transitionToActive", new UsageInfo("<serviceId>", "Transitions the service into Active state")) @@ -91,6 +91,14 @@ public abstract class HAAdmin extends Co protected PrintStream out = System.out; private RequestSource requestSource = RequestSource.REQUEST_BY_USER; + protected HAAdmin() { + super(); + } + + protected HAAdmin(Configuration conf) { + super(conf); + } + protected abstract HAServiceTarget resolveTarget(String string); protected String getUsageString() { @@ -461,9 +469,9 @@ public abstract class HAAdmin extends Co return 0; } - private static class UsageInfo { - private final String args; - private final String help; + protected static class UsageInfo { + public final String args; + public final String help; public UsageInfo(String args, String help) { this.args = args;