lifeSo commented on code in PR #1413:
URL: 
https://github.com/apache/incubator-uniffle/pull/1413#discussion_r1446297022


##########
client-tez/src/main/java/org/apache/tez/common/RssTezUtils.java:
##########
@@ -477,6 +443,31 @@ public static String replaceRssInputClassName(String 
className) {
     }
   }
 
+  public static void applyDynamicClientConf(TezClientConf conf, Map<String, 
String> confItems) {
+    if (conf == null) {
+      LOG.warn("Tez conf is null");
+      return;
+    }
+
+    if (confItems == null || confItems.isEmpty()) {
+      LOG.warn("Empty conf items");
+      return;
+    }
+
+    for (Map.Entry<String, String> kv : confItems.entrySet()) {
+      String tezConfKey = kv.getKey();
+      if (!tezConfKey.startsWith(TezClientConf.TEZ_RSS_CONFIG_PREFIX)) {
+        tezConfKey = TezClientConf.TEZ_RSS_CONFIG_PREFIX + tezConfKey;
+      }
+      String tezConfVal = kv.getValue();
+      if (StringUtils.isEmpty(conf.getString(tezConfKey, ""))
+          || TezClientConf.RSS_MANDATORY_CLUSTER_CONF.contains(tezConfKey)) {
+        LOG.warn("Use conf dynamic conf {} = {}", tezConfKey, tezConfVal);
+        conf.setString(tezConfKey, tezConfVal);
+      }
+    }
+  }
+
   public static void applyDynamicClientConf(Configuration conf, Map<String, 
String> confItems) {

Review Comment:
   I think is needed, just to applyDynamicClientConf, and it call eg:
   
   `
   RssTezUtils.applyDynamicClientConf(conf, appMaster.getClusterClientConf());
   `
   
   The second arguement may be  TezClientConf or Configuration.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to