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.CompositeServiceShutdownHook

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class org.apache.hadoop.service.CompositeService

    STOP_ONLY_STARTED_SERVICES
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegistryDNSServer(String name, RegistryDNS registryDNS)
    Creates the DNS server.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Lanches the server instance.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
    Initializes the DNS server.
    protected void
    Starts the server.

    Methods inherited from class org.apache.hadoop.service.CompositeService

    addIfService, addService, getServices, removeService, serviceStop

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • SHUTDOWN_HOOK_PRIORITY

      public static final int SHUTDOWN_HOOK_PRIORITY
      See Also:
  • Constructor Details

    • RegistryDNSServer

      public RegistryDNSServer(String name, RegistryDNS registryDNS)
      Creates the DNS server.
      Parameters:
      name - the server name.
      registryDNS - the registry DNS instance.
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Initializes the DNS server.
      Overrides:
      serviceInit in class org.apache.hadoop.service.CompositeService
      Parameters:
      conf - the hadoop configuration instance.
      Throws:
      Exception - if service initialization fails.
    • serviceStart

      protected void serviceStart() throws Exception
      Starts the server.
      Overrides:
      serviceStart in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception - if service start fails.
    • main

      public static void main(String[] args) throws IOException
      Lanches the server instance.
      Parameters:
      args - the command line args.
      Throws:
      IOException - if command line options can't be parsed