Class RegistryDNSServer
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.registry.server.dns.RegistryDNSServer
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
public class RegistryDNSServer
extends org.apache.hadoop.service.CompositeService
A server/service that starts and manages the lifecycle of a DNS registry
instance.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsFields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
ConstructorsConstructorDescriptionRegistryDNSServer(String name, RegistryDNS registryDNS) Creates the DNS server. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidLanches the server instance.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) Initializes the DNS server.protected voidStarts the server.Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceStopMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
SHUTDOWN_HOOK_PRIORITY
public static final int SHUTDOWN_HOOK_PRIORITY- See Also:
-
-
Constructor Details
-
RegistryDNSServer
Creates the DNS server.- Parameters:
name- the server name.registryDNS- the registry DNS instance.
-
-
Method Details
-
serviceInit
Initializes the DNS server.- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Parameters:
conf- the hadoop configuration instance.- Throws:
Exception- if service initialization fails.
-
serviceStart
Starts the server.- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception- if service start fails.
-
main
Lanches the server instance.- Parameters:
args- the command line args.- Throws:
IOException- if command line options can't be parsed
-