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.
Fields inherited from class org.apache.hadoop.ha.HAAdmin |
errOut, out |
Methods inherited from class org.apache.hadoop.ha.HAAdmin |
getServiceAddr, printUsage, run |
Methods inherited from class org.apache.hadoop.conf.Configured |
getConf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf |
DFSHAAdmin
public DFSHAAdmin()
setErrOut
protected void setErrOut(PrintStream errOut)
setOut
protected void setOut(PrintStream out)
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
- Overrides:
setConf
in class org.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
protected org.apache.hadoop.ha.HAServiceTarget resolveTarget(String nnId)
- Try to map the given namenode ID to its service address.
- Specified by:
resolveTarget
in class org.apache.hadoop.ha.HAAdmin
getUsageString
protected String getUsageString()
- Overrides:
getUsageString
in class org.apache.hadoop.ha.HAAdmin
runCmd
protected int runCmd(String[] argv)
throws Exception
- Overrides:
runCmd
in class org.apache.hadoop.ha.HAAdmin
- Throws:
Exception
main
public static void main(String[] argv)
throws Exception
- Throws:
Exception
Copyright © 2013 Apache Software Foundation. All Rights Reserved.