This is an automated email from the ASF dual-hosted git repository.
jhung pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new f4f210d Addendum to YARN-9730. Support forcing configured partitions
to be exclusive based on app node label
f4f210d is described below
commit f4f210d2e57e49999579efb7db039cc623798267
Author: Jonathan Hung <[email protected]>
AuthorDate: Wed Sep 25 17:48:40 2019 -0700
Addendum to YARN-9730. Support forcing configured partitions to be
exclusive based on app node label
(cherry picked from commit d86a1acc866cbda845fb3896dc824baf12217383)
---
.../apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java
index cc48e8b..cb5cd01 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java
@@ -648,9 +648,13 @@ public class RMContextImpl implements RMContext {
}
public Set<String> getExclusiveEnforcedPartitions() {
- String[] configuredPartitions = getYarnConfiguration().getStrings(
- YarnConfiguration.EXCLUSIVE_ENFORCED_PARTITIONS);
Set<String> exclusiveEnforcedPartitions = new HashSet<>();
+ Configuration conf = getYarnConfiguration();
+ if (conf == null) {
+ return new HashSet<>();
+ }
+ String[] configuredPartitions = conf.getStrings(
+ YarnConfiguration.EXCLUSIVE_ENFORCED_PARTITIONS);
if (configuredPartitions != null) {
for (String partition : configuredPartitions) {
exclusiveEnforcedPartitions.add(partition);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]