Will-Lo commented on code in PR #3751:
URL: https://github.com/apache/gobblin/pull/3751#discussion_r1309161595
##########
gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/GobblinBaseOrcWriter.java:
##########
@@ -140,9 +190,17 @@ public State getFinalState() {
@Override
public void flush()
throws IOException {
- if (rowBatch.size > 0) {
- orcFileWriter.addRowBatch(rowBatch);
- rowBatch.reset();
+ try {
+ this.orcFileWriterLock.readLock().lock();
+ if (rowBatch.size > 0) {
+ if (this.orcFileWriter == null) {
Review Comment:
Moved all the writer initialization code to the tuneBatchSize() iff the
writer is previously null, and since the batchSize defaults to 1000 it should
never flush before tuning at least once.
--
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]