HDDS-1832 : Improve logging for PipelineActions handling in SCM and datanode. (#1200)

This commit is contained in:
avijayanhwx 2019-08-02 10:01:00 -07:00 committed by bshashikant
parent 946e301731
commit 6e8c8413ee
2 changed files with 5 additions and 4 deletions

View File

@ -558,7 +558,7 @@ public final class XceiverServerRatis extends XceiverServer {
if (triggerHB) { if (triggerHB) {
context.getParent().triggerHeartbeat(); context.getParent().triggerHeartbeat();
} }
LOG.debug( LOG.info(
"pipeline Action " + action.getAction() + " on pipeline " + pipelineID "pipeline Action " + action.getAction() + " on pipeline " + pipelineID
+ ".Reason : " + action.getClosePipeline().getDetailedReason()); + ".Reason : " + action.getClosePipeline().getDetailedReason());
} }

View File

@ -57,9 +57,10 @@ public class PipelineActionHandler
pipelineID = PipelineID. pipelineID = PipelineID.
getFromProtobuf(action.getClosePipeline().getPipelineID()); getFromProtobuf(action.getClosePipeline().getPipelineID());
Pipeline pipeline = pipelineManager.getPipeline(pipelineID); Pipeline pipeline = pipelineManager.getPipeline(pipelineID);
LOG.info("Received pipeline action {} for {} from datanode {}", LOG.info("Received pipeline action {} for {} from datanode {}. " +
action.getAction(), pipeline, report.getDatanodeDetails()); "Reason : {}", action.getAction(), pipeline,
pipelineManager.finalizeAndDestroyPipeline(pipeline, true); report.getDatanodeDetails(),
action.getClosePipeline().getDetailedReason());
} catch (IOException ioe) { } catch (IOException ioe) {
LOG.error("Could not execute pipeline action={} pipeline={} {}", LOG.error("Could not execute pipeline action={} pipeline={} {}",
action, pipelineID, ioe); action, pipelineID, ioe);