[ https://issues.apache.org/jira/browse/HDDS-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16593257#comment-16593257 ]
Lokesh Jain commented on HDDS-325: ---------------------------------- {quote}I am not sure but I think in RetriableDatanodeEventWatcher.onTimeout we need to send the message to SCMEvents.DATANODE_COMMAND and not SCMEvents.RETRIABLE_DATANODE_COMMAND (A unit test would help to decide this question...) {quote} If we send DATANODE_COMMAND then this is never retried on timeout. Therefore I am firing the RETRIABLE_DATANODE_COMMAND. Although this will lead to infinite number of retries because currently we are not limiting the number of retries. {quote}Let's say we have two kind of commands : new CommandForDatanode<>(dnId, new DeleteBlocksCommand) new CommandForDatanode<>(dnId, new EatBananaCommand) Both could be sent to the SCMEvents.RETRIABLE_DATANODE_COMMAND for RetriableDatanodeEventWatcher (and for the scmNodeManager) and they could handle both of them. {quote} The problem is CMD_STATUS_REPORT is a collection of command status from the datanode. Each of these command status prevent timeout for specific events. Therefore we will need to watch either the events fired by CommandStatusReportHandler or if we watch CMD_STATUS_REPORT then we will need to change the event watcher logic for watching event which combines many replies. The problem I was mentioning occurred if we watch events fired by CommandStatusReportHandler. {quote}we can create a builder (EventHandler.watchEvents is almost like a builder). {quote} I like this idea. We can very easily separate start events and end events using a builder. Further we can create a way to add our own timeout or completion logic for such events rather than using a default one. With logic I mean we can provide a custom function which handles these events in event queue. This way we can easily handle CMD_STATUS_REPORT. I will upload another patch for handling other comments and try adding a unit test. I agree we do not need the watchEvents function for now and can do it as part of another Jira when required. > Add event watcher for delete blocks command > ------------------------------------------- > > Key: HDDS-325 > URL: https://issues.apache.org/jira/browse/HDDS-325 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Components: Ozone Datanode, SCM > Reporter: Lokesh Jain > Assignee: Lokesh Jain > Priority: Major > Fix For: 0.2.1 > > Attachments: HDDS-325.001.patch, HDDS-325.002.patch, > HDDS-325.003.patch, HDDS-325.004.patch, HDDS-325.005.patch > > > This Jira aims to add watcher for deleteBlocks command. It removes the > current rpc call required for datanode to send the acknowledgement for > deleteBlocks. -- 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