liyuheng55555 commented on code in PR #14436:
URL: https://github.com/apache/iotdb/pull/14436#discussion_r1887820720
##########
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:
maybe you mean merge API ?
--
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]