You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/05/07 14:42:22 UTC
[incubator-iotdb] branch master updated: [IOTDB-84]fix in proper
hashcode methods in processors (#169)
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 7675fc5 [IOTDB-84]fix in proper hashcode methods in processors (#169)
7675fc5 is described below
commit 7675fc53afe98398933153f84fefbdd3b3699790
Author: Jiang Tian <jt...@163.com>
AuthorDate: Tue May 7 22:42:18 2019 +0800
[IOTDB-84]fix in proper hashcode methods in processors (#169)
* fix in proper hashcode methods in processors
---
.../engine/bufferwrite/BufferWriteProcessor.java | 23 ++++-----------
.../db/engine/overflow/io/OverflowProcessor.java | 33 ++--------------------
2 files changed, 8 insertions(+), 48 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 f8ed671..1809cfb 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
@@ -536,27 +536,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(insertFilePath, that.insertFilePath);
+ return this == o;
}
@Override
public int hashCode() {
- return Objects.hash(super.hashCode(), baseDir, insertFilePath);
- }
-
- public String getInsertFilePath() {
- return insertFilePath;
+ return Objects.hash(super.hashCode());
}
@Override
@@ -564,6 +549,10 @@ public class BufferWriteProcessor extends Processor {
return "BufferWriteProcessor in " + insertFilePath;
}
+ public String getInsertFilePath() {
+ return insertFilePath;
+ }
+
public boolean isClosed() {
return isClosed;
}
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());
}
/**