[ 
https://issues.apache.org/jira/browse/YARN-1325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841894#comment-13841894
 ] 

Karthik Kambatla commented on YARN-1325:
----------------------------------------

Comments:
# "< 2" might be easier to understand. The error message can also make that 
explicit - HA mode requires atleast two RMs. 
{code}
+    if (ids.size() <= 1) {
{code}
# {{verifyAndSetAllRpcAddresses}} already sets the rpc-addresses. Not sure if 
we need a new method.
{code}
     for (String id: ids) {
+      verifyAndSetRpcAddressesForRMHAId(id.trim(), conf);
       setValue.append(id);
{code}
# The http secure vs not-secure check can be in {{verifyAndSetAllRpcAddresses}}
# Instead of if - else if - else could use a single if.
{code}
+      if (prefix.equals(YarnConfiguration.RM_WEBAPP_ADDRESS)
+          && HttpConfig.isSecure()) {
+        continue;
+      } else if (prefix
+          .equals(YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS)
+          && !HttpConfig.isSecure()) {
+        continue;
+      } else {
{code}
# Instead of copying the string to the test, should probably use a final 
variable in HAUtil.

> Enabling HA should check Configuration contains multiple RMs
> ------------------------------------------------------------
>
>                 Key: YARN-1325
>                 URL: https://issues.apache.org/jira/browse/YARN-1325
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Tsuyoshi OZAWA
>            Assignee: Xuan Gong
>              Labels: ha
>         Attachments: YARN-1325.1.patch
>
>
> Currently, we can enable RM HA configuration without multiple RM 
> ids(YarnConfiguration.RM_HA_IDS).  This behaviour can cause wrong operations. 
> ResourceManager should verify that more than 1 RM id must be specified in 
> RM-HA-IDs.
> One idea is to support "strict mode" to enforce this check as 
> configuration(e.g. yarn.resourcemanager.ha.strict-mode.enabled).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to