ZihanLi58 commented on a change in pull request #3248:
URL: https://github.com/apache/gobblin/pull/3248#discussion_r598015437



##########
File path: 
gobblin-core/src/main/java/org/apache/gobblin/writer/FsDataWriter.java
##########
@@ -256,19 +256,19 @@ public void commit()
 
     this.bytesWritten = Optional.of(Long.valueOf(stagingFileStatus.getLen()));
 
+    // Rename staging file to add record count before copying to output file
+    if (this.shouldIncludeRecordCountInFileName) {
+      String filePathWithRecordCount = addRecordCountToStagingFile();
+      this.stagingFile = new Path(filePathWithRecordCount);
+      this.outputFile = new Path(this.outputFile.getParent().toString(), new 
Path(filePathWithRecordCount).getName());
+    }
+    this.properties.appendToSetProp(this.allOutputFilesPropName, 
this.outputFile.toString());

Review comment:
       should we move this line after we moving the staging file into output 
dir?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to