HDFS-16866. Fix a typo in Dispatcher (#5202)

Signed-off-by: Tao Li <tomscut@apache.org>
This commit is contained in:
Happy-shi 2022-12-16 11:07:41 +08:00 committed by GitHub
parent cf1244492d
commit c5b42d59d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -708,12 +708,12 @@ public String toString() {
Result newResult(ExitStatus exitStatus, long bytesLeftToMove, long bytesBeingMoved) {
return new Result(exitStatus, bytesLeftToMove, bytesBeingMoved,
dispatcher.getBytesMoved(), dispatcher.getBblocksMoved());
dispatcher.getBytesMoved(), dispatcher.getBlocksMoved());
}
Result newResult(ExitStatus exitStatus) {
return new Result(exitStatus, -1, -1, dispatcher.getBytesMoved(),
dispatcher.getBblocksMoved());
dispatcher.getBlocksMoved());
}
/** Run an iteration for all datanodes. */

View File

@ -164,7 +164,7 @@ synchronized int allocate(int n) {
}
}
/** Aloocate a single lot of items */
/** Allocate a single lot of items. */
int allocate() {
return allocate(lotSize);
}
@ -1127,7 +1127,7 @@ long getBytesMoved() {
return nnc.getBytesMoved().get();
}
long getBblocksMoved() {
long getBlocksMoved() {
return nnc.getBlocksMoved().get();
}
@ -1234,7 +1234,7 @@ public boolean dispatchAndCheckContinue() throws InterruptedException {
*/
private long dispatchBlockMoves() throws InterruptedException {
final long bytesLastMoved = getBytesMoved();
final long blocksLastMoved = getBblocksMoved();
final long blocksLastMoved = getBlocksMoved();
final Future<?>[] futures = new Future<?>[sources.size()];
int concurrentThreads = Math.min(sources.size(),
@ -1284,7 +1284,7 @@ public void run() {
waitForMoveCompletion(targets);
LOG.info("Total bytes (blocks) moved in this iteration {} ({})",
StringUtils.byteDesc(getBytesMoved() - bytesLastMoved),
(getBblocksMoved() - blocksLastMoved));
(getBlocksMoved() - blocksLastMoved));
return getBytesMoved() - bytesLastMoved;
}