moved Hazelcast based Mastership+Cluster store to onos-code-dist bundle
Change-Id: I304f916f3a400eaf050a5351825634349790e1bf
diff --git a/core/store/dist/pom.xml b/core/store/dist/pom.xml
index 6482729..7cb1a51 100644
--- a/core/store/dist/pom.xml
+++ b/core/store/dist/pom.xml
@@ -58,6 +58,10 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>hazelcast</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java
index 4dc67d4..f38df5a 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java
@@ -16,6 +16,7 @@
import java.util.Iterator;
import java.util.Set;
+//Not used right now
/**
* Allows for reading and writing cluster definition as a JSON file.
*/
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java
index 74c22f1..6ab594e 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java
@@ -2,6 +2,7 @@
import org.onlab.onos.store.cluster.messaging.MessageSubject;
+//Not used right now
public final class ClusterManagementMessageSubjects {
// avoid instantiation
private ClusterManagementMessageSubjects() {}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java
index 30b847f..1a65798 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java
@@ -2,6 +2,7 @@
import org.onlab.onos.cluster.ControllerNode;
+//Not used right now
/**
* Contains information that will be published when a cluster membership event occurs.
*/
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java
index cdfd145..07c6c31 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java
@@ -1,5 +1,6 @@
package org.onlab.onos.store.cluster.impl;
+//Not used right now
public enum ClusterMembershipEventType {
NEW_MEMBER,
LEAVING_MEMBER,
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java
index b82a835..daef7bd 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java
@@ -4,6 +4,7 @@
import org.onlab.onos.cluster.NodeId;
import org.onlab.packet.IpPrefix;
+// Not used right now
/**
* Simple back interface through which connection manager can interact with
* the cluster store.
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java
similarity index 96%
rename from core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java
index 61a7374..59267d1 100644
--- a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java
@@ -19,9 +19,9 @@
import org.onlab.onos.cluster.ControllerNode;
import org.onlab.onos.cluster.DefaultControllerNode;
import org.onlab.onos.cluster.NodeId;
-import org.onlab.onos.store.common.AbsentInvalidatingLoadingCache;
-import org.onlab.onos.store.common.AbstractHazelcastStore;
-import org.onlab.onos.store.common.OptionalCacheLoader;
+import org.onlab.onos.store.hz.AbsentInvalidatingLoadingCache;
+import org.onlab.onos.store.hz.AbstractHazelcastStore;
+import org.onlab.onos.store.hz.OptionalCacheLoader;
import org.onlab.packet.IpPrefix;
import java.util.Map;
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java.bak b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java.bak
deleted file mode 100644
index c781b23..0000000
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java.bak
+++ /dev/null
@@ -1,185 +0,0 @@
-package org.onlab.onos.store.cluster.impl;
-
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.RemovalListener;
-import com.google.common.cache.RemovalNotification;
-import com.google.common.collect.ImmutableSet;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.onlab.onos.cluster.ClusterEvent;
-import org.onlab.onos.cluster.ClusterStore;
-import org.onlab.onos.cluster.ClusterStoreDelegate;
-import org.onlab.onos.cluster.ControllerNode;
-import org.onlab.onos.cluster.DefaultControllerNode;
-import org.onlab.onos.cluster.NodeId;
-import org.onlab.onos.store.AbstractStore;
-import org.onlab.onos.store.cluster.messaging.ClusterCommunicationAdminService;
-import org.onlab.packet.IpPrefix;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-
-import static org.onlab.onos.cluster.ControllerNode.State;
-import static org.onlab.packet.IpPrefix.valueOf;
-
-/**
- * Distributed implementation of the cluster nodes store.
- */
-//@Component(immediate = true)
-//@Service
-public class DistributedClusterStore
- extends AbstractStore<ClusterEvent, ClusterStoreDelegate>
- implements ClusterStore {
-
- private final Logger log = LoggerFactory.getLogger(getClass());
-
- private DefaultControllerNode localNode;
- private final Map<NodeId, DefaultControllerNode> nodes = new ConcurrentHashMap<>();
- private final Map<NodeId, State> states = new ConcurrentHashMap<>();
- private final Cache<NodeId, ControllerNode> livenessCache = CacheBuilder.newBuilder()
- .maximumSize(1000)
- .expireAfterWrite(/*ClusterCommunicationManager.HEART_BEAT_INTERVAL_MILLIS * */3, TimeUnit.MILLISECONDS)
- .removalListener(new LivenessCacheRemovalListener()).build();
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- private ClusterCommunicationAdminService clusterCommunicationAdminService;
-
- private final ClusterNodesDelegate nodesDelegate = new InternalNodesDelegate();
-
- @Activate
- public void activate() throws IOException {
- loadClusterDefinition();
- establishSelfIdentity();
-
- // Start-up the comm service and prime it with the loaded nodes.
- clusterCommunicationAdminService.initialize(localNode, nodesDelegate);
- for (DefaultControllerNode node : nodes.values()) {
- clusterCommunicationAdminService.addNode(node);
- }
- log.info("Started");
- }
-
- @Deactivate
- public void deactivate() {
- log.info("Stopped");
- }
-
- /**
- * Loads the cluster definition file.
- */
- private void loadClusterDefinition() {
- ClusterDefinitionStore cds = new ClusterDefinitionStore("../config/cluster.json");
- try {
- Set<DefaultControllerNode> storedNodes = cds.read();
- for (DefaultControllerNode node : storedNodes) {
- nodes.put(node.id(), node);
- }
- } catch (IOException e) {
- log.error("Unable to read cluster definitions", e);
- }
- }
-
- /**
- * Determines who the local controller node is.
- */
- private void establishSelfIdentity() {
- // Establishes the controller's own identity.
- IpPrefix ip = valueOf(System.getProperty("onos.ip", "127.0.1.1"));
- localNode = nodes.get(new NodeId(ip.toString()));
-
- // As a fall-back, let's make sure we at least know who we are.
- if (localNode == null) {
- localNode = new DefaultControllerNode(new NodeId(ip.toString()), ip);
- nodes.put(localNode.id(), localNode);
- }
- states.put(localNode.id(), State.ACTIVE);
- }
-
- @Override
- public ControllerNode getLocalNode() {
- return localNode;
- }
-
- @Override
- public Set<ControllerNode> getNodes() {
- ImmutableSet.Builder<ControllerNode> builder = ImmutableSet.builder();
- return builder.addAll(nodes.values()).build();
- }
-
- @Override
- public ControllerNode getNode(NodeId nodeId) {
- return nodes.get(nodeId);
- }
-
- @Override
- public State getState(NodeId nodeId) {
- State state = states.get(nodeId);
- return state == null ? State.INACTIVE : state;
- }
-
- @Override
- public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) {
- DefaultControllerNode node = new DefaultControllerNode(nodeId, ip, tcpPort);
- nodes.put(nodeId, node);
- clusterCommunicationAdminService.addNode(node);
- return node;
- }
-
- @Override
- public void removeNode(NodeId nodeId) {
- if (nodeId.equals(localNode.id())) {
- nodes.clear();
- nodes.put(localNode.id(), localNode);
-
- } else {
- // Remove the other node.
- DefaultControllerNode node = nodes.remove(nodeId);
- if (node != null) {
- clusterCommunicationAdminService.removeNode(node);
- }
- }
- }
-
- // Entity to handle back calls from the connection manager.
- private class InternalNodesDelegate implements ClusterNodesDelegate {
- @Override
- public DefaultControllerNode nodeDetected(NodeId nodeId, IpPrefix ip, int tcpPort) {
- DefaultControllerNode node = nodes.get(nodeId);
- if (node == null) {
- node = (DefaultControllerNode) addNode(nodeId, ip, tcpPort);
- }
- states.put(nodeId, State.ACTIVE);
- livenessCache.put(nodeId, node);
- return node;
- }
-
- @Override
- public void nodeVanished(NodeId nodeId) {
- states.put(nodeId, State.INACTIVE);
- }
-
- @Override
- public void nodeRemoved(NodeId nodeId) {
- removeNode(nodeId);
- }
- }
-
- private class LivenessCacheRemovalListener implements RemovalListener<NodeId, ControllerNode> {
-
- @Override
- public void onRemoval(RemovalNotification<NodeId, ControllerNode> entry) {
- NodeId nodeId = entry.getKey();
- log.warn("Failed to receive heartbeats from controller: " + nodeId);
- nodesDelegate.nodeVanished(nodeId);
- }
- }
-}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java
index 8d273ac..9f36b88 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java
@@ -1,4 +1,4 @@
/**
- * Distributed cluster store and messaging subsystem implementation.
+ * Implementation of a distributed cluster node store using Hazelcast.
*/
package org.onlab.onos.store.cluster.impl;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbsentInvalidatingLoadingCache.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java
similarity index 97%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbsentInvalidatingLoadingCache.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java
index 4dd8669..8164467 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbsentInvalidatingLoadingCache.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbstractHazelcastStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java
similarity index 99%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbstractHazelcastStore.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java
index a22dd89..e42ec45 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/AbstractHazelcastStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import com.google.common.base.Optional;
import com.google.common.cache.LoadingCache;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/OptionalCacheLoader.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java
similarity index 96%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/OptionalCacheLoader.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java
index d5fc380..e555a51 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/OptionalCacheLoader.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import static com.google.common.base.Preconditions.checkNotNull;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/SMap.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java
similarity index 99%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/SMap.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java
index 6dd4bfb..16063ff 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/SMap.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import static com.google.common.base.Preconditions.checkNotNull;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java
similarity index 96%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreManager.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java
index f3bed7e..6674989 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreManager.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import com.hazelcast.config.Config;
import com.hazelcast.config.FileSystemXmlConfig;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreService.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java
similarity index 90%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreService.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java
index 8cc50c7..d79e51c 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/StoreService.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import com.hazelcast.core.HazelcastInstance;
diff --git a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java
similarity index 72%
rename from core/store/hz/common/src/main/java/org/onlab/onos/store/common/package-info.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java
index cf19812..d92f543 100644
--- a/core/store/hz/common/src/main/java/org/onlab/onos/store/common/package-info.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java
@@ -2,4 +2,4 @@
* Common abstractions and facilities for implementing distributed store
* using Hazelcast.
*/
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
similarity index 98%
rename from core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
index 1af5727..ecc8982 100644
--- a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
@@ -20,8 +20,8 @@
import org.onlab.onos.mastership.MastershipTerm;
import org.onlab.onos.net.DeviceId;
import org.onlab.onos.net.MastershipRole;
-import org.onlab.onos.store.common.AbstractHazelcastStore;
-import org.onlab.onos.store.common.SMap;
+import org.onlab.onos.store.hz.AbstractHazelcastStore;
+import org.onlab.onos.store.hz.SMap;
import org.onlab.onos.store.serializers.KryoNamespaces;
import org.onlab.onos.store.serializers.KryoSerializer;
import org.onlab.util.KryoNamespace;
@@ -31,6 +31,7 @@
import com.hazelcast.core.EntryListener;
import com.hazelcast.core.IAtomicLong;
import com.hazelcast.core.MapEvent;
+
import static org.onlab.onos.net.MastershipRole.*;
/**
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java
similarity index 100%
rename from core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java
similarity index 100%
rename from core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java
similarity index 100%
rename from core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java
rename to core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java
diff --git a/core/store/hz/common/src/test/java/org/onlab/onos/store/common/TestStoreManager.java b/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java
similarity index 97%
rename from core/store/hz/common/src/test/java/org/onlab/onos/store/common/TestStoreManager.java
rename to core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java
index f4cd4b8..0740e4e 100644
--- a/core/store/hz/common/src/test/java/org/onlab/onos/store/common/TestStoreManager.java
+++ b/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java
@@ -1,4 +1,4 @@
-package org.onlab.onos.store.common;
+package org.onlab.onos.store.hz;
import java.io.FileNotFoundException;
import java.util.UUID;
diff --git a/core/store/hz/cluster/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java
similarity index 98%
rename from core/store/hz/cluster/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java
rename to core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java
index c5daf6c..4ecb8db 100644
--- a/core/store/hz/cluster/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java
+++ b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java
@@ -28,9 +28,9 @@
import org.onlab.onos.mastership.MastershipEvent.Type;
import org.onlab.onos.net.DeviceId;
import org.onlab.onos.net.MastershipRole;
-import org.onlab.onos.store.common.StoreManager;
-import org.onlab.onos.store.common.StoreService;
-import org.onlab.onos.store.common.TestStoreManager;
+import org.onlab.onos.store.hz.StoreManager;
+import org.onlab.onos.store.hz.StoreService;
+import org.onlab.onos.store.hz.TestStoreManager;
import org.onlab.onos.store.serializers.KryoSerializer;
import org.onlab.packet.IpPrefix;
diff --git a/core/store/hz/cluster/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java
similarity index 100%
rename from core/store/hz/cluster/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java
rename to core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java
diff --git a/core/store/hz/cluster/pom.xml b/core/store/hz/cluster/pom.xml
deleted file mode 100644
index 4ab347e..0000000
--- a/core/store/hz/cluster/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-hz</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>onos-core-hz-cluster</artifactId>
- <packaging>bundle</packaging>
-
- <description>ONOS Hazelcast based distributed store subsystems</description>
-
- <dependencies>
- <dependency>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-serializers</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-hz-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-hz-common</artifactId>
- <classifier>tests</classifier>
- <scope>test</scope>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java b/core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java
deleted file mode 100644
index 9f36b88..0000000
--- a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * Implementation of a distributed cluster node store using Hazelcast.
- */
-package org.onlab.onos.store.cluster.impl;
diff --git a/core/store/hz/common/pom.xml b/core/store/hz/common/pom.xml
deleted file mode 100644
index a4ff179..0000000
--- a/core/store/hz/common/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-hz</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>onos-core-hz-common</artifactId>
- <packaging>bundle</packaging>
-
- <description>ONOS Hazelcast based distributed store subsystems</description>
-
- <dependencies>
- <dependency>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-serializers</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/core/store/hz/pom.xml b/core/store/hz/pom.xml
deleted file mode 100644
index dae40d4..0000000
--- a/core/store/hz/pom.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onlab.onos</groupId>
- <artifactId>onos-core-store</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>onos-core-hz</artifactId>
- <packaging>pom</packaging>
-
- <description>ONOS Core Hazelcast Store subsystem</description>
-
- <modules>
- <module>common</module>
- <module>cluster</module>
- </modules>
-
- <dependencies>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast</artifactId>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/core/store/pom.xml b/core/store/pom.xml
index 47e3162..6876b24 100644
--- a/core/store/pom.xml
+++ b/core/store/pom.xml
@@ -19,7 +19,6 @@
<modules>
<module>trivial</module>
<module>dist</module>
- <module>hz</module>
<module>serializers</module>
</modules>
diff --git a/features/features.xml b/features/features.xml
index be9110b..7309702 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -87,9 +87,6 @@
<bundle>mvn:org.onlab.onos/onos-core-dist/1.0.0-SNAPSHOT</bundle>
<bundle>mvn:org.onlab.onos/onos-core-serializers/1.0.0-SNAPSHOT</bundle>
<bundle>mvn:org.onlab.onos/onlab-netty/1.0.0-SNAPSHOT</bundle>
-
- <bundle>mvn:org.onlab.onos/onos-core-hz-common/1.0.0-SNAPSHOT</bundle>
- <bundle>mvn:org.onlab.onos/onos-core-hz-cluster/1.0.0-SNAPSHOT</bundle>
</feature>
<feature name="onos-core-trivial" version="1.0.0"