[ https://issues.apache.org/jira/browse/HDDS-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522675#comment-16522675 ]
Bharat Viswanadham commented on HDDS-173: ----------------------------------------- Hi [~hanishakoneru] Thanks for the patch. Few comments I have are: 1. This is added to ContainerCommandRequestProto, and it is only set during createContainer, optional ContainerType containerType = 20; This is used in HDDSDispatcher to send the request to specific handler. So, can we make default as KeyValueContainer, so that it is not needed to set for other requests? 2. Metrics intialization, I think this should be moved to Handler or same one should be passed to handler, so that metrics can be incremented. 3. Handler.java private Map<ContainerType, Handler> handlers; This variable is not intialized, i think we might get NPE when we add handlers. 4. In handleReadContainer, below code might return null, if containerId is not in map. So, we should null case. KeyValueContainer kvContainer = (KeyValueContainer) containerSet.getContainer(containerID); 5. I think above comment applicable for all other requests. Or the question is can these requests come before create Container? 6. In deletecontainer, we should delete the container from containerset container map. 7. Line 398: deleteChunk does not throw IOException, do we need this? Same comment applicable for other chunk related operations. 8. If we have containerType in ContainerCommandRequestProto, I think we don't need containerType in CreateContainerRequestProto. 9. In handleCreateContainer, do we need to check whether this container already exists before createContainer, by calling containerset.getContainer? 10. getFromProtoBuf in KeyValueContainerData, I think now we dont require this, as createCOntainer Request type is changed. > Refactor Dispatcher and implement Handler for new ContainerIO design > -------------------------------------------------------------------- > > Key: HDDS-173 > URL: https://issues.apache.org/jira/browse/HDDS-173 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Hanisha Koneru > Assignee: Hanisha Koneru > Priority: Major > Fix For: 0.2.1 > > Attachments: HDDS-173-HDDS-48.001.patch > > > Dispatcher will pass the ContainerCommandRequests to the corresponding > Handler based on the ContainerType. Each ContainerType will have its own > Handler. The Handler class will process the message. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org