rickyma commented on code in PR #1663:
URL:
https://github.com/apache/incubator-uniffle/pull/1663#discussion_r1571873277
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleReadClientImpl.java:
##########
@@ -102,12 +102,13 @@ public
ShuffleReadClientImpl(ShuffleClientFactory.ReadClientBuilder builder) {
readBufferSize = Integer.MAX_VALUE;
}
boolean offHeapEnabled =
builder.getRssConf().get(RssClientConf.OFF_HEAP_MEMORY_ENABLE);
-
builder.indexReadLimit(indexReadLimit);
builder.storageType(storageType);
builder.readBufferSize(readBufferSize);
builder.offHeapEnable(offHeapEnabled);
-
builder.clientType(builder.getRssConf().get(RssClientConf.RSS_CLIENT_TYPE));
+ if (builder.getClientType() == null) {
+
builder.clientType(builder.getRssConf().get(RssClientConf.RSS_CLIENT_TYPE));
Review Comment:
This is an issue of historical oversight in the code; it's not written in a
standard way. Normally speaking, if there are fields in the builder, which are
not null, we should take from the builder first. If the builder doesn't have
them, then we should take from RssConf. In the current production code, even if
the builder has the field(which is not null), we still basically take it from
RssConf, which can cause the test code to fail when setting parameters through
the builder. Of course, it's not impossible to remove those fields from the
builder and set them all through RssConf, it's just harder to maintain. I
think, since we already have those fields in the builder, we should support
setting them through the builder, otherwise it's better to remove them
altogether.
--
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]