public abstract class BaseServiceRecordProcessor extends Object implements ServiceRecordProcessor
Constructor and Description |
---|
BaseServiceRecordProcessor(ServiceRecord record,
String path,
String domain,
ZoneSelector zoneSelector)
Creates a service record processor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getPath()
Return the path associated with the record.
|
void |
manageDNSRecords(org.apache.hadoop.registry.server.dns.RegistryDNS.RegistryCommand command)
Manages the creation and registration of service record generated DNS
records.
|
protected void |
registerRecordDescriptor(int type,
org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor.RecordDescriptor recordDescriptor)
Add the DNS record descriptor object to the record type to descriptor
mapping.
|
protected void |
registerRecordDescriptor(int type,
List<org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor.RecordDescriptor> recordDescriptors)
Add the DNS record descriptor objects to the record type to descriptor
mapping.
|
protected org.xbill.DNS.Name |
reverseIP(String ip)
Reverse the string representation of the input IP address.
|
protected void |
setPath(String path)
Set the path associated with the record.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRecordTypes, initTypeToInfoMapping
public BaseServiceRecordProcessor(ServiceRecord record, String path, String domain, ZoneSelector zoneSelector) throws Exception
record
- the service record.path
- the node path for the record in the registry.domain
- the target DNS domain for the service record
associated DNS records.zoneSelector
- A selector of the best zone for a given DNS name.Exception
- if an issue is generated during instantiation.protected org.xbill.DNS.Name reverseIP(String ip) throws UnknownHostException
ip
- the string representation of the IP address.UnknownHostException
- if the ip is unknown.public void manageDNSRecords(org.apache.hadoop.registry.server.dns.RegistryDNS.RegistryCommand command) throws IOException
manageDNSRecords
in interface ServiceRecordProcessor
command
- the DNS registration command object (e.g. add_record,
remove record)IOException
- if the creation or registration generates an issue.protected void registerRecordDescriptor(int type, org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor.RecordDescriptor recordDescriptor)
type
- the DNS record type.recordDescriptor
- the DNS record descriptorprotected void registerRecordDescriptor(int type, List<org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor.RecordDescriptor> recordDescriptors)
type
- the DNS record type.recordDescriptors
- the DNS record descriptorsprotected String getPath()
protected void setPath(String path)
path
- the path.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.