HBASE-12461 FSVisitor logging is excessive (Nick Dimiduk)

This commit is contained in:
Andrew Purtell 2014-11-12 10:21:02 -08:00
parent b0a434a5ce
commit 05c1663392
1 changed files with 21 additions and 7 deletions

View File

@ -73,7 +73,9 @@ public final class FSVisitor {
final RegionVisitor visitor) throws IOException { final RegionVisitor visitor) throws IOException {
FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs));
if (regions == null) { if (regions == null) {
LOG.info("No regions under directory:" + tableDir); if (LOG.isTraceEnabled()) {
LOG.trace("No regions under directory:" + tableDir);
}
return; return;
} }
@ -94,7 +96,9 @@ public final class FSVisitor {
final StoreFileVisitor visitor) throws IOException { final StoreFileVisitor visitor) throws IOException {
FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs));
if (regions == null) { if (regions == null) {
LOG.info("No regions under directory:" + tableDir); if (LOG.isTraceEnabled()) {
LOG.trace("No regions under directory:" + tableDir);
}
return; return;
} }
@ -115,7 +119,9 @@ public final class FSVisitor {
final StoreFileVisitor visitor) throws IOException { final StoreFileVisitor visitor) throws IOException {
FileStatus[] families = FSUtils.listStatus(fs, regionDir, new FSUtils.FamilyDirFilter(fs)); FileStatus[] families = FSUtils.listStatus(fs, regionDir, new FSUtils.FamilyDirFilter(fs));
if (families == null) { if (families == null) {
LOG.info("No families under region directory:" + regionDir); if (LOG.isTraceEnabled()) {
LOG.trace("No families under region directory:" + regionDir);
}
return; return;
} }
@ -127,7 +133,9 @@ public final class FSVisitor {
// get all the storeFiles in the family // get all the storeFiles in the family
FileStatus[] storeFiles = FSUtils.listStatus(fs, familyDir, fileFilter); FileStatus[] storeFiles = FSUtils.listStatus(fs, familyDir, fileFilter);
if (storeFiles == null) { if (storeFiles == null) {
LOG.debug("No hfiles found for family: " + familyDir + ", skipping."); if (LOG.isTraceEnabled()) {
LOG.trace("No hfiles found for family: " + familyDir + ", skipping.");
}
continue; continue;
} }
@ -150,7 +158,9 @@ public final class FSVisitor {
final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { final FSVisitor.RecoveredEditsVisitor visitor) throws IOException {
FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs));
if (regions == null) { if (regions == null) {
LOG.info("No recoveredEdits regions under directory:" + tableDir); if (LOG.isTraceEnabled()) {
LOG.trace("No recoveredEdits regions under directory:" + tableDir);
}
return; return;
} }
@ -194,7 +204,9 @@ public final class FSVisitor {
Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME);
FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir);
if (logServerDirs == null) { if (logServerDirs == null) {
LOG.info("No logs under directory:" + logsDir); if (LOG.isTraceEnabled()) {
LOG.trace("No logs under directory:" + logsDir);
}
return; return;
} }
@ -203,7 +215,9 @@ public final class FSVisitor {
FileStatus[] hlogs = FSUtils.listStatus(fs, serverLogs.getPath()); FileStatus[] hlogs = FSUtils.listStatus(fs, serverLogs.getPath());
if (hlogs == null) { if (hlogs == null) {
LOG.debug("No hfiles found for server: " + serverName + ", skipping."); if (LOG.isTraceEnabled()) {
LOG.trace("No hfiles found for server: " + serverName + ", skipping.");
}
continue; continue;
} }