Package org.apache.hadoop.ozone
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 Summary
FieldsFields inherited from class org.apache.hadoop.hdds.cli.GenericCli
EXECUTION_ERROR_EXIT_CODE -
Constructor Summary
ConstructorsConstructorDescriptionHddsDatanodeService(String[] args) Create a Datanode instance based on the supplied command-line arguments. -
Method Summary
Modifier and TypeMethodDescriptioncall()voidclose()org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClientorg.apache.hadoop.hdds.conf.OzoneConfigurationgetConf()Returns the OzoneConfiguration used by this HddsDatanodeService.org.apache.hadoop.hdds.protocol.DatanodeDetailsReturn DatanodeDetails if set, return null otherwise.org.apache.hadoop.hdds.conf.ReconfigurationHandlerorg.apache.hadoop.hdds.security.x509.certificate.client.CertificateClientinitializeCertificateClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certClient) Initializes secure Datanode.booleanvoidjoin()static voidvoidprintError(Throwable error) voidsaveNewCertId(String newCertId) voidsetCertificateClient(org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient client) voidsetConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration configuration) voidsetSecretKeyClient(org.apache.hadoop.hdds.security.symmetric.SecretKeyClient client) voidstart()voidStarts HddsDatanode services.voidstart(org.apache.hadoop.hdds.conf.OzoneConfiguration configuration) voidstop()voidMethods inherited from class org.apache.hadoop.hdds.cli.GenericCli
err, execute, getCmd, getOzoneConf, getUser, isVerbose, out, run, setConfigurationOverrides, setConfigurationPath
-
Field Details
-
TESTING_DATANODE_VERSION_INITIAL
- See Also:
-
TESTING_DATANODE_VERSION_CURRENT
- See Also:
-
-
Constructor Details
-
HddsDatanodeService
public HddsDatanodeService() -
HddsDatanodeService
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
-
call
-
setConfiguration
public void setConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration configuration) -
start
Starts HddsDatanode services.- Specified by:
startin interfaceorg.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
-
getClientProtocolServer
-
join
public void join() -
terminateDatanode
public void terminateDatanode() -
stop
public void stop()- Specified by:
stopin interfaceorg.apache.hadoop.util.ServicePlugin
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
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
- Specified by:
printErrorin interfaceorg.apache.hadoop.hdds.cli.GenericParentCommand- Overrides:
printErrorin classorg.apache.hadoop.hdds.cli.GenericCli
-
saveNewCertId
-
isStopped
public boolean isStopped() -
getReconfigurationHandler
public org.apache.hadoop.hdds.conf.ReconfigurationHandler getReconfigurationHandler()
-