From ca7247e1b1c29944217b63e725e547d1ec05e5b2 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Fri, 28 Oct 2011 07:45:17 +0200 Subject: [PATCH] add more details logging on info of data path --- .../main/java/org/elasticsearch/env/NodeEnvironment.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/env/NodeEnvironment.java b/modules/elasticsearch/src/main/java/org/elasticsearch/env/NodeEnvironment.java index 81cdc4657c6..4e52093d7a8 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/env/NodeEnvironment.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/env/NodeEnvironment.java @@ -27,6 +27,7 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.io.FileSystemUtils; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; @@ -123,6 +124,13 @@ public class NodeEnvironment extends AbstractComponent { if (logger.isDebugEnabled()) { logger.debug("using node location [{}], local_node_id [{}]", nodesFiles, localNodeId); } + if (logger.isTraceEnabled()) { + StringBuilder sb = new StringBuilder("node data locations details:\n"); + for (File file : nodesFiles) { + sb.append(" -> ").append(file.getAbsolutePath()).append(", free_space [").append(new ByteSizeValue(file.getFreeSpace())).append(", usable_space [").append(new ByteSizeValue(file.getUsableSpace())).append("\n"); + } + logger.trace(sb.toString()); + } this.nodeIndicesLocations = new File[nodeFiles.length]; for (int i = 0; i < nodeFiles.length; i++) {