HDFS-15111. stopStandbyServices() should log which service state it is transitioning from. Contributed by Xieming Li.
This commit is contained in:
parent
209630472a
commit
033a3d7ff9
@ -97,6 +97,7 @@
|
|||||||
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY;
|
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY;
|
||||||
import static org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.*;
|
import static org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.*;
|
||||||
import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.ACTIVE;
|
import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.ACTIVE;
|
||||||
|
import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.STANDBY;
|
||||||
import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.OBSERVER;
|
import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.OBSERVER;
|
||||||
|
|
||||||
import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyInfo;
|
import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyInfo;
|
||||||
@ -1495,7 +1496,8 @@ void prepareToStopStandbyServices() throws ServiceFailedException {
|
|||||||
|
|
||||||
/** Stop services required in standby state */
|
/** Stop services required in standby state */
|
||||||
void stopStandbyServices() throws IOException {
|
void stopStandbyServices() throws IOException {
|
||||||
LOG.info("Stopping services started for standby state");
|
HAServiceState curState = getState() == OBSERVER? OBSERVER : STANDBY;
|
||||||
|
LOG.info("Stopping services started for {} state", curState);
|
||||||
if (standbyCheckpointer != null) {
|
if (standbyCheckpointer != null) {
|
||||||
standbyCheckpointer.stop();
|
standbyCheckpointer.stop();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user