You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2019/11/20 18:41:50 UTC
[hadoop] branch trunk updated: HDFS-14995. Use log variable
directly instead of passing as argument in
InvalidateBlocks#printBlockDeletionTime(). Contributed by Lisheng Sun.
This is an automated email from the ASF dual-hosted git repository.
surendralilhore pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
View the commit online:
https://github.com/apache/hadoop/commit/fd264b826576b67adb04586002c3f94b7ea5a2f1
The following commit(s) were added to refs/heads/trunk by this push:
new fd264b8 HDFS-14995. Use log variable directly instead of passing as argument in InvalidateBlocks#printBlockDeletionTime(). Contributed by Lisheng Sun.
fd264b8 is described below
commit fd264b826576b67adb04586002c3f94b7ea5a2f1
Author: Surendra Singh Lilhore <su...@apache.org>
AuthorDate: Thu Nov 21 00:00:42 2019 +0530
HDFS-14995. Use log variable directly instead of passing as argument in InvalidateBlocks#printBlockDeletionTime(). Contributed by Lisheng Sun.
---
.../hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
index 247ea62..bbe729c 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
@@ -41,8 +41,6 @@ import org.apache.hadoop.hdfs.DFSUtil;
import com.google.common.annotations.VisibleForTesting;
-import org.slf4j.Logger;
-
/**
* Keeps a Collection for every named machine containing blocks
* that have recently been invalidated and are thought to live
@@ -72,17 +70,17 @@ class InvalidateBlocks {
this.blockInvalidateLimit = blockInvalidateLimit;
this.pendingPeriodInMs = pendingPeriodInMs;
this.blockIdManager = blockIdManager;
- printBlockDeletionTime(BlockManager.LOG);
+ printBlockDeletionTime();
}
- private void printBlockDeletionTime(final Logger log) {
- log.info("{} is set to {}",
+ private void printBlockDeletionTime() {
+ BlockManager.LOG.info("{} is set to {}",
DFSConfigKeys.DFS_NAMENODE_STARTUP_DELAY_BLOCK_DELETION_SEC_KEY,
DFSUtil.durationToString(pendingPeriodInMs));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy MMM dd HH:mm:ss");
Calendar calendar = new GregorianCalendar();
calendar.add(Calendar.SECOND, (int) (this.pendingPeriodInMs / 1000));
- log.info("The block deletion will start around {}",
+ BlockManager.LOG.info("The block deletion will start around {}",
sdf.format(calendar.getTime()));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org