HDFS-3194. DataNode block scanner is running too frequently. Contributed by Andy Isaacson
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1373928 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2926ae6ead
commit
4524655afd
|
@ -616,6 +616,9 @@ Branch-2 ( Unreleased changes )
|
||||||
|
|
||||||
HDFS-3048. Small race in BlockManager#close. (Andy Isaacson via eli)
|
HDFS-3048. Small race in BlockManager#close. (Andy Isaacson via eli)
|
||||||
|
|
||||||
|
HDFS-3194. DataNode block scanner is running too frequently.
|
||||||
|
(Andy Isaacson via eli)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-3042 SUBTASKS
|
BREAKDOWN OF HDFS-3042 SUBTASKS
|
||||||
|
|
||||||
HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
|
HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
|
||||||
|
|
|
@ -554,11 +554,9 @@ class BlockPoolSliceScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void startNewPeriod() {
|
private synchronized void startNewPeriod() {
|
||||||
if (LOG.isDebugEnabled()) {
|
LOG.info("Starting a new period : work left in prev period : "
|
||||||
LOG.debug("Starting a new period : work left in prev period : "
|
|
||||||
+ String.format("%.2f%%", totalBytesToScan == 0 ? 0
|
+ String.format("%.2f%%", totalBytesToScan == 0 ? 0
|
||||||
: (bytesLeft * 100.0) / totalBytesToScan));
|
: (bytesLeft * 100.0) / totalBytesToScan));
|
||||||
}
|
|
||||||
|
|
||||||
// reset the byte counts :
|
// reset the byte counts :
|
||||||
bytesLeft = totalBytesToScan;
|
bytesLeft = totalBytesToScan;
|
||||||
|
@ -566,7 +564,6 @@ class BlockPoolSliceScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
void scanBlockPoolSlice() {
|
void scanBlockPoolSlice() {
|
||||||
startNewPeriod();
|
|
||||||
// Create a new processedBlocks structure
|
// Create a new processedBlocks structure
|
||||||
processedBlocks = new HashMap<Long, Integer>();
|
processedBlocks = new HashMap<Long, Integer>();
|
||||||
if (!assignInitialVerificationTimes()) {
|
if (!assignInitialVerificationTimes()) {
|
||||||
|
|
Loading…
Reference in New Issue