OneSizeFitsQuorum commented on code in PR #14436:
URL: https://github.com/apache/iotdb/pull/14436#discussion_r1886332531


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/file/TsFileMetrics.java:
##########
@@ -433,6 +434,27 @@ private synchronized void updateRemainData(boolean seq) {
 
   // endregion
 
+  public Map<Integer, Long> getRegionSizeMap() {
+    Map<Integer, Long> regionSizeMap = new HashMap<>();
+    for (Map<String, Pair<Long, Gauge>> map : seqFileSizeMap.values()) {
+      for (Map.Entry<String, Pair<Long, Gauge>> regionSizeEntry : 
map.entrySet()) {
+        Integer regionId = Integer.parseInt(regionSizeEntry.getKey());
+        regionSizeMap.put(regionId, regionSizeEntry.getValue().getLeft());
+      }
+    }
+    for (Map<String, Pair<Long, Gauge>> map : unseqFileSizeMap.values()) {
+      for (Map.Entry<String, Pair<Long, Gauge>> regionSizeEntry : 
map.entrySet()) {
+        Integer regionId = Integer.parseInt(regionSizeEntry.getKey());
+        if (regionSizeMap.containsKey(regionId)) {

Review Comment:
   use compute API



##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java:
##########
@@ -161,6 +161,7 @@ private ColumnHeaderConstant() {
   public static final String START_TIME = "StartTime";
   public static final String ROLE = "Role";
   public static final String CREATE_TIME = "CreateTime";
+  public static final String TSFILE_SIZE = "TsfileSize";

Review Comment:
   TsFileSize



-- 
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