[ISSUE-925][FOLLOWUP] Refactor class name of RetryingChunkReceiveCallback (#954)

This commit is contained in:
Angerszhuuuu 2022-11-11 14:00:47 +08:00 committed by GitHub
parent 0b8376e2c7
commit 64e8ebf158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,8 +106,8 @@ public class ChunkClient {
}
/**
* This method should only be called once after RetryingChunkReader is initialized, so it is
* assumed that there is no concurrency problem when it is called.
* This method should only be called once after PartitionReader is initialized, so it is assumed
* that there is no concurrency problem when it is called.
*
* @return numChunks.
*/
@ -169,9 +169,9 @@ public class ChunkClient {
* @param chunkIndex the index of the chunk to be fetched.
*/
public void fetchChunk(int chunkIndex) {
RetryingChunkReceiveCallback callback;
FetchChunkCallback callback;
synchronized (this) {
callback = new RetryingChunkReceiveCallback(numTries);
callback = new FetchChunkCallback(numTries);
if (fetchFailedChunkIndex != 0
&& location.getPeer() != null
&& chunkIndex == fetchFailedChunkIndex
@ -238,10 +238,10 @@ public class ChunkClient {
});
}
private class RetryingChunkReceiveCallback implements ChunkReceivedCallback {
private class FetchChunkCallback implements ChunkReceivedCallback {
final int currentNumTries;
RetryingChunkReceiveCallback(int currentNumTries) {
FetchChunkCallback(int currentNumTries) {
this.currentNumTries = currentNumTries;
}