elek opened a new pull request #745: HDDS-3315. Use EventQueue for delayed/immediate safe mode notifications URL: https://github.com/apache/hadoop-ozone/pull/745 SCM is built from loosely coupled components which communicate with async event with each other. Using the same abstraction (EventQueue) has the benefit that we can use the same visibility / testing tools such as the 'ozone insight' definition (which makes visible all the messages) or the test handler (which can wait until all the event queue messages are processed) During the review of HDDS-3221 it was suggested (by me) to use the EventQueue instead of the new SafeModeNotification interface. There was only one counter argument against it: > I personally find the event queue logic hard to follow due to its async nature (you cannot just follow method calls in the IDE). Its not bad, but more difficult when you don't yet understand it, while registering some instances to be notified is easy to follow in an IDE. This is of course a subjective opinion I respect this opinion, but I think it's better to use one abstraction and a consistent architecture inside one component (together with all the existing limitations). The EventQueue is not the only one possible solution, but an existing one. We can either design and switch to a new one or use the existing one. In this patch I would like to show how the previous listener interface can be replaced by the EventQueue. It (hopefully) shows that this is not complex, and in fact can help us to decouple different component from each other ## What changes were proposed in this pull request? ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-3315 ## How was this patch tested? With the existing unit test.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
