You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by le...@apache.org on 2023/02/03 15:50:32 UTC
[iotdb] 12/28: add exception info
This is an automated email from the ASF dual-hosted git repository.
leirui pushed a commit to branch research/M4-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 189f84663ed86895439ce15785660822c37382b1
Author: Lei Rui <10...@qq.com>
AuthorDate: Fri Jan 27 16:09:09 2023 +0800
add exception info
---
.../iotdb/tsfile/file/metadata/statistics/StepRegress.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
index cb4c3450e7..ec981bd760 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
@@ -281,7 +281,7 @@ public class StepRegress {
}
segmentKeys.add(timestamps.getLast()); // tm
- checkOrder(segmentIntercepts);
+ checkOrder();
}
/**
@@ -289,19 +289,25 @@ public class StepRegress {
* even id should be monotonically decreasing, and intercepts with odd id should be monotonically
* increasing.
*/
- private void checkOrder(DoubleArrayList segmentIntercepts) throws IOException {
+ private void checkOrder() throws IOException {
double tiltIntercept = Double.MAX_VALUE;
double levelIntercept = Double.MIN_VALUE;
for (int i = 0; i < segmentIntercepts.size(); i++) {
double intercept = segmentIntercepts.get(i);
if (i % 2 == 0) {
if (intercept >= tiltIntercept) {
- throw new IOException(String.format("disorder of tilt intercepts!: i=%s", i));
+ throw new IOException(
+ String.format(
+ "disorder of tilt intercepts!: i=%s. Timestamps: %s, SegmentKeys: %s, SegmentIntercepts: %s",
+ i, timestamps, segmentKeys, segmentIntercepts));
}
tiltIntercept = intercept;
} else {
if (intercept <= levelIntercept) {
- throw new IOException(String.format("disorder of level intercepts!: i=%s", i));
+ throw new IOException(
+ String.format(
+ "disorder of level intercepts!: i=%s. Timestamps: %s, SegmentKeys: %s, SegmentIntercepts: %s",
+ i, timestamps, segmentKeys, segmentIntercepts));
}
levelIntercept = intercept;
}