mirror of https://github.com/apache/kafka.git
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:
parent
5ac0266879
commit
4a2d4ee76a
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 + ".");
|
||||||
|
|
Loading…
Reference in New Issue