HDFS-16237.Record the BPServiceActor information that communicates with Standby. (#3479)

This commit is contained in:
jianghuazhu 2021-09-28 13:07:36 +08:00 committed by GitHub
parent 86e80752d1
commit 02993bc11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -813,7 +813,8 @@ private boolean processCommandFromStandby(DatanodeCommand cmd,
BPServiceActor actor) throws IOException { BPServiceActor actor) throws IOException {
switch(cmd.getAction()) { switch(cmd.getAction()) {
case DatanodeProtocol.DNA_ACCESSKEYUPDATE: case DatanodeProtocol.DNA_ACCESSKEYUPDATE:
LOG.info("DatanodeCommand action from standby: DNA_ACCESSKEYUPDATE"); LOG.info("DatanodeCommand action from standby NN {}: DNA_ACCESSKEYUPDATE",
actor.getNNSocketAddress());
if (dn.isBlockTokenEnabled) { if (dn.isBlockTokenEnabled) {
dn.blockPoolTokenSecretManager.addKeys( dn.blockPoolTokenSecretManager.addKeys(
getBlockPoolId(), getBlockPoolId(),
@ -829,10 +830,12 @@ private boolean processCommandFromStandby(DatanodeCommand cmd,
case DatanodeProtocol.DNA_CACHE: case DatanodeProtocol.DNA_CACHE:
case DatanodeProtocol.DNA_UNCACHE: case DatanodeProtocol.DNA_UNCACHE:
case DatanodeProtocol.DNA_ERASURE_CODING_RECONSTRUCTION: case DatanodeProtocol.DNA_ERASURE_CODING_RECONSTRUCTION:
LOG.warn("Got a command from standby NN - ignoring command:" + cmd.getAction()); LOG.warn("Got a command from standby NN {} - ignoring command: {}",
actor.getNNSocketAddress(), cmd.getAction());
break; break;
default: default:
LOG.warn("Unknown DatanodeCommand action: " + cmd.getAction()); LOG.warn("Unknown DatanodeCommand action: {} from standby NN {}",
cmd.getAction(), actor.getNNSocketAddress());
} }
return true; return true;
} }