Incorporating code review feedback for finalizeWrite for COW #2
This commit is contained in:
@@ -576,24 +576,6 @@ public class HoodieCopyOnWriteTable<T extends HoodieRecordPayload> extends Hoodi
|
||||
return stats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFinalizeWrite() {
|
||||
if (!config.shouldUseTempFolderForCopyOnWrite()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// create temporary folder if needed
|
||||
final FileSystem fs = FSUtils.getFs();
|
||||
final Path temporaryFolder = new Path(config.getBasePath(), HoodieTableMetaClient.TEMPFOLDER_NAME);
|
||||
try {
|
||||
if (!fs.exists(temporaryFolder)) {
|
||||
fs.mkdirs(temporaryFolder);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new HoodieIOException("Failed to create temporary folder: " + temporaryFolder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<Integer> finalizeWrite(JavaSparkContext jsc, List writeStatuses) {
|
||||
|
||||
@@ -250,11 +250,6 @@ public class HoodieMergeOnReadTable<T extends HoodieRecordPayload> extends
|
||||
return allRollbackStats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFinalizeWrite() {
|
||||
// do nothing for MOR tables
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Integer> finalizeWrite(JavaSparkContext jsc, List writeStatuses) {
|
||||
// do nothing for MOR tables
|
||||
|
||||
@@ -273,11 +273,6 @@ public abstract class HoodieTable<T extends HoodieRecordPayload> implements Seri
|
||||
public abstract List<HoodieRollbackStat> rollback(JavaSparkContext jsc, List<String> commits)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Initialize resources needed for finalize write.
|
||||
*/
|
||||
public abstract void initializeFinalizeWrite();
|
||||
|
||||
/**
|
||||
* Finalize the written data files
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user