Class HddsDatanodeService

java.lang.Object
org.apache.hadoop.hdds.cli.GenericCli
org.apache.hadoop.ozone.HddsDatanodeService
All Implemented Interfaces:
Closeable, AutoCloseable, Callable<Void>, org.apache.hadoop.hdds.cli.GenericParentCommand, org.apache.hadoop.util.ServicePlugin

public class HddsDatanodeService extends org.apache.hadoop.hdds.cli.GenericCli implements Callable<Void>, org.apache.hadoop.util.ServicePlugin
Datanode service plugin to start the HDDS container services.
  • Field Details

  • Constructor Details

    • HddsDatanodeService

      public HddsDatanodeService()
    • HddsDatanodeService

      public HddsDatanodeService(String[] args)
      Create a Datanode instance based on the supplied command-line arguments.

      This method is intended for unit tests only. It suppresses the startup/shutdown message and skips registering Unix signal handlers.

      Parameters:
      args - command line arguments.
  • Method Details

    • main

      public static void main(String[] args)
    • call

      public Void call() throws Exception
      Specified by:
      call in interface Callable<Void>
      Throws:
      Exception
    • setConfiguration

      public void setConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration configuration)
    • start

      public void start(Object service)
      Starts HddsDatanode services.
      Specified by:
      start in interface org.apache.hadoop.util.ServicePlugin
      Parameters:
      service - The service instance invoking this method
    • start

      public void start(org.apache.hadoop.hdds.conf.OzoneConfiguration configuration)
    • start

      public void start()
    • initializeCertificateClient

      public org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient initializeCertificateClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certClient) throws IOException
      Initializes secure Datanode.
      Throws:
      IOException
    • getConf

      public org.apache.hadoop.hdds.conf.OzoneConfiguration getConf()
      Returns the OzoneConfiguration used by this HddsDatanodeService.
      Returns:
      OzoneConfiguration
    • getDatanodeDetails

      public org.apache.hadoop.hdds.protocol.DatanodeDetails getDatanodeDetails()
      Return DatanodeDetails if set, return null otherwise.
      Returns:
      DatanodeDetails
    • getDatanodeStateMachine

      public DatanodeStateMachine getDatanodeStateMachine()
    • getClientProtocolServer

      public HddsDatanodeClientProtocolServer getClientProtocolServer()
    • join

      public void join()
    • terminateDatanode

      public void terminateDatanode()
    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.hadoop.util.ServicePlugin
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getComponent

      public String getComponent()
    • getCertificateClient

      public org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient getCertificateClient()
    • setCertificateClient

      public void setCertificateClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient client) throws IOException
      Throws:
      IOException
    • setSecretKeyClient

      public void setSecretKeyClient(org.apache.hadoop.hdds.security.symmetric.SecretKeyClient client)
    • printError

      public void printError(Throwable error)
      Specified by:
      printError in interface org.apache.hadoop.hdds.cli.GenericParentCommand
      Overrides:
      printError in class org.apache.hadoop.hdds.cli.GenericCli
    • saveNewCertId

      public void saveNewCertId(String newCertId)
    • isStopped

      public boolean isStopped()
    • getReconfigurationHandler

      public org.apache.hadoop.hdds.conf.ReconfigurationHandler getReconfigurationHandler()