DruidCoordinator: Leave the ServerInventoryView running when we lose leadership. (#3830)

This commit is contained in:
Gian Merlino 2017-01-08 23:06:05 -08:00 committed by Nishant
parent 229559b46a
commit ce0049d8ff
2 changed files with 0 additions and 8 deletions

View File

@ -553,7 +553,6 @@ public class DruidCoordinator
leader = true;
metadataSegmentManager.start();
metadataRuleManager.start();
serverInventoryView.start();
serviceAnnouncer.announce(self);
final int startingLeaderCounter = leaderCounter;
@ -635,7 +634,6 @@ public class DruidCoordinator
loadManagementPeons.clear();
serviceAnnouncer.unannounce(self);
serverInventoryView.stop();
metadataRuleManager.stop();
metadataSegmentManager.stop();
leader = false;

View File

@ -304,13 +304,7 @@ public class DruidCoordinatorTest extends CuratorTestBase
EasyMock.expect(serverInventoryView.getInventory()).andReturn(
ImmutableList.of(druidServer)
).atLeastOnce();
serverInventoryView.start();
EasyMock.expectLastCall().atLeastOnce();
EasyMock.expect(serverInventoryView.isStarted()).andReturn(true).anyTimes();
serverInventoryView.stop();
EasyMock.expectLastCall().once();
EasyMock.replay(serverInventoryView);
coordinator.start();