Skip to content

Commit

Permalink
Address comment to make getMetadataSize abstract in the base class
Browse files Browse the repository at this point in the history
  • Loading branch information
liuml07 committed Dec 5, 2024
1 parent 9cdbb12 commit cbc8c74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ public abstract class AbstractCheckpointStats implements Serializable {
*/
public abstract long getCheckpointedSize();

/** @return The metadata file size, 0 if unknown. */
public long getMetadataSize() {
return 0;
}
/** @return The metadata file size. */
public abstract long getMetadataSize();

/** @return the total number of processed bytes during the checkpoint. */
public abstract long getProcessedData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ public long getStateSize() {
return currentStateSize;
}

@Override
public long getMetadataSize() {
return 0;
}

@Override
public long getCheckpointedSize() {
return currentCheckpointedSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public void addSpan(SpanBuilder spanBuilder) {
pending.reportSubtaskStats(jobVertexID, createSubtaskStats(0, true));

// Complete checkpoint => new snapshot
tracker.reportCompletedCheckpoint(pending.toCompletedCheckpointStats(null));
tracker.reportCompletedCheckpoint(pending.toCompletedCheckpointStats(null, 1984));

assertThat(reportedSpans.size()).isEqualTo(1);
reportedSpan = Iterables.getOnlyElement(reportedSpans);
Expand Down

0 comments on commit cbc8c74

Please sign in to comment.