Trivial logging change

Change-Id: I8166b5cb886c16b30ad28886a000525ab2059943

Enabling Raft based device mastership store

Change-Id: Ide4dc559aa241ec2f3fa587701f6f32ba6856218
diff --git a/cli/src/main/java/org/onosproject/cli/net/LeaderCommand.java b/cli/src/main/java/org/onosproject/cli/net/LeaderCommand.java
index 36ba9cc..da4ab13 100644
--- a/cli/src/main/java/org/onosproject/cli/net/LeaderCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/LeaderCommand.java
@@ -40,8 +40,8 @@
         description = "Finds the leader for particular topic.")
 public class LeaderCommand extends AbstractShellCommand {
 
-    private static final String FMT = "%-20s | %-15s | %-6s | %-10s |";
-    private static final String FMT_C = "%-20s | %-15s | %-19s |";
+    private static final String FMT = "%-30s | %-15s | %-6s | %-10s |";
+    private static final String FMT_C = "%-30s | %-15s | %-19s |";
     private boolean allTopics;
     private Pattern pattern;
 
@@ -77,9 +77,9 @@
      * @param leaderBoard map of leaders
      */
     private void displayLeaders(Map<String, Leadership> leaderBoard) {
-        print("--------------------------------------------------------------");
+        print("------------------------------------------------------------------------");
         print(FMT, "Topic", "Leader", "Epoch", "Elected");
-        print("--------------------------------------------------------------");
+        print("------------------------------------------------------------------------");
 
         leaderBoard.values()
                 .stream()
@@ -90,14 +90,14 @@
                         l.leader(),
                         l.epoch(),
                         Tools.timeAgo(l.electedTime())));
-        print("--------------------------------------------------------------");
+        print("------------------------------------------------------------------------");
     }
 
     private void displayCandidates(Map<String, Leadership> leaderBoard,
             Map<String, List<NodeId>> candidates) {
-        print("--------------------------------------------------------------");
+        print("------------------------------------------------------------------------");
         print(FMT_C, "Topic", "Leader", "Candidates");
-        print("--------------------------------------------------------------");
+        print("------------------------------------------------------------------------");
          candidates
                 .entrySet()
                 .stream()
@@ -116,7 +116,7 @@
                             list.subList(1, list.size()).forEach(n -> print(FMT_C, " ", " ", n));
                             print(FMT_C, " ", " ", " ");
                         });
-        print("--------------------------------------------------------------");
+         print("------------------------------------------------------------------------");
     }
 
     /**
diff --git a/core/store/dist/src/main/java/org/onosproject/store/core/impl/LogicalClockManager.java b/core/store/dist/src/main/java/org/onosproject/store/core/impl/LogicalClockManager.java
index 69a50f0..ccf0f32 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/core/impl/LogicalClockManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/core/impl/LogicalClockManager.java
@@ -36,12 +36,12 @@
                                       .withName(SYSTEM_LOGICAL_CLOCK_COUNTER_NAME)
                                       .withPartitionsDisabled()
                                       .build();
-        log.info("Started.");
+        log.info("Started");
     }
 
     @Deactivate
     public void deactivate() {
-        log.info("Stopped.");
+        log.info("Stopped");
     }
 
     @Override
diff --git a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
index bc31e08..5606c60 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
@@ -69,7 +69,7 @@
 /**
  * Implementation of the MastershipStore on top of Leadership Service.
  */
-@Component(immediate = true, enabled = false)
+@Component(immediate = true, enabled = true)
 @Service
 public class ConsistentDeviceMastershipStore
     extends AbstractStore<MastershipEvent, MastershipStoreDelegate>
@@ -95,9 +95,8 @@
             new MessageSubject("mastership-store-device-role-relinquish");
 
     private static final Pattern DEVICE_MASTERSHIP_TOPIC_PATTERN =
-            Pattern.compile("/devices/(.*)/mastership");
+            Pattern.compile("device:(.*)");
 
-    private static final long PEER_REQUEST_TIMEOUT_MS = 5000;
     private ExecutorService messageHandlingExecutor;
     private final LeadershipEventListener leadershipEventListener =
             new InternalDeviceMastershipEventListener();
@@ -345,7 +344,7 @@
     }
 
     private String createDeviceMastershipTopic(DeviceId deviceId) {
-        return "/devices/" + deviceId.toString() + "/mastership";
+        return String.format("device:%s", deviceId.toString());
     }
 
     private DeviceId extractDeviceIdFromTopic(String topic) {
diff --git a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/DistributedMastershipStore.java b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/DistributedMastershipStore.java
index 2db5dc4..b1e3ac2 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/DistributedMastershipStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/DistributedMastershipStore.java
@@ -60,7 +60,7 @@
  * Distributed implementation of the mastership store. The store is
  * responsible for the master selection process.
  */
-@Component(immediate = true)
+@Component(immediate = true, enabled = false)
 @Service
 public class DistributedMastershipStore
     extends AbstractHazelcastStore<MastershipEvent, MastershipStoreDelegate>