Package org.apache.hadoop.hdfs.tools
Class DFSHAAdmin
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.ha.HAAdmin
org.apache.hadoop.hdfs.tools.DFSHAAdmin
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
public class DFSHAAdmin
extends org.apache.hadoop.ha.HAAdmin
Class to extend HAAdmin to do a little bit of HDFS-specific configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.ha.HAAdmin
org.apache.hadoop.ha.HAAdmin.UsageInfo -
Field Summary
Fields inherited from class org.apache.hadoop.ha.HAAdmin
errOut, FORCEACTIVE, FORCEMANUAL, out, USAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.conf.ConfigurationaddSecurityConfiguration(org.apache.hadoop.conf.Configuration conf) Add the requisite security principal settings to the given Configuration, returning a copy.protected booleancheckParameterValidity(String[] argv) protected Collection<String>getTargetIds(String namenodeToActivate) returns the list of all namenode ids for the given configuration.protected Stringstatic voidprotected org.apache.hadoop.ha.HAServiceTargetresolveTarget(String nnId) Try to map the given namenode ID to its service address.protected intvoidsetConf(org.apache.hadoop.conf.Configuration conf) protected voidsetErrOut(PrintStream errOut) protected voidsetOut(PrintStream out) Methods inherited from class org.apache.hadoop.ha.HAAdmin
checkManualStateManagementOK, checkParameterValidity, confirmForceManual, createReqInfo, getAllServiceState, getRequestSource, getServiceAddr, gracefulFailoverThroughZKFCs, help, help, parseOpts, parseOpts, printUsage, printUsage, printUsage, printUsage, run, setRequestSourceMethods inherited from class org.apache.hadoop.conf.Configured
getConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf
-
Constructor Details
-
DFSHAAdmin
public DFSHAAdmin()
-
-
Method Details
-
setErrOut
-
setOut
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf) - Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classorg.apache.hadoop.ha.HAAdmin
-
addSecurityConfiguration
public static org.apache.hadoop.conf.Configuration addSecurityConfiguration(org.apache.hadoop.conf.Configuration conf) Add the requisite security principal settings to the given Configuration, returning a copy.- Parameters:
conf- the original config- Returns:
- a copy with the security settings added
-
resolveTarget
Try to map the given namenode ID to its service address.- Specified by:
resolveTargetin classorg.apache.hadoop.ha.HAAdmin
-
getUsageString
- Overrides:
getUsageStringin classorg.apache.hadoop.ha.HAAdmin
-
checkParameterValidity
- Overrides:
checkParameterValidityin classorg.apache.hadoop.ha.HAAdmin
-
runCmd
- Overrides:
runCmdin classorg.apache.hadoop.ha.HAAdmin- Throws:
Exception
-
getTargetIds
returns the list of all namenode ids for the given configuration.- Overrides:
getTargetIdsin classorg.apache.hadoop.ha.HAAdmin
-
main
- Throws:
Exception
-