You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2019/04/27 06:11:16 UTC

[incubator-iotdb] branch fix_hashcode created (now e6d6b82)

This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a change to branch fix_hashcode
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at e6d6b82  fix in proper hashcode methods in processors

This branch includes the following new commits:

     new e6d6b82  fix in proper hashcode methods in processors

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: fix in proper hashcode methods in processors

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch fix_hashcode
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit e6d6b82c8bc7569f9f38e238ccf1edb3da801928
Author: 江天 <jt...@163.com>
AuthorDate: Sat Apr 27 14:09:50 2019 +0800

    fix in proper hashcode methods in processors
---
 .../engine/bufferwrite/BufferWriteProcessor.java   | 15 ++--------
 .../db/engine/overflow/io/OverflowProcessor.java   | 33 ++--------------------
 2 files changed, 4 insertions(+), 44 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
index e770e85..98135ab 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
@@ -550,23 +550,12 @@ public class BufferWriteProcessor extends Processor {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    if (!super.equals(o)) {
-      return false;
-    }
-    BufferWriteProcessor that = (BufferWriteProcessor) o;
-    return Objects.equals(baseDir, that.baseDir) &&
-        Objects.equals(fileName, that.fileName);
+    return this == o;
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(super.hashCode(), baseDir, fileName);
+    return Objects.hash(super.hashCode());
   }
 
   @Override
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowProcessor.java
index 656932b..9905c46 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowProcessor.java
@@ -700,41 +700,12 @@ public class OverflowProcessor extends Processor {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    if (!super.equals(o)) {
-      return false;
-    }
-    OverflowProcessor that = (OverflowProcessor) o;
-    return isMerge == that.isMerge &&
-            valueCount == that.valueCount &&
-            lastFlushTime == that.lastFlushTime &&
-            memThreshold == that.memThreshold &&
-            Objects.equals(workResource, that.workResource) &&
-            Objects.equals(mergeResource, that.mergeResource) &&
-            Objects.equals(workSupport, that.workSupport) &&
-            Objects.equals(flushSupport, that.flushSupport) &&
-            Objects.equals(flushFuture, that.flushFuture) &&
-            Objects.equals(parentPath, that.parentPath) &&
-            Objects.equals(dataPathCount, that.dataPathCount) &&
-            Objects.equals(queryFlushLock, that.queryFlushLock) &&
-            Objects.equals(overflowFlushAction, that.overflowFlushAction) &&
-            Objects.equals(filenodeFlushAction, that.filenodeFlushAction) &&
-            Objects.equals(fileSchema, that.fileSchema) &&
-            Objects.equals(memSize, that.memSize) &&
-            Objects.equals(logNode, that.logNode);
+    return this == o;
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(super.hashCode(), workResource, mergeResource, workSupport,
-            flushSupport, flushFuture, isMerge, valueCount, parentPath, lastFlushTime,
-            dataPathCount, queryFlushLock, overflowFlushAction, filenodeFlushAction, fileSchema,
-            memThreshold, memSize, logNode, flushFuture);
+    return Objects.hash(super.hashCode());
   }
 
   /**