Class SecureDataNodeStarter

java.lang.Object
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.
  • Constructor Details

    • SecureDataNodeStarter

      public SecureDataNodeStarter()
  • Method Details

    • 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

      @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