-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-2534. scmcli container delete not working #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,6 +563,20 @@ public Set<ContainerID> getContainers(DatanodeDetails datanodeDetails) | |
| return nodeStateManager.getContainers(datanodeDetails.getUuid()); | ||
| } | ||
|
|
||
| /** | ||
| * Remove set of containers available on a datanode. | ||
| * | ||
| * @param datanodeDetails - DatanodeID | ||
| * @param containerIds - Set of containerIDs | ||
| * @throws NodeNotFoundException - if datanode is not known. For new datanode | ||
| * use addDatanodeInContainerMap call. | ||
| */ | ||
| @Override | ||
| public void removeContainers(DatanodeDetails datanodeDetails, | ||
| Set<ContainerID> containerIds) throws NodeNotFoundException { | ||
| nodeStateManager.removeContainers(datanodeDetails.getUuid(), containerIds); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to remove the container from the pipelineContainerMap in SCMPipelineManager?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before delete a container, we should close it; When we close a container , The function SCMContainerManager#updateContainerState will remove the container from pipelineContainerMap in SCMPipelineManager. |
||
| } | ||
|
|
||
| // TODO: | ||
| // Since datanode commands are added through event queue, onMessage method | ||
| // should take care of adding commands to command queue. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fireEvent upon receive the scmcli request? Can we add some high level design description wrt the flow of the delete in the PR description? That will help the reviewers.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for @xiaoyuyao's description request. The delete container flow is quite important for Recon to work correctly and hence trying to understand this better. Will there be a case where a user will need to delete a container directly using SCM?