Timeline Service with Incremental View Syncing support
This commit is contained in:
committed by
vinoth chandar
parent
446f99aa0f
commit
64fec64097
@@ -232,7 +232,9 @@ public class CommitsCommand implements CommandMarker {
|
||||
for (HoodieWriteStat stat : stats) {
|
||||
rows.add(new Comparable[]{path, stat.getFileId(), stat.getPrevCommit(), stat.getNumUpdateWrites(),
|
||||
stat.getNumWrites(), stat.getTotalWriteBytes(),
|
||||
stat.getTotalWriteErrors()});
|
||||
stat.getTotalWriteErrors(),
|
||||
stat.getFileSizeInBytes()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +245,8 @@ public class CommitsCommand implements CommandMarker {
|
||||
.addTableHeaderField("Total Records Updated")
|
||||
.addTableHeaderField("Total Records Written")
|
||||
.addTableHeaderField("Total Bytes Written")
|
||||
.addTableHeaderField("Total Errors");
|
||||
.addTableHeaderField("Total Errors")
|
||||
.addTableHeaderField("File Size");
|
||||
|
||||
return HoodiePrintHelper.print(header, new HashMap<>(), sortByField, descending, limit, headerOnly, rows);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class CompactionCommand implements CommandMarker {
|
||||
op.getBaseInstantTime(),
|
||||
op.getDataFilePath(),
|
||||
op.getDeltaFilePaths().size(),
|
||||
op.getMetrics().toString()
|
||||
op.getMetrics() == null ? "" : op.getMetrics().toString()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,10 +84,8 @@ public class FileSystemViewCommand implements CommandMarker {
|
||||
row[idx++] = fs.getDataFile().isPresent() ? fs.getDataFile().get().getFileSize() : -1;
|
||||
if (!readOptimizedOnly) {
|
||||
row[idx++] = fs.getLogFiles().count();
|
||||
row[idx++] = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
.mapToLong(lf -> lf.getFileSize().get()).sum();
|
||||
row[idx++] = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
.collect(Collectors.toList()).toString();
|
||||
row[idx++] = fs.getLogFiles().mapToLong(lf -> lf.getFileSize()).sum();
|
||||
row[idx++] = fs.getLogFiles().collect(Collectors.toList()).toString();
|
||||
}
|
||||
rows.add(row);
|
||||
}));
|
||||
@@ -162,16 +160,15 @@ public class FileSystemViewCommand implements CommandMarker {
|
||||
|
||||
if (!readOptimizedOnly) {
|
||||
row[idx++] = fs.getLogFiles().count();
|
||||
row[idx++] = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
.mapToLong(lf -> lf.getFileSize().get()).sum();
|
||||
long logFilesScheduledForCompactionTotalSize = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
row[idx++] = fs.getLogFiles().mapToLong(lf -> lf.getFileSize()).sum();
|
||||
long logFilesScheduledForCompactionTotalSize = fs.getLogFiles()
|
||||
.filter(lf -> lf.getBaseCommitTime().equals(fs.getBaseInstantTime()))
|
||||
.mapToLong(lf -> lf.getFileSize().get()).sum();
|
||||
.mapToLong(lf -> lf.getFileSize()).sum();
|
||||
row[idx++] = logFilesScheduledForCompactionTotalSize;
|
||||
|
||||
long logFilesUnscheduledTotalSize = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
long logFilesUnscheduledTotalSize = fs.getLogFiles()
|
||||
.filter(lf -> !lf.getBaseCommitTime().equals(fs.getBaseInstantTime()))
|
||||
.mapToLong(lf -> lf.getFileSize().get()).sum();
|
||||
.mapToLong(lf -> lf.getFileSize()).sum();
|
||||
row[idx++] = logFilesUnscheduledTotalSize;
|
||||
|
||||
double logSelectedForCompactionToBaseRatio =
|
||||
@@ -181,10 +178,10 @@ public class FileSystemViewCommand implements CommandMarker {
|
||||
dataFileSize > 0 ? logFilesUnscheduledTotalSize / (dataFileSize * 1.0) : -1;
|
||||
row[idx++] = logUnscheduledToBaseRatio;
|
||||
|
||||
row[idx++] = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
row[idx++] = fs.getLogFiles()
|
||||
.filter(lf -> lf.getBaseCommitTime().equals(fs.getBaseInstantTime()))
|
||||
.collect(Collectors.toList()).toString();
|
||||
row[idx++] = fs.getLogFiles().filter(lf -> lf.getFileSize().isPresent())
|
||||
row[idx++] = fs.getLogFiles()
|
||||
.filter(lf -> !lf.getBaseCommitTime().equals(fs.getBaseInstantTime()))
|
||||
.collect(Collectors.toList()).toString();
|
||||
}
|
||||
|
||||
@@ -78,17 +78,17 @@ public class SparkMain {
|
||||
break;
|
||||
case COMPACT_SCHEDULE:
|
||||
assert (args.length == 5);
|
||||
returnCode = compact(jsc, args[1], args[2], args[3], 1,
|
||||
returnCode = compact(jsc, args[1], args[2], args[3], 1,
|
||||
"", args[4], 0, true);
|
||||
break;
|
||||
case COMPACT_VALIDATE:
|
||||
assert (args.length == 7);
|
||||
doCompactValidate(jsc, args[1], args[2], args[3], Integer.parseInt(args[4]), args[5], args[6]);
|
||||
doCompactValidate(jsc, args[1], args[2], args[3], Integer.parseInt(args[4]), args[5], args[6]);
|
||||
returnCode = 0;
|
||||
break;
|
||||
case COMPACT_REPAIR:
|
||||
assert (args.length == 8);
|
||||
doCompactRepair(jsc, args[1], args[2], args[3], Integer.parseInt(args[4]), args[5], args[6],
|
||||
doCompactRepair(jsc, args[1], args[2], args[3], Integer.parseInt(args[4]), args[5], args[6],
|
||||
Boolean.valueOf(args[7]));
|
||||
returnCode = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user