From c17414111ba10b142bae85691a7913dcdae404c1 Mon Sep 17 00:00:00 2001 From: Szilard Nemeth Date: Thu, 4 Feb 2021 08:12:13 +0100 Subject: [PATCH] YARN-10612. Fix findbugs issue introduced in YARN-10585. Contributed by Gergely Pollak --- .../capacity/placement/converter/LegacyMappingRuleToJson.java | 4 ---- 1 file changed, 4 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/scheduler/capacity/placement/converter/LegacyMappingRuleToJson.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/converter/LegacyMappingRuleToJson.java index 113b08b393f..6aa404992af 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/converter/LegacyMappingRuleToJson.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/converter/LegacyMappingRuleToJson.java @@ -138,10 +138,6 @@ public class LegacyMappingRuleToJson { * @return JSON Format of the provided mapping rules, null if no rules are set */ public String convert() { - if (userGroupMappingRules == null && applicationNameMappingRules == null) { - return null; - } - //creating the basic JSON config structure ObjectNode rootNode = objectMapper.createObjectNode(); ArrayNode rulesNode = objectMapper.createArrayNode();