X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fhosttracker%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2Finternal%2FHostTracker.java;h=f5123eb4d0dc3393cebeb1bdae0b864a626ccc64;hb=06aa5ce746e29a3760688b2ef2817f50bec5ea7a;hp=7c312e1577b927850e3c11839c3b817cb9282238;hpb=6ce68c7d4d71586d027668df5d9427d663d6b210;p=controller.git diff --git a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java index 7c312e1577..f5123eb4d0 100644 --- a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java +++ b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java @@ -394,8 +394,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, arphost.setHostIP(networkAddr); arphost.setSent_count((short) 1); ARPPendingList.add(arphost); - logger.debug("Host Added to ARPPending List, IP: {}", - networkAddr.toString()); + logger.debug("Host Added to ARPPending List, IP: {}", networkAddr); } private void removePendingARPFromList(int index) { @@ -434,7 +433,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, */ removePendingARPFromList(i); logger.debug("Host Removed from ARPPending List, IP: {}", - networkAddr.toString()); + networkAddr); return; } } @@ -452,7 +451,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, */ failedARPReqList.remove(i); logger.debug("Host Removed from FailedARPReqList List, IP: {}", - networkAddr.toString()); + networkAddr); return; } } @@ -576,25 +575,6 @@ public class HostTracker implements IfIptoHost, IfHostListener, Tier tier = new Tier(1); switchManager.setNodeProp(node, tier); topologyManager.updateHostLink(p, h, UpdateType.ADDED, null); - /* - * This is a temporary fix for Cisco Live's Hadoop - * Demonstration. The concept of Tiering must be revisited based - * on other application requirements and the design might - * warrant a separate module (as it involves tracking the - * topology/ host changes & updating the Tiering numbers in an - * effective manner). - */ - updateSwitchTiers(node, 1); - - /* - * The following 2 lines are added for testing purposes. We can - * remove it once the North-Bound APIs are available for - * testing. - * - * ArrayList> hierarchies = - * getHostNetworkHierarchy(host.getNetworkAddress()); - * logHierarchies(hierarchies); - */ } else { // No need to reset the tiering if no other hosts are currently // connected @@ -727,7 +707,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, for (String switchName : hierarchy) { buf.append(switchName + "/"); } - logger.debug("{} -> {}", getContainerName(), buf.toString()); + logger.debug("{} -> {}", getContainerName(), buf); num++; } } @@ -899,16 +879,6 @@ public class HostTracker implements IfIptoHost, IfHostListener, logger.debug( "HostTracker Topology linkUpdate handling src:{}[port {}] dst:{}[port {}] added: {}", new Object[] { srcNid, srcPort, dstNid, dstPort, added }); - clearTiers(); - for (Entry entry : hostsDB.entrySet()) { - HostNodeConnector host = entry.getValue(); - Node node = host.getnodeconnectorNode(); - if (node != null) { - Tier t = new Tier(1); - switchManager.setNodeProp(node, t); - updateSwitchTiers(node, 1); - } - } } @Override @@ -1020,13 +990,15 @@ public class HostTracker implements IfIptoHost, IfHostListener, * Use the services of arphandler to check if host is still * there */ - logger.trace( - "ARP Probing ({}) for {}({})", - new Object[] { - arp_cntdown, - host.getNetworkAddress().getHostAddress(), - HexEncode.bytesToHexString(host - .getDataLayerAddressBytes()) }); + if (logger.isTraceEnabled()) { + logger.trace( + "ARP Probing ({}) for {}({})", + new Object[] { + arp_cntdown, + host.getNetworkAddress().getHostAddress(), + HexEncode.bytesToHexString(host + .getDataLayerAddressBytes()) }); + } host.setArpSendCountDown(arp_cntdown); hostFinder.probe(host); } @@ -1189,8 +1161,10 @@ public class HostTracker implements IfIptoHost, IfHostListener, switch (type) { case REMOVED: long sid = (Long) node.getID(); - logger.debug("Received removedSwitch for sw id {}", - HexEncode.longToHexString(sid)); + if (logger.isDebugEnabled()) { + logger.debug("Received removedSwitch for sw id {}", + HexEncode.longToHexString(sid)); + } for (Entry entry : hostsDB .entrySet()) { HostNodeConnector host = entry.getValue();