MINOR: Replace Long with primitive long for CoordinatorPlayback (#20171)

Reviewers: Ken Huang <s7133700@gmail.com>, Jhen-Yung Hsu
 <jhenyunghsu@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Chia-Ping
 Tsai <chia7712@gmail.com>
This commit is contained in:
Chang-Chi Hsu 2025-07-18 01:34:00 +08:00 committed by GitHub
parent 5ac0266879
commit 4a2d4ee76a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -62,12 +62,12 @@ public interface CoordinatorPlayback<U> {
* *
* @param offset the offset of the last record in the batch plus one. * @param offset the offset of the last record in the batch plus one.
*/ */
void updateLastWrittenOffset(Long offset); void updateLastWrittenOffset(long offset);
/** /**
* Called when the high watermark advances. * Called when the high watermark advances.
* *
* @param offset The offset of the new high watermark. * @param offset The offset of the new high watermark.
*/ */
void updateLastCommittedOffset(Long offset); void updateLastCommittedOffset(long offset);
} }

View File

@ -138,7 +138,7 @@ public class SnapshottableCoordinator<S extends CoordinatorShard<U>, U> implemen
* @param offset The new last written offset. * @param offset The new last written offset.
*/ */
@Override @Override
public synchronized void updateLastWrittenOffset(Long offset) { public synchronized void updateLastWrittenOffset(long offset) {
if (offset <= lastWrittenOffset) { if (offset <= lastWrittenOffset) {
throw new IllegalStateException("New last written offset " + offset + " of " + tp + throw new IllegalStateException("New last written offset " + offset + " of " + tp +
" must be greater than " + lastWrittenOffset + "."); " must be greater than " + lastWrittenOffset + ".");
@ -157,7 +157,7 @@ public class SnapshottableCoordinator<S extends CoordinatorShard<U>, U> implemen
* @param offset The new last committed offset. * @param offset The new last committed offset.
*/ */
@Override @Override
public synchronized void updateLastCommittedOffset(Long offset) { public synchronized void updateLastCommittedOffset(long offset) {
if (offset < lastCommittedOffset) { if (offset < lastCommittedOffset) {
throw new IllegalStateException("New committed offset " + offset + " of " + tp + throw new IllegalStateException("New committed offset " + offset + " of " + tp +
" must be greater than or equal to " + lastCommittedOffset + "."); " must be greater than or equal to " + lastCommittedOffset + ".");