You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by zh...@apache.org on 2021/05/19 13:25:27 UTC
[hadoop] branch branch-3.3 updated: YARN-10701. The
yarn.resource-types should support multi types without trimmed. Contributed
by Qi Zhu.
This is an automated email from the ASF dual-hosted git repository.
zhuqi pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 7d2eeae YARN-10701. The yarn.resource-types should support multi types without trimmed. Contributed by Qi Zhu.
7d2eeae is described below
commit 7d2eeaecc806c69e1cb096f96daae9d05371f4af
Author: zhuqi-lucas <82...@qq.com>
AuthorDate: Wed May 19 21:24:26 2021 +0800
YARN-10701. The yarn.resource-types should support multi types without trimmed. Contributed by Qi Zhu.
---
.../main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java | 3 ++-
.../src/test/resources/resource-types-test.xml | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
index fea9eef..3654965 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java
@@ -251,7 +251,8 @@ public class ResourceUtils {
private static Map<String, ResourceInformation> getResourceInformationMapFromConfig(
Configuration conf) {
Map<String, ResourceInformation> resourceInformationMap = new HashMap<>();
- String[] resourceNames = conf.getStrings(YarnConfiguration.RESOURCE_TYPES);
+ String[] resourceNames =
+ conf.getTrimmedStrings(YarnConfiguration.RESOURCE_TYPES);
if (resourceNames != null && resourceNames.length != 0) {
for (String resourceName : resourceNames) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/resource-types-test.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/resource-types-test.xml
index 98e4961..e3be52e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/resource-types-test.xml
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/resource-types-test.xml
@@ -17,6 +17,6 @@
<configuration>
<property>
<name>yarn.resource-types</name>
- <value>yarn.io/gpu,yarn.io/fpga,testType</value>
+ <value>yarn.io/gpu, yarn.io/fpga, testType</value>
</property>
-</configuration>
\ No newline at end of file
+</configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org