You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/12/10 11:39:48 UTC

[incubator-iotdb] branch rel/0.9 updated: fix bug IOTDB-359 about TsFileSketchTool (#638)

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

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


The following commit(s) were added to refs/heads/rel/0.9 by this push:
     new 5c2e775  fix bug IOTDB-359 about TsFileSketchTool (#638)
5c2e775 is described below

commit 5c2e775fd72919e2af3e55e02596c5b94dcdf7b6
Author: Lei Rui <33...@users.noreply.github.com>
AuthorDate: Tue Dec 10 19:39:42 2019 +0800

    fix bug IOTDB-359 about TsFileSketchTool (#638)
---
 server/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java b/server/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java
index 1ee2db3..5371b01 100644
--- a/server/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java
+++ b/server/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.io.PrintWriter;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
 import java.util.stream.Collectors;
 import org.apache.iotdb.tsfile.common.conf.TSFileConfig;
@@ -78,7 +79,7 @@ public class TsFileSketchTool {
       chunkGroupMetaDataTmpList.addAll(deviceMetadata.getChunkGroupMetaDataList());
     }
     List<ChunkGroupMetaData> chunkGroupMetaDataSortedList = chunkGroupMetaDataTmpList.stream()
-        .sorted((x, y) -> (int) (x.getStartOffsetOfChunkGroup() - y.getStartOffsetOfChunkGroup()))
+        .sorted(Comparator.comparingLong(ChunkGroupMetaData::getStartOffsetOfChunkGroup))
         .collect(Collectors.toList());
 
     // begin print