Class SecureDataNodeStarter
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter
- All Implemented Interfaces:
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
Nested ClassesModifier and TypeClassDescriptionstatic classStash necessary resources needed for datanode operation in a secure env. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()getSecureResources(org.apache.hadoop.conf.Configuration conf) Acquire privileged resources (i.e., the privileged ports) for the data node.voidinit(org.apache.commons.daemon.DaemonContext context) voidstart()voidstop()
-
Constructor Details
-
SecureDataNodeStarter
public SecureDataNodeStarter()
-
-
Method Details
-
init
- Specified by:
initin interfaceorg.apache.commons.daemon.Daemon- Throws:
Exception
-
start
- Specified by:
startin interfaceorg.apache.commons.daemon.Daemon- Throws:
Exception
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.apache.commons.daemon.Daemon
-
stop
- Specified by:
stopin interfaceorg.apache.commons.daemon.Daemon- Throws:
Exception
-
getSecureResources
@VisibleForTesting 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
-