also log all mounts in node path summary log line; use JmxFsProbe also in non-summarized case

This commit is contained in:
Michael McCandless 2015-04-14 06:22:24 -04:00 committed by mikemccand
parent 68f93e53a8
commit 8925615eea
1 changed files with 8 additions and 6 deletions

View File

@ -202,18 +202,19 @@ public class NodeEnvironment extends AbstractComponent implements Closeable {
spinsDesc = "no"; spinsDesc = "no";
} }
FsStats.Info fsInfo = JmxFsProbe.getFSInfo(nodePath);
sb.append(", free_space [") sb.append(", free_space [")
.append(new ByteSizeValue(nodePath.fileStore.getUnallocatedSpace())) .append(fsInfo.getFree())
.append("], usable_space [") .append("], usable_space [")
.append(new ByteSizeValue(nodePath.fileStore.getUsableSpace())) .append(fsInfo.getAvailable())
.append("], total_space [") .append("], total_space [")
.append(new ByteSizeValue(nodePath.fileStore.getTotalSpace())) .append(fsInfo.getTotal())
.append("], spins? [") .append("], spins? [")
.append(spinsDesc) .append(spinsDesc)
.append("], mount [") .append("], mount [")
.append(nodePath.fileStore) .append(fsInfo.getMount())
.append("], type [") .append("], type [")
.append(nodePath.fileStore.type()) .append(fsInfo.getType())
.append(']'); .append(']');
} }
logger.debug(sb.toString()); logger.debug(sb.toString());
@ -246,8 +247,9 @@ public class NodeEnvironment extends AbstractComponent implements Closeable {
// Just log a 1-line summary: // Just log a 1-line summary:
logger.info(String.format(Locale.ROOT, logger.info(String.format(Locale.ROOT,
"using [%d] data paths, net usable_space [%s], net total_space [%s], spins? [%s], types [%s]", "using [%d] data paths, mounts [%s], net usable_space [%s], net total_space [%s], spins? [%s], types [%s]",
nodePaths.length, nodePaths.length,
allMounts,
totFSInfo.getAvailable(), totFSInfo.getAvailable(),
totFSInfo.getTotal(), totFSInfo.getTotal(),
toString(allSpins), toString(allSpins),