Pavlin Radoslavov

Removed leftover "SDN-IP" from the log messages.

Change-Id: Ie9a9f75c577dc26912e512540433f1903a98acdd
...@@ -211,8 +211,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -211,8 +211,7 @@ public class HazelcastLeadershipService implements LeadershipService {
211 String topicHzId = "LeadershipService/" + topicName + "/topic"; 211 String topicHzId = "LeadershipService/" + topicName + "/topic";
212 leaderLock = storeService.getHazelcastInstance().getLock(lockHzId); 212 leaderLock = storeService.getHazelcastInstance().getLock(lockHzId);
213 213
214 - String threadPoolName = 214 + String threadPoolName = "leader-election-" + topicName + "-%d";
215 - "sdnip-leader-election-" + topicName + "-%d";
216 leaderElectionExecutor = Executors.newScheduledThreadPool(2, 215 leaderElectionExecutor = Executors.newScheduledThreadPool(2,
217 namedThreads(threadPoolName)); 216 namedThreads(threadPoolName));
218 217
...@@ -257,7 +256,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -257,7 +256,7 @@ public class HazelcastLeadershipService implements LeadershipService {
257 SERIALIZER.decode(message.getMessageObject()); 256 SERIALIZER.decode(message.getMessageObject());
258 NodeId eventLeaderId = leadershipEvent.subject().leader().id(); 257 NodeId eventLeaderId = leadershipEvent.subject().leader().id();
259 258
260 - log.debug("SDN-IP Leadership Event: time = {} type = {} event = {}", 259 + log.debug("Leadership Event: time = {} type = {} event = {}",
261 leadershipEvent.time(), leadershipEvent.type(), 260 leadershipEvent.time(), leadershipEvent.type(),
262 leadershipEvent); 261 leadershipEvent);
263 if (!leadershipEvent.subject().topic().equals(topicName)) { 262 if (!leadershipEvent.subject().topic().equals(topicName)) {
...@@ -344,7 +343,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -344,7 +343,7 @@ public class HazelcastLeadershipService implements LeadershipService {
344 try { 343 try {
345 Thread.sleep(LEADERSHIP_PERIODIC_INTERVAL_MS); 344 Thread.sleep(LEADERSHIP_PERIODIC_INTERVAL_MS);
346 } catch (InterruptedException e) { 345 } catch (InterruptedException e) {
347 - log.debug("SDN-IP Leader Election periodic thread interrupted"); 346 + log.debug("Leader Election periodic thread interrupted");
348 } 347 }
349 } 348 }
350 } 349 }
...@@ -360,7 +359,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -360,7 +359,7 @@ public class HazelcastLeadershipService implements LeadershipService {
360 // Try to acquire the lock and keep it until the instance is 359 // Try to acquire the lock and keep it until the instance is
361 // shutdown. 360 // shutdown.
362 // 361 //
363 - log.debug("SDN-IP Leader Election begin for topic {}", 362 + log.debug("Leader Election begin for topic {}",
364 topicName); 363 topicName);
365 try { 364 try {
366 // Block until it becomes the leader 365 // Block until it becomes the leader
...@@ -370,7 +369,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -370,7 +369,7 @@ public class HazelcastLeadershipService implements LeadershipService {
370 // Thread interrupted. Either shutdown or run for 369 // Thread interrupted. Either shutdown or run for
371 // re-election. 370 // re-election.
372 // 371 //
373 - log.debug("SDN-IP Election interrupted for topic {}", 372 + log.debug("Election interrupted for topic {}",
374 topicName); 373 topicName);
375 continue; 374 continue;
376 } 375 }
...@@ -379,7 +378,7 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -379,7 +378,7 @@ public class HazelcastLeadershipService implements LeadershipService {
379 // 378 //
380 // This instance is now the leader 379 // This instance is now the leader
381 // 380 //
382 - log.info("SDN-IP Leader Elected for topic {}", topicName); 381 + log.info("Leader Elected for topic {}", topicName);
383 leader = localNode; 382 leader = localNode;
384 leadershipEvent = new LeadershipEvent( 383 leadershipEvent = new LeadershipEvent(
385 LeadershipEvent.Type.LEADER_ELECTED, 384 LeadershipEvent.Type.LEADER_ELECTED,
...@@ -396,14 +395,13 @@ public class HazelcastLeadershipService implements LeadershipService { ...@@ -396,14 +395,13 @@ public class HazelcastLeadershipService implements LeadershipService {
396 // Thread interrupted. Either shutdown or run for 395 // Thread interrupted. Either shutdown or run for
397 // re-election. 396 // re-election.
398 // 397 //
399 - log.debug("SDN-IP Leader Interrupted for topic {}", 398 + log.debug("Leader Interrupted for topic {}",
400 topicName); 399 topicName);
401 } 400 }
402 401
403 synchronized (this) { 402 synchronized (this) {
404 // If we reach here, we should release the leadership 403 // If we reach here, we should release the leadership
405 - log.debug("SDN-IP Leader Lock Released for topic {}", 404 + log.debug("Leader Lock Released for topic {}", topicName);
406 - topicName);
407 if ((leader != null) && 405 if ((leader != null) &&
408 leader.id().equals(localNode.id())) { 406 leader.id().equals(localNode.id())) {
409 leader = null; 407 leader = null;
......