[ 
https://issues.apache.org/jira/browse/YARN-12067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shilun Fan resolved YARN-12067.
-------------------------------
    Fix Version/s: 3.4.4
                   3.5.1
                   3.6.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> Fix MockRM shutdown in TestableFederationClientInterceptor
> ----------------------------------------------------------
>
>                 Key: YARN-12067
>                 URL: https://issues.apache.org/jira/browse/YARN-12067
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: router
>            Reporter: Yuan Luo
>            Assignee: Yuan Luo
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.4.4, 3.5.1, 3.6.0
>
>
> h2. Problem
> * {{TestableFederationClientInterceptor.registerBadSubCluster()}} uses 
> {{ConcurrentHashMap.contains()}} to check a {{SubClusterId}}, but this method 
> checks values rather than keys.
> * Consequently, an existing cached {{MockRM}} is not closed when its 
> subcluster is marked as bad.
> h2. Solution
> * Replace {{contains()}} with {{containsKey()}} so that the cached {{MockRM}} 
> is closed.
> * Limit the change to the test helper; production code is unchanged.
> h2. Validation
> * Ran {{TestFederationClientInterceptorRetry}} locally with JDK 17.0.8 on 
> macOS: 24 tests, 0 failures, 0 errors, 1 skipped.
> * Verified the fresh Surefire XML report with 
> {{maven.test.failure.ignore=false}}.
> * {{git diff --check}} passed.
> h2. Related PR
> * [PR #9017|https://github.com/apache/hadoop/pull/9017]



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to