|
@@ -126,7 +126,7 @@ public class Leader {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- ServerSocket ss;
|
|
|
|
|
|
+ private final ServerSocket ss;
|
|
|
|
|
|
Leader(QuorumPeer self,LeaderZooKeeperServer zk) throws IOException {
|
|
Leader(QuorumPeer self,LeaderZooKeeperServer zk) throws IOException {
|
|
this.self = self;
|
|
this.self = self;
|
|
@@ -137,7 +137,7 @@ public class Leader {
|
|
+ self.getQuorumAddress().getPort(), e);
|
|
+ self.getQuorumAddress().getPort(), e);
|
|
throw e;
|
|
throw e;
|
|
}
|
|
}
|
|
- this.zk=zk;
|
|
|
|
|
|
+ this.zk = zk;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -306,6 +306,7 @@ public class Leader {
|
|
// Start thread that waits for connection requests from
|
|
// Start thread that waits for connection requests from
|
|
// new followers.
|
|
// new followers.
|
|
cnxAcceptor = new LearnerCnxAcceptor();
|
|
cnxAcceptor = new LearnerCnxAcceptor();
|
|
|
|
+ cnxAcceptor.setName("LearnerCnxAcceptor-" + ss.getLocalSocketAddress());
|
|
cnxAcceptor.start();
|
|
cnxAcceptor.start();
|
|
|
|
|
|
readyToStart = true;
|
|
readyToStart = true;
|