arjun4084346 commented on a change in pull request #3336:
URL: https://github.com/apache/gobblin/pull/3336#discussion_r677890923



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java
##########
@@ -644,6 +663,16 @@ public void apply(JobListener jobListener, JobContext 
jobContext)
     }
   }
 
+  @VisibleForTesting
+  public static long sumWorkUnitsSizes (Collection<WorkUnit> workUnits) {
+    long totalSizeInBytes = 0;
+    for (WorkUnit workUnit : workUnits) {

Review comment:
       This is okay too. can be written concisely with lamba expressions too
   `long totalSizeInBytes = workUnits.stream().mapToLong(wu -> 
wu.getPropAsLong(ServiceConfigKeys.WORK_UNIT_BYTE_SIZE)).sum();`




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