n3nash commented on a change in pull request #651: Spark Stage retry handling
URL: https://github.com/apache/incubator-hudi/pull/651#discussion_r278734757
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/io/HoodieMergeHandle.java
##########
@@ -107,30 +104,26 @@ private void init(String fileId, String partitionPath,
Optional<HoodieDataFile>
oldFilePath = new Path(
config.getBasePath() + "/" + partitionPath + "/" +
latestValidFilePath);
String relativePath = new Path((partitionPath.isEmpty() ? "" :
partitionPath + "/") + FSUtils
- .makeDataFileName(commitTime, TaskContext.getPartitionId(),
fileId)).toString();
+ .makeDataFileName(commitTime, writeToken, fileId)).toString();
newFilePath = new Path(config.getBasePath(), relativePath);
- if (config.shouldUseTempFolderForCopyOnWriteForMerge()) {
- this.tempPath = makeTempPath(partitionPath,
TaskContext.getPartitionId(), fileId,
- TaskContext.get().stageId(), TaskContext.get().taskAttemptId());
- }
-
- // handle cases of partial failures, for update task
- if (fs.exists(newFilePath)) {
- fs.delete(newFilePath, false);
- }
logger.info(String
.format("Merging new data into oldPath %s, as newPath %s",
oldFilePath.toString(),
- getStorageWriterPath().toString()));
+ newFilePath.toString()));
// file name is same for all records, in this bunch
writeStatus.setFileId(fileId);
writeStatus.setPartitionPath(partitionPath);
writeStatus.getStat().setPartitionPath(partitionPath);
writeStatus.getStat().setFileId(fileId);
- writeStatus.getStat().setPaths(new Path(config.getBasePath()),
newFilePath, tempPath);
+ writeStatus.getStat().setPath(new Path(config.getBasePath()),
newFilePath);
+
+
Review comment:
extra new line
----------------------------------------------------------------
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]
With regards,
Apache Git Services