This is an automated email from the ASF dual-hosted git repository. spricoder pushed a commit to branch feature/memory_collect in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit d4c5d17902846827ae3e5db24dc492fbb477fa5f Author: spricoder <[email protected]> AuthorDate: Thu Jan 16 15:27:35 2025 +0800 Rename IoTDBRuntimeOutOfMemoryException to IoTDBMemoryException --- ...tOfMemoryException.java => IoTDBMemoryException.java} | 16 ++++++++-------- .../apache/iotdb/commons/memory/IoTDBMemoryManager.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBRuntimeOutOfMemoryException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryException.java similarity index 77% rename from iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBRuntimeOutOfMemoryException.java rename to iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryException.java index f9c1f34a298..0a4a1f89ea4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBRuntimeOutOfMemoryException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryException.java @@ -26,22 +26,22 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import java.util.Objects; -public class IoTDBRuntimeOutOfMemoryException extends RuntimeException { +public class IoTDBMemoryException extends RuntimeException { private final long timestamp; private static final long VERSION = 1L; - public IoTDBRuntimeOutOfMemoryException(final String message) { + public IoTDBMemoryException(final String message) { super(message); this.timestamp = System.currentTimeMillis(); } - public IoTDBRuntimeOutOfMemoryException(final String message, final long timeStamp) { + public IoTDBMemoryException(final String message, final long timeStamp) { super(message); this.timestamp = timeStamp; } - public IoTDBRuntimeOutOfMemoryException(final String message, final Throwable cause) { + public IoTDBMemoryException(final String message, final Throwable cause) { super(message, cause); this.timestamp = System.currentTimeMillis(); } @@ -52,9 +52,9 @@ public class IoTDBRuntimeOutOfMemoryException extends RuntimeException { @Override public boolean equals(Object obj) { - return obj instanceof IoTDBRuntimeOutOfMemoryException - && Objects.equals(getMessage(), ((IoTDBRuntimeOutOfMemoryException) obj).getMessage()) - && Objects.equals(getTimestamp(), ((IoTDBRuntimeOutOfMemoryException) obj).getTimestamp()); + return obj instanceof IoTDBMemoryException + && Objects.equals(getMessage(), ((IoTDBMemoryException) obj).getMessage()) + && Objects.equals(getTimestamp(), ((IoTDBMemoryException) obj).getTimestamp()); } @Override @@ -76,7 +76,7 @@ public class IoTDBRuntimeOutOfMemoryException extends RuntimeException { @Override public String toString() { - return "IoTDBRuntimeOutOfMemoryException{" + return "IoTDBMemoryException{" + "message='" + getMessage() + "', timestamp=" diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryManager.java index b7195355c0b..45c453ca571 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IoTDBMemoryManager.java @@ -70,7 +70,7 @@ public class IoTDBMemoryManager { } } - throw new IoTDBRuntimeOutOfMemoryException( + throw new IoTDBMemoryException( String.format( "forceAllocate: failed to allocate memory after %d retries, " + "total memory size %d bytes, used memory size %d bytes, "
