1
0

Incorporating code review feedback for finalizeWrite for COW

This commit is contained in:
Jian Xu
2017-12-06 14:35:44 -08:00
committed by vinoth chandar
parent c874248f23
commit 2fe4fef625
7 changed files with 106 additions and 70 deletions

View File

@@ -45,7 +45,7 @@ public class HoodieCreateHandle<T extends HoodieRecordPayload> extends HoodieIOH
private final WriteStatus status;
private final HoodieStorageWriter<IndexedRecord> storageWriter;
private final Path path;
private final Path tempPath;
private Path tempPath = null;
private long recordsWritten = 0;
private long recordsDeleted = 0;
@@ -58,10 +58,8 @@ public class HoodieCreateHandle<T extends HoodieRecordPayload> extends HoodieIOH
final int sparkPartitionId = TaskContext.getPartitionId();
this.path = makeNewPath(partitionPath, sparkPartitionId, status.getFileId());
if (config.shouldFinalizeWrite()) {
if (config.shouldUseTempFolderForCopyOnWrite()) {
this.tempPath = makeTempPath(partitionPath, sparkPartitionId, status.getFileId(), TaskContext.get().stageId(), TaskContext.get().taskAttemptId());
} else {
this.tempPath = null;
}
try {