Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1821#discussion_r162264895
--- Diff:
core/src/main/java/org/apache/carbondata/events/OperationEventListener.java ---
@@ -19,13 +19,29 @@
/**
* Event listener interface which describes the possible events
*/
-public interface OperationEventListener {
+public abstract class OperationEventListener {
/**
* Called on a specified event occurrence
*
* @param event
* @param operationContext
*/
- void onEvent(Event event, OperationContext operationContext) throws
Exception;
+ protected abstract void onEvent(Event event, OperationContext
operationContext) throws Exception;
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof OperationEventListener)) {
+ return false;
+ }
+ return getComparisonName().equals(((OperationEventListener)
obj).getComparisonName());
+ }
+
+ private String getComparisonName() {
+ return getClass().getName();
+ }
+
+ @Override public int hashCode() {
--- End diff --
move @Override to previous line
---