org.apache.hadoop.hdfs.server.datanode
Class SecureDataNodeStarter

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter
All Implemented Interfaces:
org.apache.commons.daemon.Daemon

public class SecureDataNodeStarter
extends Object
implements org.apache.commons.daemon.Daemon

Utility class to start a datanode in a secure cluster, first obtaining privileged resources before main startup and handing them to the datanode.


Nested Class Summary
static class SecureDataNodeStarter.SecureResources
          Stash necessary resources needed for datanode operation in a secure env.
 
Constructor Summary
SecureDataNodeStarter()
           
 
Method Summary
 void destroy()
           
static SecureDataNodeStarter.SecureResources getSecureResources(org.apache.hadoop.conf.Configuration conf)
          Acquire privileged resources (i.e., the privileged ports) for the data node.
 void init(org.apache.commons.daemon.DaemonContext context)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureDataNodeStarter

public SecureDataNodeStarter()
Method Detail

init

public void init(org.apache.commons.daemon.DaemonContext context)
          throws Exception
Specified by:
init in interface org.apache.commons.daemon.Daemon
Throws:
Exception

start

public void start()
           throws Exception
Specified by:
start in interface org.apache.commons.daemon.Daemon
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface org.apache.commons.daemon.Daemon

stop

public void stop()
          throws Exception
Specified by:
stop in interface org.apache.commons.daemon.Daemon
Throws:
Exception

getSecureResources

public static SecureDataNodeStarter.SecureResources getSecureResources(org.apache.hadoop.conf.Configuration conf)
                                                                throws Exception
Acquire privileged resources (i.e., the privileged ports) for the data node. The privileged resources consist of the port of the RPC server and the port of HTTP (not HTTPS) server.

Throws:
Exception


Copyright © 2014 Apache Software Foundation. All Rights Reserved.