org.apache.hadoop.hdfs.tools
Class DFSHAAdmin

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.ha.HAAdmin
          extended by 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, out, USAGE
 
Constructor Summary
DFSHAAdmin()
           
 
Method Summary
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.
protected  String getUsageString()
           
static void main(String[] argv)
           
protected  org.apache.hadoop.ha.HAServiceTarget resolveTarget(String nnId)
          Try to map the given namenode ID to its service address.
protected  int runCmd(String[] argv)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
protected  void setErrOut(PrintStream errOut)
           
protected  void setOut(PrintStream 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
 

Constructor Detail

DFSHAAdmin

public DFSHAAdmin()
Method Detail

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 © 2014 Apache Software Foundation. All Rights Reserved.