Skip to content

Commit

Permalink
add method recordUpdatedPositions to the OperatorContext class
Browse files Browse the repository at this point in the history
  • Loading branch information
bhzaeri committed Jan 21, 2025
1 parent b45d6dc commit 0f6ec97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ public void recordDynamicFilterSplitProcessed(long dynamicFilterSplits)
dynamicFilterSplitsProcessed.getAndAdd(dynamicFilterSplits);
}

public void recordUpdatedPositions(long updatedPositions)
{
checkArgument(updatedPositions >= 0, "updatedPositions is negative (%s)", updatedPositions);
this.updatedPositions.update(updatedPositions);
}

/**
* Overwrites the metrics with the latest one.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public Page getOutput()

OptionalLong rowsUpdatedCount = operation.execute();

operatorContext.getUpdatedPositions().update(rowsUpdatedCount.orElse(0L));
operatorContext.recordUpdatedPositions(rowsUpdatedCount.orElse(0L));

return buildUpdatedCountPage(rowsUpdatedCount);
}
Expand Down

0 comments on commit 0f6ec97

Please sign in to comment.