Debug log level where appropriate + Throwing an exception where appropriate
Change-Id: Ica18c122c8a2cb8286d4f48c017a06ffe10452e1
Showing
3 changed files
with
6 additions
and
6 deletions
... | @@ -135,7 +135,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { | ... | @@ -135,7 +135,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { |
135 | nodeInfo.getTcpPort())) | 135 | nodeInfo.getTcpPort())) |
136 | .collect(Collectors.toSet()); | 136 | .collect(Collectors.toSet()); |
137 | } catch (IOException e) { | 137 | } catch (IOException e) { |
138 | - log.warn("Failed to read cluster definition.", e); | 138 | + throw new IllegalStateException("Failed to read cluster definition.", e); |
139 | } | 139 | } |
140 | 140 | ||
141 | seedNodes.forEach(node -> { | 141 | seedNodes.forEach(node -> { |
... | @@ -278,7 +278,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { | ... | @@ -278,7 +278,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { |
278 | } | 278 | } |
279 | }); | 279 | }); |
280 | } catch (Exception e) { | 280 | } catch (Exception e) { |
281 | - log.trace("Failed to send heartbeat", e); | 281 | + log.debug("Failed to send heartbeat", e); |
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||
... | @@ -295,7 +295,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { | ... | @@ -295,7 +295,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { |
295 | try { | 295 | try { |
296 | messagingService.sendAsync(remoteEp, HEARTBEAT_MESSAGE, messagePayload); | 296 | messagingService.sendAsync(remoteEp, HEARTBEAT_MESSAGE, messagePayload); |
297 | } catch (IOException e) { | 297 | } catch (IOException e) { |
298 | - log.trace("Sending heartbeat to {} failed", remoteEp, e); | 298 | + log.debug("Sending heartbeat to {} failed", remoteEp, e); |
299 | } | 299 | } |
300 | } | 300 | } |
301 | 301 | ... | ... |
... | @@ -190,7 +190,7 @@ public class DistributedLeadershipManager implements LeadershipService { | ... | @@ -190,7 +190,7 @@ public class DistributedLeadershipManager implements LeadershipService { |
190 | 190 | ||
191 | @Override | 191 | @Override |
192 | public void runForLeadership(String path) { | 192 | public void runForLeadership(String path) { |
193 | - log.trace("Running for leadership for topic: {}", path); | 193 | + log.debug("Running for leadership for topic: {}", path); |
194 | activeTopics.add(path); | 194 | activeTopics.add(path); |
195 | tryLeaderLock(path); | 195 | tryLeaderLock(path); |
196 | } | 196 | } |
... | @@ -358,7 +358,7 @@ public class DistributedLeadershipManager implements LeadershipService { | ... | @@ -358,7 +358,7 @@ public class DistributedLeadershipManager implements LeadershipService { |
358 | } | 358 | } |
359 | } | 359 | } |
360 | if (localNodeId.equals(nodeId) && !activeTopics.contains(path)) { | 360 | if (localNodeId.equals(nodeId) && !activeTopics.contains(path)) { |
361 | - log.info("Lock for {} is held by {} when it not running for leadership.", path, nodeId); | 361 | + log.debug("Lock for {} is held by {} when it not running for leadership.", path, nodeId); |
362 | try { | 362 | try { |
363 | if (lockMap.remove(path, epoch)) { | 363 | if (lockMap.remove(path, epoch)) { |
364 | log.info("Purged stale lock held by {} for {}", nodeId, path); | 364 | log.info("Purged stale lock held by {} for {}", nodeId, path); | ... | ... |
... | @@ -222,7 +222,7 @@ public class NettyMessagingService implements MessagingService { | ... | @@ -222,7 +222,7 @@ public class NettyMessagingService implements MessagingService { |
222 | try { | 222 | try { |
223 | handler.handle(message); | 223 | handler.handle(message); |
224 | } catch (Exception e) { | 224 | } catch (Exception e) { |
225 | - log.warn("Failed to process message of type {}", type, e); | 225 | + log.debug("Failed to process message of type {}", type, e); |
226 | } | 226 | } |
227 | }); | 227 | }); |
228 | } | 228 | } | ... | ... |
-
Please register or login to post a comment