[
https://issues.apache.org/jira/browse/YARN-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398796#comment-15398796
]
Varun Vasudev commented on YARN-5404:
-------------------------------------
Thanks for the patch [[email protected]]. Some more fixes required -
1)
{code}
+ if(parsedRange<0) {
+ LOG.error("Range cannot be negative: Supplied range: ", parsedRange);
+ }
{code}
We should throw an exception here.
2)
{code}
+ return ipCount / parsedRange;
{code}
The range check for parsedRange allows parsedRange to be 0 which would lead to
this division being infinity.
3)
{code}
+ results[i] <<= 8;
+ results[i] |= octets[i] & 0xff;
{code}
No need for this. You can just do {code} results[i] = octets[i] {code}
4)
Rename ReverseZoneUtilsTest to TestReverseZoneUtils
5)
The formatting for the patch seems off. The 'if' statements for example don't
seem correct.
> Add the ability to split reverse zone subnets
> ---------------------------------------------
>
> Key: YARN-5404
> URL: https://issues.apache.org/jira/browse/YARN-5404
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Shane Kumpf
> Assignee: Shane Kumpf
> Attachments: YARN-5404-YARN-4757.001.patch,
> YARN-5404-YARN-4757.001.patch, YARN-5404-YARN-4757.001.patch,
> YARN-5404-YARN-4757.002.patch, YARN-5404.001.patch
>
>
> In some environments, the entire container subnet may not be used exclusively
> by containers (ie the YARN nodemanager host IPs may also be part of the
> larger subnet).
> As a result, the reverse lookup zones created by the YARN Registry DNS server
> may not match those created on the forwarders.
> For example:
> Network: 172.27.0.0
> Subnet: 255.255.248.0
> Hosts:
> 0.27.172.in-addr.arpa
> 1.27.172.in-addr.arpa
> 2.27.172.in-addr.arpa
> 3.27.172.in-addr.arpa
> Containers
> 4.27.172.in-addr.arpa
> 5.27.172.in-addr.arpa
> 6.27.172.in-addr.arpa
> 7.27.172.in-addr.arpa
> YARN Registry DNS only allows for creating (as the total IP count is greater
> than 256):
> 27.172.in-addr.arpa
> Provide configuration to further subdivide the subnets.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]