Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
Showing
5 changed files
with
23 additions
and
5 deletions
| ... | @@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory; | ... | @@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory; |
| 8 | /** | 8 | /** |
| 9 | * Test to measure Messaging performance. | 9 | * Test to measure Messaging performance. |
| 10 | */ | 10 | */ |
| 11 | - public class SimpleNettyServer { | 11 | + public final class SimpleNettyServer { |
| 12 | private static Logger log = LoggerFactory.getLogger(IOLoopTestServer.class); | 12 | private static Logger log = LoggerFactory.getLogger(IOLoopTestServer.class); |
| 13 | 13 | ||
| 14 | private SimpleNettyServer() {} | 14 | private SimpleNettyServer() {} | ... | ... |
| ... | @@ -13,6 +13,7 @@ import java.util.Collections; | ... | @@ -13,6 +13,7 @@ import java.util.Collections; |
| 13 | import java.util.List; | 13 | import java.util.List; |
| 14 | import java.util.Set; | 14 | import java.util.Set; |
| 15 | 15 | ||
| 16 | +import org.junit.Ignore; | ||
| 16 | import org.junit.Test; | 17 | import org.junit.Test; |
| 17 | import org.onlab.onos.net.ConnectPoint; | 18 | import org.onlab.onos.net.ConnectPoint; |
| 18 | import org.onlab.onos.net.Device; | 19 | import org.onlab.onos.net.Device; |
| ... | @@ -52,6 +53,7 @@ public class HostMonitorTest { | ... | @@ -52,6 +53,7 @@ public class HostMonitorTest { |
| 52 | private HostMonitor hostMonitor; | 53 | private HostMonitor hostMonitor; |
| 53 | 54 | ||
| 54 | @Test | 55 | @Test |
| 56 | + @Ignore | ||
| 55 | public void testMonitorHostExists() throws Exception { | 57 | public void testMonitorHostExists() throws Exception { |
| 56 | ProviderId id = new ProviderId("fake://", "id"); | 58 | ProviderId id = new ProviderId("fake://", "id"); |
| 57 | 59 | ||
| ... | @@ -81,6 +83,7 @@ public class HostMonitorTest { | ... | @@ -81,6 +83,7 @@ public class HostMonitorTest { |
| 81 | } | 83 | } |
| 82 | 84 | ||
| 83 | @Test | 85 | @Test |
| 86 | + @Ignore | ||
| 84 | public void testMonitorHostDoesNotExist() throws Exception { | 87 | public void testMonitorHostDoesNotExist() throws Exception { |
| 85 | HostManager hostManager = createMock(HostManager.class); | 88 | HostManager hostManager = createMock(HostManager.class); |
| 86 | 89 | ... | ... |
| ... | @@ -7,11 +7,9 @@ import com.google.common.cache.RemovalNotification; | ... | @@ -7,11 +7,9 @@ import com.google.common.cache.RemovalNotification; |
| 7 | import com.google.common.collect.ImmutableSet; | 7 | import com.google.common.collect.ImmutableSet; |
| 8 | 8 | ||
| 9 | import org.apache.felix.scr.annotations.Activate; | 9 | import org.apache.felix.scr.annotations.Activate; |
| 10 | -import org.apache.felix.scr.annotations.Component; | ||
| 11 | import org.apache.felix.scr.annotations.Deactivate; | 10 | import org.apache.felix.scr.annotations.Deactivate; |
| 12 | import org.apache.felix.scr.annotations.Reference; | 11 | import org.apache.felix.scr.annotations.Reference; |
| 13 | import org.apache.felix.scr.annotations.ReferenceCardinality; | 12 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
| 14 | -import org.apache.felix.scr.annotations.Service; | ||
| 15 | import org.onlab.onos.cluster.ClusterEvent; | 13 | import org.onlab.onos.cluster.ClusterEvent; |
| 16 | import org.onlab.onos.cluster.ClusterStore; | 14 | import org.onlab.onos.cluster.ClusterStore; |
| 17 | import org.onlab.onos.cluster.ClusterStoreDelegate; | 15 | import org.onlab.onos.cluster.ClusterStoreDelegate; |
| ... | @@ -37,8 +35,8 @@ import static org.onlab.packet.IpPrefix.valueOf; | ... | @@ -37,8 +35,8 @@ import static org.onlab.packet.IpPrefix.valueOf; |
| 37 | /** | 35 | /** |
| 38 | * Distributed implementation of the cluster nodes store. | 36 | * Distributed implementation of the cluster nodes store. |
| 39 | */ | 37 | */ |
| 40 | -@Component(immediate = true) | 38 | +//@Component(immediate = true) |
| 41 | -@Service | 39 | +//@Service |
| 42 | public class DistributedClusterStore | 40 | public class DistributedClusterStore |
| 43 | extends AbstractStore<ClusterEvent, ClusterStoreDelegate> | 41 | extends AbstractStore<ClusterEvent, ClusterStoreDelegate> |
| 44 | implements ClusterStore { | 42 | implements ClusterStore { | ... | ... |
| ... | @@ -12,7 +12,10 @@ import java.util.TimerTask; | ... | @@ -12,7 +12,10 @@ import java.util.TimerTask; |
| 12 | import org.apache.felix.scr.annotations.Activate; | 12 | import org.apache.felix.scr.annotations.Activate; |
| 13 | import org.apache.felix.scr.annotations.Component; | 13 | import org.apache.felix.scr.annotations.Component; |
| 14 | import org.apache.felix.scr.annotations.Deactivate; | 14 | import org.apache.felix.scr.annotations.Deactivate; |
| 15 | +import org.apache.felix.scr.annotations.Reference; | ||
| 16 | +import org.apache.felix.scr.annotations.ReferenceCardinality; | ||
| 15 | import org.apache.felix.scr.annotations.Service; | 17 | import org.apache.felix.scr.annotations.Service; |
| 18 | +import org.onlab.onos.cluster.ClusterService; | ||
| 16 | import org.onlab.onos.cluster.ControllerNode; | 19 | import org.onlab.onos.cluster.ControllerNode; |
| 17 | import org.onlab.onos.cluster.NodeId; | 20 | import org.onlab.onos.cluster.NodeId; |
| 18 | import org.onlab.onos.store.cluster.impl.ClusterMembershipEvent; | 21 | import org.onlab.onos.store.cluster.impl.ClusterMembershipEvent; |
| ... | @@ -42,6 +45,10 @@ public class ClusterCommunicationManager | ... | @@ -42,6 +45,10 @@ public class ClusterCommunicationManager |
| 42 | private final Logger log = LoggerFactory.getLogger(getClass()); | 45 | private final Logger log = LoggerFactory.getLogger(getClass()); |
| 43 | 46 | ||
| 44 | private ControllerNode localNode; | 47 | private ControllerNode localNode; |
| 48 | + | ||
| 49 | + @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) | ||
| 50 | + private ClusterService clusterService; | ||
| 51 | + | ||
| 45 | private ClusterNodesDelegate nodesDelegate; | 52 | private ClusterNodesDelegate nodesDelegate; |
| 46 | // FIXME: `members` should go away and should be using ClusterService | 53 | // FIXME: `members` should go away and should be using ClusterService |
| 47 | private Map<NodeId, ControllerNode> members = new HashMap<>(); | 54 | private Map<NodeId, ControllerNode> members = new HashMap<>(); |
| ... | @@ -65,6 +72,7 @@ public class ClusterCommunicationManager | ... | @@ -65,6 +72,7 @@ public class ClusterCommunicationManager |
| 65 | 72 | ||
| 66 | @Activate | 73 | @Activate |
| 67 | public void activate() { | 74 | public void activate() { |
| 75 | + localNode = clusterService.getLocalNode(); | ||
| 68 | messagingService = new NettyMessagingService(localNode.tcpPort()); | 76 | messagingService = new NettyMessagingService(localNode.tcpPort()); |
| 69 | log.info("Started"); | 77 | log.info("Started"); |
| 70 | } | 78 | } | ... | ... |
| ... | @@ -9,6 +9,12 @@ | ... | @@ -9,6 +9,12 @@ |
| 9 | <bundle>mvn:org.apache.commons/commons-lang3/3.3.2</bundle> | 9 | <bundle>mvn:org.apache.commons/commons-lang3/3.3.2</bundle> |
| 10 | <bundle>mvn:com.google.guava/guava/18.0</bundle> | 10 | <bundle>mvn:com.google.guava/guava/18.0</bundle> |
| 11 | <bundle>mvn:io.netty/netty/3.9.2.Final</bundle> | 11 | <bundle>mvn:io.netty/netty/3.9.2.Final</bundle> |
| 12 | + <bundle>mvn:io.netty/netty-common/4.0.23.Final</bundle> | ||
| 13 | + <bundle>mvn:io.netty/netty-buffer/4.0.23.Final</bundle> | ||
| 14 | + <bundle>mvn:io.netty/netty-transport/4.0.23.Final</bundle> | ||
| 15 | + <bundle>mvn:io.netty/netty-handler/4.0.23.Final</bundle> | ||
| 16 | + <bundle>mvn:io.netty/netty-codec/4.0.23.Final</bundle> | ||
| 17 | + <bundle>mvn:commons-pool/commons-pool/1.6</bundle> | ||
| 12 | 18 | ||
| 13 | <bundle>mvn:com.hazelcast/hazelcast/3.3</bundle> | 19 | <bundle>mvn:com.hazelcast/hazelcast/3.3</bundle> |
| 14 | <bundle>mvn:io.dropwizard.metrics/metrics-core/3.1.0</bundle> | 20 | <bundle>mvn:io.dropwizard.metrics/metrics-core/3.1.0</bundle> |
| ... | @@ -55,6 +61,9 @@ | ... | @@ -55,6 +61,9 @@ |
| 55 | <bundle>mvn:org.onlab.onos/onos-core-dist/1.0.0-SNAPSHOT</bundle> | 61 | <bundle>mvn:org.onlab.onos/onos-core-dist/1.0.0-SNAPSHOT</bundle> |
| 56 | <bundle>mvn:org.onlab.onos/onos-core-serializers/1.0.0-SNAPSHOT</bundle> | 62 | <bundle>mvn:org.onlab.onos/onos-core-serializers/1.0.0-SNAPSHOT</bundle> |
| 57 | <bundle>mvn:org.onlab.onos/onlab-netty/1.0.0-SNAPSHOT</bundle> | 63 | <bundle>mvn:org.onlab.onos/onlab-netty/1.0.0-SNAPSHOT</bundle> |
| 64 | + | ||
| 65 | + <bundle>mvn:org.onlab.onos/onos-core-hz-common/1.0.0-SNAPSHOT</bundle> | ||
| 66 | + <bundle>mvn:org.onlab.onos/onos-core-hz-cluster/1.0.0-SNAPSHOT</bundle> | ||
| 58 | </feature> | 67 | </feature> |
| 59 | 68 | ||
| 60 | <feature name="onos-core-hazelcast" version="1.0.0" | 69 | <feature name="onos-core-hazelcast" version="1.0.0" | ... | ... |
-
Please register or login to post a comment