HDFS-14923. Remove dead code from HealthMonitor. Contributed by Fei Hui.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org> (cherry picked from commit7be5508d9b
) (cherry picked from commit54d3e212bf
)
This commit is contained in:
parent
44ca2fe4db
commit
287fab6346
|
@ -134,19 +134,11 @@ public class HealthMonitor {
|
||||||
public void addCallback(Callback cb) {
|
public void addCallback(Callback cb) {
|
||||||
this.callbacks.add(cb);
|
this.callbacks.add(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeCallback(Callback cb) {
|
|
||||||
callbacks.remove(cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized void addServiceStateCallback(ServiceStateCallback cb) {
|
public synchronized void addServiceStateCallback(ServiceStateCallback cb) {
|
||||||
this.serviceStateCallbacks.add(cb);
|
this.serviceStateCallbacks.add(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void removeServiceStateCallback(ServiceStateCallback cb) {
|
|
||||||
serviceStateCallbacks.remove(cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
LOG.info("Stopping HealthMonitor thread");
|
LOG.info("Stopping HealthMonitor thread");
|
||||||
shouldRun = false;
|
shouldRun = false;
|
||||||
|
@ -258,11 +250,7 @@ public class HealthMonitor {
|
||||||
synchronized State getHealthState() {
|
synchronized State getHealthState() {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized HAServiceStatus getLastServiceStatus() {
|
|
||||||
return lastServiceState;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isAlive() {
|
boolean isAlive() {
|
||||||
return daemon.isAlive();
|
return daemon.isAlive();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue