Class ContainerServiceRecordProcessor
java.lang.Object
org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor
org.apache.hadoop.registry.server.dns.ContainerServiceRecordProcessor
- All Implemented Interfaces:
ServiceRecordProcessor
A processor for generating container DNS records from registry service
records.
-
Constructor Summary
ConstructorsConstructorDescriptionContainerServiceRecordProcessor(ServiceRecord record, String path, String domain, ZoneSelector zoneSelector) Create a container service record processor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateAAAAInfo(ServiceRecord record) Creates a container AAAA (IPv6) record descriptor.protected voidcreateAInfo(ServiceRecord record) Creates a container A (IPv4) record descriptor.protected voidcreatePTRInfo(ServiceRecord record) Creates a container PTR record descriptor.protected voidcreateTXTInfo(ServiceRecord serviceRecord) Create a container TXT record descriptor.int[]Returns the record types associated with a container service record.voidinitTypeToInfoMapping(ServiceRecord serviceRecord) Initializes the DNS record type to descriptor mapping based on the provided service record.Methods inherited from class org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor
getPath, manageDNSRecords, registerRecordDescriptor, registerRecordDescriptor, reverseIP, setPath
-
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 recordpath- the service record registry node pathdomain- the DNS zone/domain namezoneSelector- returns the zone associated with the provided name.- Throws:
Exception- if an issue is generated during instantiation.
-
-
Method Details
-
initTypeToInfoMapping
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
Create a container TXT record descriptor.- Parameters:
serviceRecord- the service record.- Throws:
Exception- if the descriptor creation yields an issue.
-
createPTRInfo
Creates a container PTR record descriptor.- Parameters:
record- the service record.- Throws:
Exception- if the descriptor creation yields an issue.
-
createAAAAInfo
Creates a container AAAA (IPv6) record descriptor.- Parameters:
record- the service record- Throws:
Exception- if the descriptor creation yields an issue.
-
createAInfo
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
-