[
https://issues.apache.org/jira/browse/YARN-11391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17646401#comment-17646401
]
ASF GitHub Bot commented on YARN-11391:
---------------------------------------
lnbest0707 opened a new pull request, #5213:
URL: https://github.com/apache/hadoop/pull/5213
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
The patch reuses the resolver introduced from the HDFS side and apply
similar logic to YARN RM service addresses resolving.
To utilize the YARN DNS support and use DNS as endpoint, simply upgrade the
hadoop binary and revise configs from, for example:
```
<property>
<name>yarn.resourcemanager.address.rm1</name>
<value>rm1_address:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm1</name>
<value>rm1_address:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm1</name>
<value>rm1_address:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address.rm1</name>
<value>rm1_address:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm1</name>
<value>rm1_address:8088</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.https.address.rm1</name>
<value>rm1_address:8090</value>
</property>
<property>
<name>yarn.resourcemanager.address.rm2</name>
<value>rm2_address:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm2</name>
<value>rm2_address:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm2</name>
<value>rm2_address:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address.rm2</name>
<value>rm2_address:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm2</name>
<value>rm2_address:8088</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.https.address.rm2</name>
<value>rm2_address:8090</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1,rm2</value>
</property>
```
to:
```
<property>
<name>yarn.resourcemanager.address.rm1</name>
<value>rm_multi_a_dns:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm1</name>
<value>rm_multi_a_dns:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm1</name>
<value>rm_multi_a_dns:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address.rm1</name>
<value>rm_multi_a_dns:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm1</name>
<value>rm_multi_a_dns:8088</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.https.address.rm1</name>
<value>rm_multi_a_dns:8090</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1</value>
</property>
<property>
<name>yarn.resourcemanager.ha.resolve-needed</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.ha.resolver.useFQDN</name>
<value>true</value> # required in secure mode
</property>
<property>
<name>yarn.resourcemanager.ha.refresh-period-ms</name>
<value>180000</value> # 3 min
</property>
```
where rm_multi_a_dns is a multi-A DNS record for rm1_address and
rm2_address. This means the following output on the terminal.
```
$ dig +short <rm_multi_a_dns> | xargs -n +1 dig +short -x | sort
<rm1_address>
<rm2_address>
```
For the newly introduced flags, please refer to yarn-default.xml.
### How was this patch tested?
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> Support using DNS to resolve yarn services to IP addresses
> ----------------------------------------------------------
>
> Key: YARN-11391
> URL: https://issues.apache.org/jira/browse/YARN-11391
> Project: Hadoop YARN
> Issue Type: New Feature
> Reporter: Shuyi Zhang
> Priority: Major
> Labels: pull-request-available
>
> We have been using A-record (hostname) for discovering YARN control
> planes(RM, JHS) from both the server and client sides. The components
> discover each other using hostnames (DNS A-records) which are preconfigured
> in YARN configurations (mapred-site.xml and yarn-site.xml). However, the
> hard-coded address mapping is prohibitive to perform appropriate failure
> recovery and node replacement. Any host replacement, adding, or removing
> requires client integration, which is a quite painful process.
> It is essential to find a solution where the discovery configuration of
> different components in the cluster stays intact and is able to resolve with
> the latest hostname/records.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]