afterincomparableyum commented on code in PR #3568:
URL: https://github.com/apache/celeborn/pull/3568#discussion_r2647139234


##########
cpp/celeborn/conf/CelebornConf.cpp:
##########
@@ -267,6 +271,41 @@ long CelebornConf::clientPushLimitInFlightSleepDeltaMs() 
const {
       optionalProperty(kClientPushLimitInFlightSleepDeltaMs).value());
 }
 
+int CelebornConf::clientPushBufferMaxSize() const {
+  return toCapacity(
+      optionalProperty(kClientPushBufferMaxSize).value(), CapacityUnit::BYTE);
+}
+
+bool CelebornConf::clientPushMaxBytesSizeInFlightEnabled() const {
+  return optionalProperty(kClientPushMaxBytesSizeInFlightEnabled).value() ==
+      "true";
+}
+
+long CelebornConf::clientPushMaxBytesSizeInFlightTotal() const {
+  auto optionalValue = optionalProperty(kClientPushMaxBytesSizeInFlightTotal);
+  long maxBytesSizeInFlight =

Review Comment:
   It's exactly how the java client function is: 
   
   ```
     def clientPushMaxBytesSizeInFlightTotal: Long = {
       val maxBytesSizeInFlight = 
get(CLIENT_PUSH_MAX_BYTES_SIZE_IN_FLIGHT_TOTAL).getOrElse(0L)
       if (clientPushMaxBytesSizeInFlightEnabled && maxBytesSizeInFlight > 0L) {
         maxBytesSizeInFlight
       } else {
         clientPushMaxReqsInFlightTotal * clientPushBufferMaxSize
       }
     }
   ```
   Any suggestions for how to simplify it @HolyLow ? 



-- 
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]

Reply via email to