Beyyes commented on code in PR #11464:
URL: https://github.com/apache/iotdb/pull/11464#discussion_r1390228450


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileID.java:
##########
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.storageengine.dataregion.tsfile;
+
+import static org.apache.iotdb.commons.conf.IoTDBConstant.FILE_NAME_SEPARATOR;
+import static org.apache.iotdb.tsfile.utils.FilePathUtils.splitTsFilePath;
+
+public class TsFileID {
+
+  public final int regionId;
+  public final long timePartitionId;
+  public final long fileVersion;
+  // high 32 bit is compaction level, low 32 bit is merge count
+  public final long compactionVersion;
+
+  public TsFileID() {
+    this.regionId = -1;
+    this.timePartitionId = -1;
+    this.fileVersion = -1;
+    this.compactionVersion = -1;
+  }
+
+  public TsFileID(int regionId, long timePartitionId, long fileVersion, long 
compactionVersion) {
+    this.regionId = regionId;
+    this.timePartitionId = timePartitionId;
+    this.fileVersion = fileVersion;
+    this.compactionVersion = compactionVersion;
+  }
+
+  public TsFileID(String tsFileAbsolutePath) {
+    int tmpRegionId = -1;
+    long tmpTimePartitionId = -1;
+    String[] pathSegments = splitTsFilePath(tsFileAbsolutePath);
+    int pathLength = pathSegments.length;
+    if (pathLength >= 3) {
+      try {
+        tmpRegionId = Integer.parseInt(pathSegments[pathLength - 3]);
+      } catch (NumberFormatException e) {
+        // ignore

Review Comment:
   add a log?



##########
iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TimeseriesMetadata.java:
##########
@@ -276,12 +279,25 @@ public void setChunkMetadataList(List<ChunkMetadata> 
chunkMetadataList) {
     this.chunkMetadataList = new ArrayList<>(chunkMetadataList);
   }
 
+  // it's only used for query cache, field chunkMetadataListBuffer and 
chunkMetadataLoader should
+  // always be null
+  public long getRetainedSizeInBytes() {

Review Comment:
   Does `statistics` need to be calculated?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to