Committed by
Gerrit Code Review
Lower log level
- periodic non-error log to trace - Host event to debug Change-Id: I1a3e746f4cafe72dbaa648ac379a0548a93445e4
Showing
5 changed files
with
22 additions
and
22 deletions
... | @@ -1228,7 +1228,7 @@ public class GossipDeviceStore | ... | @@ -1228,7 +1228,7 @@ public class GossipDeviceStore |
1228 | .toList(); | 1228 | .toList(); |
1229 | 1229 | ||
1230 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { | 1230 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { |
1231 | - log.debug("No other peers in the cluster."); | 1231 | + log.trace("No other peers in the cluster."); |
1232 | return; | 1232 | return; |
1233 | } | 1233 | } |
1234 | 1234 | ||
... | @@ -1358,7 +1358,7 @@ public class GossipDeviceStore | ... | @@ -1358,7 +1358,7 @@ public class GossipDeviceStore |
1358 | 1358 | ||
1359 | @Override | 1359 | @Override |
1360 | public void handle(ClusterMessage message) { | 1360 | public void handle(ClusterMessage message) { |
1361 | - log.debug("Received Device Anti-Entropy advertisement from peer: {}", message.sender()); | 1361 | + log.trace("Received Device Anti-Entropy advertisement from peer: {}", message.sender()); |
1362 | DeviceAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); | 1362 | DeviceAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); |
1363 | handleAdvertisement(advertisement); | 1363 | handleAdvertisement(advertisement); |
1364 | } | 1364 | } | ... | ... |
... | @@ -188,7 +188,7 @@ public class DistributedFlowRuleStore | ... | @@ -188,7 +188,7 @@ public class DistributedFlowRuleStore |
188 | @Override | 188 | @Override |
189 | public void handle(ClusterMessage message) { | 189 | public void handle(ClusterMessage message) { |
190 | FlowRule rule = SERIALIZER.decode(message.payload()); | 190 | FlowRule rule = SERIALIZER.decode(message.payload()); |
191 | - log.debug("received get flow entry request for {}", rule); | 191 | + log.trace("received get flow entry request for {}", rule); |
192 | FlowEntry flowEntry = getFlowEntryInternal(rule); | 192 | FlowEntry flowEntry = getFlowEntryInternal(rule); |
193 | try { | 193 | try { |
194 | message.respond(SERIALIZER.encode(flowEntry)); | 194 | message.respond(SERIALIZER.encode(flowEntry)); |
... | @@ -203,7 +203,7 @@ public class DistributedFlowRuleStore | ... | @@ -203,7 +203,7 @@ public class DistributedFlowRuleStore |
203 | @Override | 203 | @Override |
204 | public void handle(ClusterMessage message) { | 204 | public void handle(ClusterMessage message) { |
205 | DeviceId deviceId = SERIALIZER.decode(message.payload()); | 205 | DeviceId deviceId = SERIALIZER.decode(message.payload()); |
206 | - log.debug("Received get flow entries request for {} from {}", deviceId, message.sender()); | 206 | + log.trace("Received get flow entries request for {} from {}", deviceId, message.sender()); |
207 | Set<FlowEntry> flowEntries = getFlowEntriesInternal(deviceId); | 207 | Set<FlowEntry> flowEntries = getFlowEntriesInternal(deviceId); |
208 | try { | 208 | try { |
209 | message.respond(SERIALIZER.encode(flowEntries)); | 209 | message.respond(SERIALIZER.encode(flowEntries)); |
... | @@ -255,7 +255,7 @@ public class DistributedFlowRuleStore | ... | @@ -255,7 +255,7 @@ public class DistributedFlowRuleStore |
255 | return getFlowEntryInternal(rule); | 255 | return getFlowEntryInternal(rule); |
256 | } | 256 | } |
257 | 257 | ||
258 | - log.debug("Forwarding getFlowEntry to {}, which is the primary (master) for device {}", | 258 | + log.trace("Forwarding getFlowEntry to {}, which is the primary (master) for device {}", |
259 | replicaInfo.master().orNull(), rule.deviceId()); | 259 | replicaInfo.master().orNull(), rule.deviceId()); |
260 | 260 | ||
261 | ClusterMessage message = new ClusterMessage( | 261 | ClusterMessage message = new ClusterMessage( |
... | @@ -301,7 +301,7 @@ public class DistributedFlowRuleStore | ... | @@ -301,7 +301,7 @@ public class DistributedFlowRuleStore |
301 | return getFlowEntriesInternal(deviceId); | 301 | return getFlowEntriesInternal(deviceId); |
302 | } | 302 | } |
303 | 303 | ||
304 | - log.debug("Forwarding getFlowEntries to {}, which is the primary (master) for device {}", | 304 | + log.trace("Forwarding getFlowEntries to {}, which is the primary (master) for device {}", |
305 | replicaInfo.master().orNull(), deviceId); | 305 | replicaInfo.master().orNull(), deviceId); |
306 | 306 | ||
307 | ClusterMessage message = new ClusterMessage( | 307 | ClusterMessage message = new ClusterMessage( |
... | @@ -359,7 +359,7 @@ public class DistributedFlowRuleStore | ... | @@ -359,7 +359,7 @@ public class DistributedFlowRuleStore |
359 | return storeBatchInternal(operation); | 359 | return storeBatchInternal(operation); |
360 | } | 360 | } |
361 | 361 | ||
362 | - log.debug("Forwarding storeBatch to {}, which is the primary (master) for device {}", | 362 | + log.trace("Forwarding storeBatch to {}, which is the primary (master) for device {}", |
363 | replicaInfo.master().orNull(), deviceId); | 363 | replicaInfo.master().orNull(), deviceId); |
364 | 364 | ||
365 | ClusterMessage message = new ClusterMessage( | 365 | ClusterMessage message = new ClusterMessage( |
... | @@ -459,7 +459,7 @@ public class DistributedFlowRuleStore | ... | @@ -459,7 +459,7 @@ public class DistributedFlowRuleStore |
459 | return addOrUpdateFlowRuleInternal(rule); | 459 | return addOrUpdateFlowRuleInternal(rule); |
460 | } | 460 | } |
461 | 461 | ||
462 | - log.error("Tried to update FlowRule {} state," | 462 | + log.warn("Tried to update FlowRule {} state," |
463 | + " while the Node was not the master.", rule); | 463 | + " while the Node was not the master.", rule); |
464 | return null; | 464 | return null; |
465 | } | 465 | } |
... | @@ -504,7 +504,7 @@ public class DistributedFlowRuleStore | ... | @@ -504,7 +504,7 @@ public class DistributedFlowRuleStore |
504 | return removeFlowRuleInternal(rule); | 504 | return removeFlowRuleInternal(rule); |
505 | } | 505 | } |
506 | 506 | ||
507 | - log.error("Tried to remove FlowRule {}," | 507 | + log.warn("Tried to remove FlowRule {}," |
508 | + " while the Node was not the master.", rule); | 508 | + " while the Node was not the master.", rule); |
509 | return null; | 509 | return null; |
510 | } | 510 | } |
... | @@ -542,14 +542,14 @@ public class DistributedFlowRuleStore | ... | @@ -542,14 +542,14 @@ public class DistributedFlowRuleStore |
542 | 542 | ||
543 | flowEntriesLock.writeLock().lock(); | 543 | flowEntriesLock.writeLock().lock(); |
544 | try { | 544 | try { |
545 | - log.info("Loading FlowRules for {} from backups", did); | 545 | + log.debug("Loading FlowRules for {} from backups", did); |
546 | SMap<FlowId, ImmutableList<StoredFlowEntry>> backupFlowTable = smaps.get(did); | 546 | SMap<FlowId, ImmutableList<StoredFlowEntry>> backupFlowTable = smaps.get(did); |
547 | for (Entry<FlowId, ImmutableList<StoredFlowEntry>> e | 547 | for (Entry<FlowId, ImmutableList<StoredFlowEntry>> e |
548 | : backupFlowTable.entrySet()) { | 548 | : backupFlowTable.entrySet()) { |
549 | 549 | ||
550 | // TODO: should we be directly updating internal structure or | 550 | // TODO: should we be directly updating internal structure or |
551 | // should we be triggering event? | 551 | // should we be triggering event? |
552 | - log.debug("loading {}", e.getValue()); | 552 | + log.trace("loading {}", e.getValue()); |
553 | for (StoredFlowEntry entry : e.getValue()) { | 553 | for (StoredFlowEntry entry : e.getValue()) { |
554 | flowEntries.remove(did, entry); | 554 | flowEntries.remove(did, entry); |
555 | flowEntries.put(did, entry); | 555 | flowEntries.put(did, entry); |
... | @@ -570,7 +570,7 @@ public class DistributedFlowRuleStore | ... | @@ -570,7 +570,7 @@ public class DistributedFlowRuleStore |
570 | } finally { | 570 | } finally { |
571 | flowEntriesLock.writeLock().unlock(); | 571 | flowEntriesLock.writeLock().unlock(); |
572 | } | 572 | } |
573 | - log.debug("removedFromPrimary {}", removed); | 573 | + log.trace("removedFromPrimary {}", removed); |
574 | } | 574 | } |
575 | 575 | ||
576 | private static final class TimeoutFuture | 576 | private static final class TimeoutFuture |
... | @@ -594,7 +594,7 @@ public class DistributedFlowRuleStore | ... | @@ -594,7 +594,7 @@ public class DistributedFlowRuleStore |
594 | @Override | 594 | @Override |
595 | public void handle(final ClusterMessage message) { | 595 | public void handle(final ClusterMessage message) { |
596 | FlowRuleBatchOperation operation = SERIALIZER.decode(message.payload()); | 596 | FlowRuleBatchOperation operation = SERIALIZER.decode(message.payload()); |
597 | - log.info("received batch request {}", operation); | 597 | + log.debug("received batch request {}", operation); |
598 | 598 | ||
599 | final DeviceId deviceId = operation.getOperations().get(0).getTarget().deviceId(); | 599 | final DeviceId deviceId = operation.getOperations().get(0).getTarget().deviceId(); |
600 | ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); | 600 | ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); |
... | @@ -704,7 +704,7 @@ public class DistributedFlowRuleStore | ... | @@ -704,7 +704,7 @@ public class DistributedFlowRuleStore |
704 | @Override | 704 | @Override |
705 | public void run() { | 705 | public void run() { |
706 | try { | 706 | try { |
707 | - log.debug("update backup {} +{} -{}", deviceId, toAdd, toRemove); | 707 | + log.trace("update backup {} +{} -{}", deviceId, toAdd, toRemove); |
708 | final SMap<FlowId, ImmutableList<StoredFlowEntry>> backupFlowTable = smaps.get(deviceId); | 708 | final SMap<FlowId, ImmutableList<StoredFlowEntry>> backupFlowTable = smaps.get(deviceId); |
709 | // Following should be rewritten using async APIs | 709 | // Following should be rewritten using async APIs |
710 | for (StoredFlowEntry entry : toAdd) { | 710 | for (StoredFlowEntry entry : toAdd) { | ... | ... |
... | @@ -459,7 +459,7 @@ public class GossipHostStore | ... | @@ -459,7 +459,7 @@ public class GossipHostStore |
459 | @Override | 459 | @Override |
460 | public void handle(ClusterMessage message) { | 460 | public void handle(ClusterMessage message) { |
461 | 461 | ||
462 | - log.info("Received host update event from peer: {}", message.sender()); | 462 | + log.debug("Received host update event from peer: {}", message.sender()); |
463 | InternalHostEvent event = (InternalHostEvent) SERIALIZER.decode(message.payload()); | 463 | InternalHostEvent event = (InternalHostEvent) SERIALIZER.decode(message.payload()); |
464 | 464 | ||
465 | ProviderId providerId = event.providerId(); | 465 | ProviderId providerId = event.providerId(); |
... | @@ -475,7 +475,7 @@ public class GossipHostStore | ... | @@ -475,7 +475,7 @@ public class GossipHostStore |
475 | @Override | 475 | @Override |
476 | public void handle(ClusterMessage message) { | 476 | public void handle(ClusterMessage message) { |
477 | 477 | ||
478 | - log.info("Received host removed event from peer: {}", message.sender()); | 478 | + log.debug("Received host removed event from peer: {}", message.sender()); |
479 | InternalHostRemovedEvent event = (InternalHostRemovedEvent) SERIALIZER.decode(message.payload()); | 479 | InternalHostRemovedEvent event = (InternalHostRemovedEvent) SERIALIZER.decode(message.payload()); |
480 | 480 | ||
481 | HostId hostId = event.hostId(); | 481 | HostId hostId = event.hostId(); |
... | @@ -503,7 +503,7 @@ public class GossipHostStore | ... | @@ -503,7 +503,7 @@ public class GossipHostStore |
503 | .toList(); | 503 | .toList(); |
504 | 504 | ||
505 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { | 505 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { |
506 | - log.debug("No other peers in the cluster."); | 506 | + log.trace("No other peers in the cluster."); |
507 | return; | 507 | return; |
508 | } | 508 | } |
509 | 509 | ||
... | @@ -640,7 +640,7 @@ public class GossipHostStore | ... | @@ -640,7 +640,7 @@ public class GossipHostStore |
640 | 640 | ||
641 | @Override | 641 | @Override |
642 | public void handle(ClusterMessage message) { | 642 | public void handle(ClusterMessage message) { |
643 | - log.debug("Received Host Anti-Entropy advertisement from peer: {}", message.sender()); | 643 | + log.trace("Received Host Anti-Entropy advertisement from peer: {}", message.sender()); |
644 | HostAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); | 644 | HostAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); |
645 | handleAntiEntropyAdvertisement(advertisement); | 645 | handleAntiEntropyAdvertisement(advertisement); |
646 | } | 646 | } | ... | ... |
... | @@ -638,7 +638,7 @@ public class GossipLinkStore | ... | @@ -638,7 +638,7 @@ public class GossipLinkStore |
638 | .toList(); | 638 | .toList(); |
639 | 639 | ||
640 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { | 640 | if (nodeIds.size() == 1 && nodeIds.get(0).equals(self)) { |
641 | - log.debug("No other peers in the cluster."); | 641 | + log.trace("No other peers in the cluster."); |
642 | return; | 642 | return; |
643 | } | 643 | } |
644 | 644 | ||
... | @@ -796,7 +796,7 @@ public class GossipLinkStore | ... | @@ -796,7 +796,7 @@ public class GossipLinkStore |
796 | 796 | ||
797 | @Override | 797 | @Override |
798 | public void handle(ClusterMessage message) { | 798 | public void handle(ClusterMessage message) { |
799 | - log.debug("Received Link Anti-Entropy advertisement from peer: {}", message.sender()); | 799 | + log.trace("Received Link Anti-Entropy advertisement from peer: {}", message.sender()); |
800 | LinkAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); | 800 | LinkAntiEntropyAdvertisement advertisement = SERIALIZER.decode(message.payload()); |
801 | handleAntiEntropyAdvertisement(advertisement); | 801 | handleAntiEntropyAdvertisement(advertisement); |
802 | } | 802 | } | ... | ... |
... | @@ -49,12 +49,12 @@ public class FlowStatsCollector implements TimerTask { | ... | @@ -49,12 +49,12 @@ public class FlowStatsCollector implements TimerTask { |
49 | 49 | ||
50 | @Override | 50 | @Override |
51 | public void run(Timeout timeout) throws Exception { | 51 | public void run(Timeout timeout) throws Exception { |
52 | - log.debug("Collecting stats for {}", this.sw.getStringId()); | 52 | + log.trace("Collecting stats for {}", this.sw.getStringId()); |
53 | 53 | ||
54 | sendFlowStatistics(); | 54 | sendFlowStatistics(); |
55 | 55 | ||
56 | if (!this.stopTimer) { | 56 | if (!this.stopTimer) { |
57 | - log.debug("Scheduling stats collection in {} seconds for {}", | 57 | + log.trace("Scheduling stats collection in {} seconds for {}", |
58 | this.refreshInterval, this.sw.getStringId()); | 58 | this.refreshInterval, this.sw.getStringId()); |
59 | timeout.getTimer().newTimeout(this, refreshInterval, | 59 | timeout.getTimer().newTimeout(this, refreshInterval, |
60 | TimeUnit.SECONDS); | 60 | TimeUnit.SECONDS); | ... | ... |
-
Please register or login to post a comment