Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/928#discussion_r143331950
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/rm/DistributedQueryQueue.java
---
@@ -165,12 +165,24 @@ public ConfigSet(SystemOptionManager optionManager) {
minimumOperatorMemory =
optionManager.getOption(ExecConstants.MIN_MEMORY_PER_BUFFERED_OP);
}
- @Override
- public boolean equals(Object other) {
- if (other == null || ! (other instanceof ConfigSet)) {
- return false;
- }
- ConfigSet otherSet = (ConfigSet) other;
+ /**
+ * Determine if this config set is the same as another one. Detects
+ * whether the configuration has changed between one sync point and
+ * another.
+ * <p>
+ * Note that we cannot use <tt>equals()</tt> here as, according to
+ * Drill practice, <tt>equals()</tt> is for use in collections and
+ * must be accompanied by a <tt>hashCode()</tt> method. Since this
+ * class will never be used in a collection, and does not need a
+ * hash function, we cannot use <tt>equals()</tt>.
+ *
+ * @param otherSet another snapshot taken at another time
+ * @return true if this configuration is the same as another
+ * (no update between the two snapshots), false if the config has
+ * changed between the snapshots
+ */
+
+ public boolean isSameAs(ConfigSet otherSet) {
--- End diff --
This is definitely a compromise :) Thanks for making the changes.
---