Jackie-Jiang commented on code in PR #8812:
URL: https://github.com/apache/pinot/pull/8812#discussion_r887304419


##########
pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/src/main/java/org/apache/pinot/plugin/ingestion/batch/standalone/SegmentGenerationJobRunner.java:
##########
@@ -222,6 +229,15 @@ public void run()
         }
       }
       _segmentCreationTaskCountDownLatch.await();
+
+      if (!_failures.isEmpty()) {
+        StringBuilder msg = new StringBuilder("Failed to generate Pinot 
segment for file(s) - ");
+        _failures.forEach(p -> {
+          msg.append(msg.length() > 0 ? ", " : "");

Review Comment:
   This will always append `", "` because `msg.length()` will never be 0. If we 
change `_failures` to `Queue<String>`, we can use `StringUtils.join(_failures, 
", ")`



##########
pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/src/main/java/org/apache/pinot/plugin/ingestion/batch/standalone/SegmentGenerationJobRunner.java:
##########
@@ -70,6 +73,7 @@ public class SegmentGenerationJobRunner implements 
IngestionJobRunner {
   private CountDownLatch _segmentCreationTaskCountDownLatch;
   private Schema _schema;
   private TableConfig _tableConfig;
+  private Queue<Pair<Exception, String>> _failures;

Review Comment:
   The `Exception` is not used. Consider changing it to
   ```suggestion
     private Queue<String> _failureFilePaths;
   ```



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