[ https://issues.apache.org/jira/browse/HDDS-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579741#comment-16579741 ]
Elek, Marton commented on HDDS-325: ----------------------------------- If I understood well (fix me, please, if I am wrong) this class does the same. Just send anything to the inputDestination and it will be sent to the realDestination with retry. {code} public class EventSupervisor<PAYLOAD extends IdentifiableEventPayload, COMPLETION_PAYLOAD extends IdentifiableEventPayload> implements EventHandler<PAYLOAD> { private final Event<PAYLOAD> realDestination; private final Event<PAYLOAD> inputDestination; private EventWatcher<PAYLOAD, COMPLETION_PAYLOAD> watcher; public EventSupervisor( Event<PAYLOAD> inputDestination, Event<PAYLOAD> realDestination, Event<COMPLETION_PAYLOAD> completionEvent, LeaseManager<Long> leaseManager) { this.realDestination = realDestination; this.inputDestination = inputDestination; this.watcher = new EventWatcher<PAYLOAD, COMPLETION_PAYLOAD>(inputDestination, completionEvent, leaseManager) { @Override protected void onTimeout(EventPublisher publisher, PAYLOAD payload) { publisher.fireEvent(realDestination, payload); } @Override protected void onFinished(EventPublisher publisher, PAYLOAD payload) { } }; } public void start(EventQueue queue) { queue.addHandler(inputDestination, this); watcher.start(queue); } @Override public void onMessage(PAYLOAD payload, EventPublisher publisher) { publisher.fireEvent(realDestination, payload); } } {code} > 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 > > > 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