From a11c7beef8064a374948f1718b5eb8c9a3c43180 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 12 May 2010 17:27:50 +0300 Subject: [PATCH] add debug logging --- .../java/org/elasticsearch/discovery/zen/ZenDiscovery.java | 2 ++ .../elasticsearch/discovery/zen/fd/MasterFaultDetection.java | 2 ++ .../elasticsearch/discovery/zen/fd/NodesFaultDetection.java | 2 ++ .../discovery/zen/ping/multicast/MulticastZenPing.java | 2 ++ .../discovery/zen/ping/unicast/UnicastZenPing.java | 3 +++ 5 files changed, 11 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java index a103ac908c0..9149d126a15 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java @@ -105,6 +105,8 @@ public class ZenDiscovery extends AbstractLifecycleComponent implemen this.initialPingTimeout = componentSettings.getAsTime("initial_ping_timeout", timeValueSeconds(3)); + logger.debug("Using initial_ping_timeout [{}]", initialPingTimeout); + this.electMaster = new ElectMasterService(settings); this.masterFD = new MasterFaultDetection(settings, threadPool, transportService, this); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java index 37692033061..67175d644fa 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java @@ -88,6 +88,8 @@ public class MasterFaultDetection extends AbstractComponent { this.pingRetryTimeout = componentSettings.getAsTime("ping_timeout", timeValueSeconds(6)); this.pingRetryCount = componentSettings.getAsInt("ping_retries", 5); + logger.debug("Master FD uses ping_interval [{}], ping_timeout [{}], ping_retries [{}]", pingInterval, pingRetryTimeout, pingRetryCount); + this.connectionListener = new FDConnectionListener(); transportService.addConnectionListener(connectionListener); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java index b36214282dd..49fdea5e6f6 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java @@ -84,6 +84,8 @@ public class NodesFaultDetection extends AbstractComponent { this.pingRetryTimeout = componentSettings.getAsTime("ping_timeout", timeValueSeconds(6)); this.pingRetryCount = componentSettings.getAsInt("ping_retries", 5); + logger.debug("Nodes FD uses ping_interval [{}], ping_timeout [{}], ping_retries [{}]", pingInterval, pingRetryTimeout, pingRetryCount); + transportService.registerHandler(PingRequestHandler.ACTION, new PingRequestHandler()); this.connectionListener = new FDConnectionListener(); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPing.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPing.java index 78a71b03187..6909c7090e4 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPing.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPing.java @@ -112,6 +112,8 @@ public class MulticastZenPing extends AbstractLifecycleComponent implem this.bufferSize = componentSettings.getAsInt("buffer_size", 2048); this.ttl = componentSettings.getAsInt("ttl", 3); + logger.debug("Using group [{}], with port [{}], ttl [{}], and address [{}]", group, port, ttl, address); + this.transportService.registerHandler(MulticastPingResponseRequestHandler.ACTION, new MulticastPingResponseRequestHandler()); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java index 6a36b937c3b..40db405f78e 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java @@ -94,6 +94,9 @@ public class UnicastZenPing extends AbstractLifecycleComponent implemen if (componentSettings.get("hosts") != null) { hosts.addAll(Strings.commaDelimitedListToSet(componentSettings.get("hosts"))); } + + logger.debug("Using hosts ", hosts); + List nodes = Lists.newArrayList(); int idCounter = 0; for (String host : hosts) {