qijiale76 commented on code in PR #1112:
URL:
https://github.com/apache/incubator-uniffle/pull/1112#discussion_r1285725128
##########
client-mr/core/src/main/java/org/apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java:
##########
@@ -172,21 +164,33 @@ public Thread newThread(Runnable r) {
RssMRUtils.applyDynamicClientConf(extraConf, clusterClientConf);
}
- String storageType = RssMRUtils.getString(extraConf, conf,
RssMRConfig.RSS_STORAGE_TYPE);
- boolean testMode =
- RssMRUtils.getBoolean(extraConf, conf,
RssMRConfig.RSS_TEST_MODE_ENABLE, false);
+ // Get the configured server assignment tags and it will also add
default shuffle version tag.
+ Set<String> assignmentTags = new HashSet<>();
+ String rawTags = conf.get(RssMRConfig.RSS_CLIENT_ASSIGNMENT_TAGS, "");
+ if (StringUtils.isNotEmpty(rawTags)) {
+ rawTags = rawTags.trim();
+ assignmentTags.addAll(Arrays.asList(rawTags.split(",")));
+ }
+ assignmentTags.add(Constants.SHUFFLE_SERVER_VERSION);
+ String clientType =
+ extraConf.get(RssMRConfig.RSS_CLIENT_TYPE,
RssMRConfig.RSS_CLIENT_TYPE_DEFAULT_VALUE);
+ ClientUtils.validateClientType(clientType);
+ assignmentTags.add(clientType);
+
+ String storageType = RssMRUtils.getString(extraConf,
RssMRConfig.RSS_STORAGE_TYPE);
+ boolean testMode = RssMRUtils.getBoolean(extraConf,
RssMRConfig.RSS_TEST_MODE_ENABLE, false);
Review Comment:
Move these code here and use `extraConf` instead of `conf` to fix this when
`mapreduce.rss.client.type` is not set at `mapred-site.xml`
```
Exception in thread "main" java.lang.IllegalArgumentException: The value of
null should be one of [GRPC_NETTY, GRPC]
at
org.apache.uniffle.client.util.ClientUtils.validateClientType(ClientUtils.java:144)
at
org.apache.hadoop.mapreduce.v2.app.RssMRAppMaster.main(RssMRAppMaster.java:142)
```
--
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]