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 <mdrob@apache.org>
This commit is contained in:
parent
3ac3249423
commit
aab3a8a870
|
@ -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
|
* that COULD BE 'alive'; excludes those that have a '-splitting' suffix as these are already
|
||||||
* being split -- they cannot be 'alive'.
|
* being split -- they cannot be 'alive'.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class SplitLogManager {
|
||||||
}
|
}
|
||||||
FileStatus[] logfiles = FSUtils.listStatus(fs, logDir, filter);
|
FileStatus[] logfiles = FSUtils.listStatus(fs, logDir, filter);
|
||||||
if (logfiles == null || logfiles.length == 0) {
|
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 {
|
} else {
|
||||||
Collections.addAll(fileStatus, logfiles);
|
Collections.addAll(fileStatus, logfiles);
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ public class SplitLogManager {
|
||||||
String msg = "Finished splitting (more than or equal to) " + totalSize +
|
String msg = "Finished splitting (more than or equal to) " + totalSize +
|
||||||
" bytes in " + ((batch == null)? 0: batch.installed) +
|
" bytes in " + ((batch == null)? 0: batch.installed) +
|
||||||
" log files in " + logDirs + " in " +
|
" log files in " + logDirs + " in " +
|
||||||
((startTime == -1)? startTime: (EnvironmentEdgeManager.currentTime() - startTime)) + "ms";
|
((startTime == 0)? startTime: (EnvironmentEdgeManager.currentTime() - startTime)) + "ms";
|
||||||
status.markComplete(msg);
|
status.markComplete(msg);
|
||||||
LOG.info(msg);
|
LOG.info(msg);
|
||||||
return totalSize;
|
return totalSize;
|
||||||
|
|
Loading…
Reference in New Issue