[ https://issues.apache.org/jira/browse/HBASE-21155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack resolved HBASE-21155. --------------------------- Resolution: Fixed Re-resolving after pushing an addendum... {code} commit aab3a8a870b7bbe2d48e2909fd1dad4b20988e00 (HEAD -> m, origin/master, origin/HEAD) Author: Michael Stack <st...@apache.org> Date: Thu Sep 6 17:24:03 2018 -0700 HBASE-21155 Save on a few log strings and some churn in wal splitter by skipping out early if no logs in dir; ADDENDUM Address review comments. Signed-off-by: Mike Drob <md...@apache.org> diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java index f24805f7cc..d716a11619 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java @@ -144,7 +144,7 @@ public class MasterWalManager { } /** - * @return Return listing of ServerNames found in the filesystem under the WAL directory + * @return listing of ServerNames found in the filesystem under the WAL directory * that COULD BE 'alive'; excludes those that have a '-splitting' suffix as these are already * being split -- they cannot be 'alive'. */ diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java index 1e4e2ce17e..4d977d3427 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java @@ -174,7 +174,7 @@ public class SplitLogManager { } FileStatus[] logfiles = FSUtils.listStatus(fs, logDir, filter); if (logfiles == null || logfiles.length == 0) { - LOG.info(logDir + " dir is empty, no logs to split."); + LOG.info("{} dir is empty, no logs to split.", logDir); } else { Collections.addAll(fileStatus, logfiles); } @@ -292,7 +292,7 @@ public class SplitLogManager { String msg = "Finished splitting (more than or equal to) " + totalSize + " bytes in " + ((batch == null)? 0: batch.installed) + " log files in " + logDirs + " in " + - ((startTime == -1)? startTime: (EnvironmentEdgeManager.currentTime() - startTime)) + "ms"; + ((startTime == 0)? startTime: (EnvironmentEdgeManager.currentTime() - startTime)) + "ms"; status.markComplete(msg); LOG.info(msg); return totalSize; {code} > Save on a few log strings and some churn in wal splitter by skipping out > early if no logs in dir > ------------------------------------------------------------------------------------------------ > > Key: HBASE-21155 > URL: https://issues.apache.org/jira/browse/HBASE-21155 > Project: HBase > Issue Type: Improvement > Affects Versions: 2.1.0 > Reporter: stack > Assignee: stack > Priority: Trivial > Fix For: 2.1.1 > > Attachments: HBASE-21155.branch-2.1.001.patch, > HBASE-21155.branch-2.1.002.patch, HBASE-21155.branch-2.1.002.patch, > HBASE-21155.branch-2.1.003.patch, HBASE-21155.branch-2.1.004.patch > > > Trivial change to splitlogmanager that saves us a log line at least per WAL > dir when it goes to split. Also saves some not-needed churn in SLM. -- This message was sent by Atlassian JIRA (v7.6.3#76005)