|
@@ -145,7 +145,7 @@ class DataBlockScanner implements Runnable {
|
|
|
// initialized when the scanner thread is started.
|
|
|
}
|
|
|
|
|
|
- private synchronized boolean isInitiliazed() {
|
|
|
+ private synchronized boolean isInitialized() {
|
|
|
return throttler != null;
|
|
|
}
|
|
|
|
|
@@ -254,7 +254,7 @@ class DataBlockScanner implements Runnable {
|
|
|
|
|
|
/** Adds block to list of blocks */
|
|
|
synchronized void addBlock(Block block) {
|
|
|
- if (!isInitiliazed()) {
|
|
|
+ if (!isInitialized()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -273,7 +273,7 @@ class DataBlockScanner implements Runnable {
|
|
|
|
|
|
/** Deletes the block from internal structures */
|
|
|
synchronized void deleteBlock(Block block) {
|
|
|
- if (!isInitiliazed()) {
|
|
|
+ if (!isInitialized()) {
|
|
|
return;
|
|
|
}
|
|
|
BlockScanInfo info = blockMap.get(block);
|
|
@@ -284,7 +284,7 @@ class DataBlockScanner implements Runnable {
|
|
|
|
|
|
/** @return the last scan time */
|
|
|
synchronized long getLastScanTime(Block block) {
|
|
|
- if (!isInitiliazed()) {
|
|
|
+ if (!isInitialized()) {
|
|
|
return 0;
|
|
|
}
|
|
|
BlockScanInfo info = blockMap.get(block);
|
|
@@ -305,6 +305,9 @@ class DataBlockScanner implements Runnable {
|
|
|
private synchronized void updateScanStatus(Block block,
|
|
|
ScanType type,
|
|
|
boolean scanOk) {
|
|
|
+ if (!isInitialized()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
BlockScanInfo info = blockMap.get(block);
|
|
|
|
|
|
if ( info != null ) {
|
|
@@ -955,7 +958,7 @@ class DataBlockScanner implements Runnable {
|
|
|
if (blockScanner == null) {
|
|
|
buffer.append("Periodic block scanner is not running. " +
|
|
|
"Please check the datanode log if this is unexpected.");
|
|
|
- } else if (blockScanner.isInitiliazed()) {
|
|
|
+ } else if (blockScanner.isInitialized()) {
|
|
|
blockScanner.printBlockReport(buffer, summary);
|
|
|
} else {
|
|
|
buffer.append("Periodic block scanner is not yet initialized. " +
|