mirror of https://github.com/apache/druid.git
DruidCoordinator: Leave the ServerInventoryView running when we lose leadership. (#3830)
This commit is contained in:
parent
229559b46a
commit
ce0049d8ff
|
@ -553,7 +553,6 @@ public class DruidCoordinator
|
||||||
leader = true;
|
leader = true;
|
||||||
metadataSegmentManager.start();
|
metadataSegmentManager.start();
|
||||||
metadataRuleManager.start();
|
metadataRuleManager.start();
|
||||||
serverInventoryView.start();
|
|
||||||
serviceAnnouncer.announce(self);
|
serviceAnnouncer.announce(self);
|
||||||
final int startingLeaderCounter = leaderCounter;
|
final int startingLeaderCounter = leaderCounter;
|
||||||
|
|
||||||
|
@ -635,7 +634,6 @@ public class DruidCoordinator
|
||||||
loadManagementPeons.clear();
|
loadManagementPeons.clear();
|
||||||
|
|
||||||
serviceAnnouncer.unannounce(self);
|
serviceAnnouncer.unannounce(self);
|
||||||
serverInventoryView.stop();
|
|
||||||
metadataRuleManager.stop();
|
metadataRuleManager.stop();
|
||||||
metadataSegmentManager.stop();
|
metadataSegmentManager.stop();
|
||||||
leader = false;
|
leader = false;
|
||||||
|
|
|
@ -304,13 +304,7 @@ public class DruidCoordinatorTest extends CuratorTestBase
|
||||||
EasyMock.expect(serverInventoryView.getInventory()).andReturn(
|
EasyMock.expect(serverInventoryView.getInventory()).andReturn(
|
||||||
ImmutableList.of(druidServer)
|
ImmutableList.of(druidServer)
|
||||||
).atLeastOnce();
|
).atLeastOnce();
|
||||||
serverInventoryView.start();
|
|
||||||
EasyMock.expectLastCall().atLeastOnce();
|
|
||||||
EasyMock.expect(serverInventoryView.isStarted()).andReturn(true).anyTimes();
|
EasyMock.expect(serverInventoryView.isStarted()).andReturn(true).anyTimes();
|
||||||
|
|
||||||
serverInventoryView.stop();
|
|
||||||
EasyMock.expectLastCall().once();
|
|
||||||
|
|
||||||
EasyMock.replay(serverInventoryView);
|
EasyMock.replay(serverInventoryView);
|
||||||
|
|
||||||
coordinator.start();
|
coordinator.start();
|
||||||
|
|
Loading…
Reference in New Issue