Class ReverseZoneUtils
java.lang.Object
org.apache.hadoop.registry.server.dns.ReverseZoneUtils
Utilities for configuring reverse zones.
-
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetReverseZoneNetworkAddress(String baseIp, int range, int index) Given a baseIp, range and index, return the network address for the reverse zone.protected static longgetSubnetCountForReverseZones(org.apache.hadoop.conf.Configuration conf) When splitting the reverse zone, return the number of subnets needed, given the range and netmask.protected static long[]
-
Method Details
-
getReverseZoneNetworkAddress
protected static String getReverseZoneNetworkAddress(String baseIp, int range, int index) throws UnknownHostException Given a baseIp, range and index, return the network address for the reverse zone.- Parameters:
baseIp- base ip address to perform calculations against.range- number of ip addresses per subnet.index- the index of the subnet to calculate.- Returns:
- the calculated ip address.
- Throws:
UnknownHostException- if an invalid ip is provided.
-
getSubnetCountForReverseZones
protected static long getSubnetCountForReverseZones(org.apache.hadoop.conf.Configuration conf) When splitting the reverse zone, return the number of subnets needed, given the range and netmask.- Parameters:
conf- the Hadoop configuration.- Returns:
- The number of subnets given the range and netmask.
-
splitIp
- Throws:
UnknownHostException
-