bharatviswa504 commented on a change in pull request #558: HDDS-1217. Refactor
ChillMode rules and chillmode manager.
URL: https://github.com/apache/hadoop/pull/558#discussion_r263649428
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/chillmode/ChillModeExitRule.java
##########
@@ -17,16 +17,79 @@
*/
package org.apache.hadoop.hdds.scm.chillmode;
+import org.apache.hadoop.hdds.server.events.EventHandler;
+import org.apache.hadoop.hdds.server.events.EventPublisher;
+
+
/**
- * Interface for defining chill mode exit rules.
+ * Abstract class for ChillModeExitRules. When a new rule is added, the new
+ * rule should extend this abstract class.
+ *
+ * Each rule Should do:
+ * 1. Should add a handler for the event it is looking for during the
+ * initialization of the rule.
+ * 2. Add the rule in ScmChillModeManager to list of the rules.
+ *
*
* @param <T>
*/
-public interface ChillModeExitRule<T> {
Review comment:
Yes, it can be used but we don't want subclasses to implement this. So in
the next patch, I made this method as final in abstract class. This came up
when discussing with Nanda, so left this as an abstract class.
But your suggestion can be done, if we don't have such a requirement.
----------------------------------------------------------------
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]