From d7a94a21ae716301819437cf6141fb1920e92f7a Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Tue, 3 Oct 2017 14:07:05 -0700 Subject: [PATCH] HDFS-12471. Ozone: Reduce some KSM/SCM deletion log messages from INFO to DEBUG. Contributed by Weiwei Yang. --- .../org/apache/hadoop/ozone/ksm/KeyDeletingService.java | 2 +- .../hadoop/ozone/scm/block/SCMBlockDeletingService.java | 8 ++++---- .../java/org/apache/hadoop/utils/BackgroundService.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/ksm/KeyDeletingService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/ksm/KeyDeletingService.java index 293e12dfd1..59cf0e458f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/ksm/KeyDeletingService.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/ksm/KeyDeletingService.java @@ -120,7 +120,7 @@ public BackgroundTaskResult call() throws Exception { } return results::size; } else { - LOG.info("No pending deletion key found in KSM"); + LOG.debug("No pending deletion key found in KSM"); } } catch (IOException e) { LOG.error("Unable to get pending deletion keys, retry in" diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/SCMBlockDeletingService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/SCMBlockDeletingService.java index 3ca1133e18..a4bb4ffe17 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/SCMBlockDeletingService.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/SCMBlockDeletingService.java @@ -100,7 +100,7 @@ public int getPriority() { public EmptyTaskResult call() throws Exception { // Scan SCM DB in HB interval and collect a throttled list of // to delete blocks. - LOG.info("Running DeletedBlockTransactionScanner"); + LOG.debug("Running DeletedBlockTransactionScanner"); DatanodeDeletedBlockTransactions transactions = getToDeleteContainerBlocks(); if (transactions != null && !transactions.isEmpty()) { @@ -114,7 +114,7 @@ public EmptyTaskResult call() throws Exception { nodeManager.addDatanodeCommand(datanodeID, new DeleteBlocksCommand(dnTXs)); LOG.info("Added delete block command for datanode {} in the queue," - + " number delete block transactions: {}, TxID list: {}", + + " number of delete block transactions: {}, TxID list: {}", datanodeID, dnTXs.size(), String.join(",", transactions.getTransactionIDList(datanodeID))); @@ -133,7 +133,7 @@ private DatanodeDeletedBlockTransactions getToDeleteContainerBlocks() { // Get a limited number of TXs to send via HB at a time. txs = deletedBlockLog .getTransactions(BLOCK_DELETE_TX_PER_REQUEST_LIMIT); - LOG.info("Scanned deleted blocks log and got {} delTX to process", + LOG.debug("Scanned deleted blocks log and got {} delTX to process", txs.size()); } catch (IOException e) { // We may tolerant a number of failures for sometime @@ -183,7 +183,7 @@ void addTransaction(DatanodeID dnID, DeletedBlocksTransaction tx) { first.add(tx); transactions.put(dnID, first); } - LOG.info("Transaction added: {} <- TX({})", dnID, tx.getTxID()); + LOG.debug("Transaction added: {} <- TX({})", dnID, tx.getTxID()); } Set getDatanodes() { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/utils/BackgroundService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/utils/BackgroundService.java index 53f3a894d9..6680f84b14 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/utils/BackgroundService.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/utils/BackgroundService.java @@ -96,7 +96,7 @@ public void start() { public class PeriodicalTask implements Runnable { @Override public void run() { - LOG.info("Running background service : {}", serviceName); + LOG.debug("Running background service : {}", serviceName); BackgroundTaskQueue tasks = getTasks(); if (tasks.isEmpty()) { // No task found, or some problems to init tasks @@ -104,7 +104,7 @@ public void run() { return; } - LOG.info("Number of background tasks to execute : {}", tasks.size()); + LOG.debug("Number of background tasks to execute : {}", tasks.size()); CompletionService taskCompletionService = new ExecutorCompletionService<>(exec);