This is an automated email from the ASF dual-hosted git repository.
jhung pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 606e341 Addendum to YARN-9730. Support forcing configured partitions
to be exclusive based on app node label
606e341 is described below
commit 606e341c1a33393e6935d31ab05eae87742c865b
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
---
.../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 6231425..a10f448 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
@@ -683,9 +683,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]