1
0

1. Minor changes to fix compaction 2. Adding 2 compaction policies

This commit is contained in:
Nishith Agarwal
2019-04-03 12:25:35 -07:00
committed by vinoth chandar
parent d1d33f725e
commit 2577014617
7 changed files with 246 additions and 7 deletions

View File

@@ -136,7 +136,7 @@ public class HoodieCommitMetadata implements Serializable {
long totalFilesInsert = 0;
for (List<HoodieWriteStat> stats : partitionToWriteStats.values()) {
for (HoodieWriteStat stat : stats) {
if (stat.getPrevCommit() != null && stat.getPrevCommit().equals("null")) {
if (stat.getPrevCommit() != null && stat.getPrevCommit().equalsIgnoreCase("null")) {
totalFilesInsert++;
}
}
@@ -148,7 +148,7 @@ public class HoodieCommitMetadata implements Serializable {
long totalFilesUpdated = 0;
for (List<HoodieWriteStat> stats : partitionToWriteStats.values()) {
for (HoodieWriteStat stat : stats) {
if (stat.getPrevCommit() != null && !stat.getPrevCommit().equals("null")) {
if (stat.getPrevCommit() != null && !stat.getPrevCommit().equalsIgnoreCase("null")) {
totalFilesUpdated++;
}
}
@@ -170,8 +170,8 @@ public class HoodieCommitMetadata implements Serializable {
long totalInsertRecordsWritten = 0;
for (List<HoodieWriteStat> stats : partitionToWriteStats.values()) {
for (HoodieWriteStat stat : stats) {
if (stat.getPrevCommit() != null && stat.getPrevCommit().equals("null")) {
totalInsertRecordsWritten += stat.getNumWrites();
if (stat.getPrevCommit() != null && stat.getPrevCommit().equalsIgnoreCase("null")) {
totalInsertRecordsWritten += stat.getNumInserts();
}
}
}