1) Fix bug with Master stopping trying to be Master after he losses it once

This commit is contained in:
cheddar 2013-06-07 14:14:58 -07:00
parent 67be515db6
commit a949f1672d
1 changed files with 8 additions and 2 deletions

View File

@ -57,6 +57,7 @@ import org.joda.time.DateTime;
import org.joda.time.Duration;
import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -473,6 +474,13 @@ public class DruidMaster
stopBeingMaster();
try {
leaderLatch.get().close();
}
catch (IOException e) {
log.warn(e, "Unable to close leaderLatch, ignoring");
}
started = false;
exec.shutdownNow();
@ -558,8 +566,6 @@ public class DruidMaster
try {
log.info("I am no longer the master...");
leaderLatch.get().close();
for (String server : loadManagementPeons.keySet()) {
LoadQueuePeon peon = loadManagementPeons.remove(server);
peon.stop();