[
https://issues.apache.org/jira/browse/HDDS-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587936#comment-16587936
]
Nanda kumar commented on HDDS-297:
----------------------------------
Thanks [~msingh] for working on this. Overall the patch looks very good to me.
*ContainerMapping.java*
handlePipelineClose: Shouldn't we trigger close container on all the containers
in the pipeline before calling {{finalizePipeline}} on the pipeline?
*PipelineSelector.java*
Add a log message may be, at DEBUG level when we realize that the pipeline is
already in closing/closed state.
If the pipeline is in closing/closed state, it has already been finalized. So
we can move {{"manager.finalizePipeline(pipeline)"}} call (line 327) after the
{{if}} condition check.
In {{closePipelineIfNoOpenContainers}}, shouldn't we send close pipeline
command to Datanode and wait for command status before marking the pipeline as
closed? (This will be a big change, we can do it in a separate jira)
*MiniOzoneCluster.java*
Instead of having {{getHddsDatanodeIndexByDatanodeDetails}} and getting the
index to shutdown a datanode, we can overload {{shutdownHddsDatanode}} method
which can take DatanodeDetails instead of index and shuts down the datanode. We
can throw exception if a hdds datanode for the given datanodeDetails is not
found.
*OzoneConfigKeys.java and ScmConfigKeys.java*
We have to properly segregate the config keys and put them in proper class
files. No need to do anything as part of this jira, we can do that later in a
separate jira.
*StorageContainerDatanodeProtocol.proto*
Why do we need {{replicationType}} as part of {{ClosePipelineInfo}}? We should
be able to identify a pipeline uniquely using pipelineId.
We can remove {{ClosePipelineInfo}} structure and add the content directly to
{{PipelineAction}}.
{code:java}
message PipelineActionsProto {
repeated PipelineAction pipelineActions = 1;
}
message PipelineAction {
enum Action {
CLOSE = 1;
}
enum Reason {
PIPELINE_FAILED = 1;
}
required PipelineID pipelineID = 1;
required Action action = 2;
optional Reason reason = 3;
optional string detailedReason = 4;
}
{code}
Add unit test for {{PipelineEventHandler}} and {{PipelineCloseHandler}}. This
can be done in separate follow-up jiras.
> Add pipeline actions in Ozone
> -----------------------------
>
> Key: HDDS-297
> URL: https://issues.apache.org/jira/browse/HDDS-297
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: SCM
> Reporter: Mukul Kumar Singh
> Assignee: Mukul Kumar Singh
> Priority: Major
> Fix For: 0.2.1
>
> Attachments: HDDS-297.001.patch, HDDS-297.002.patch,
> HDDS-297.003.patch
>
>
> Pipeline in Ozone are created out of a group of nodes depending upon the
> replication factor and type. These pipeline provide a transport protocol for
> data transfer.
> Inorder to detect any failure of pipeline, SCM should receive pipeline
> reports from Datanodes and process it to identify various raft rings.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]