You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/03/19 23:06:31 UTC

[GitHub] [gobblin] ZihanLi58 commented on a change in pull request #3248: [GOBBLIN-571] Rename staging file name with record count before movin…

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:
users@infra.apache.org