Class ContainerServiceRecordProcessor

java.lang.Object
org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor
org.apache.hadoop.registry.server.dns.ContainerServiceRecordProcessor
All Implemented Interfaces:
ServiceRecordProcessor

public class ContainerServiceRecordProcessor extends BaseServiceRecordProcessor
A processor for generating container DNS records from registry service records.
  • Constructor Details

    • ContainerServiceRecordProcessor

      public ContainerServiceRecordProcessor(ServiceRecord record, String path, String domain, ZoneSelector zoneSelector) throws Exception
      Create a container service record processor.
      Parameters:
      record - the service record
      path - the service record registry node path
      domain - the DNS zone/domain name
      zoneSelector - returns the zone associated with the provided name.
      Throws:
      Exception - if an issue is generated during instantiation.
  • Method Details

    • initTypeToInfoMapping

      public void initTypeToInfoMapping(ServiceRecord serviceRecord) throws Exception
      Initializes the DNS record type to descriptor mapping based on the provided service record.
      Parameters:
      serviceRecord - the registry service record.
      Throws:
      Exception - if an issue arises.
    • createTXTInfo

      protected void createTXTInfo(ServiceRecord serviceRecord) throws Exception
      Create a container TXT record descriptor.
      Parameters:
      serviceRecord - the service record.
      Throws:
      Exception - if the descriptor creation yields an issue.
    • createPTRInfo

      protected void createPTRInfo(ServiceRecord record) throws Exception
      Creates a container PTR record descriptor.
      Parameters:
      record - the service record.
      Throws:
      Exception - if the descriptor creation yields an issue.
    • createAAAAInfo

      protected void createAAAAInfo(ServiceRecord record) throws Exception
      Creates a container AAAA (IPv6) record descriptor.
      Parameters:
      record - the service record
      Throws:
      Exception - if the descriptor creation yields an issue.
    • createAInfo

      protected void createAInfo(ServiceRecord record) throws Exception
      Creates a container A (IPv4) record descriptor.
      Parameters:
      record - service record.
      Throws:
      Exception - if the descriptor creation yields an issue.
    • getRecordTypes

      public int[] getRecordTypes()
      Returns the record types associated with a container service record.
      Returns:
      the record type array