Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
OneSizeFitsQuorum merged PR #11572: URL: https://github.com/apache/iotdb/pull/11572 -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1846591729 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1845280983 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
CRZbulabula commented on code in PR #11572: URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901924 ## iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocatorTest.java: ## @@ -0,0 +1,209 @@ +/* + * 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.confignode.manager.load.balancer.region; + +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId; +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType; +import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; +import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; +import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor; + +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.BitSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.atomic.AtomicInteger; + +public class GreedyCopySetRegionGroupAllocatorTest { + + private static final Logger LOGGER = + LoggerFactory.getLogger(GreedyCopySetRegionGroupAllocatorTest.class); + + private static final GreedyRegionGroupAllocator GREEDY_ALLOCATOR = + new GreedyRegionGroupAllocator(); + private static final GreedyCopySetRegionGroupAllocator GREEDY_COPY_SET_ALLOCATOR = + new GreedyCopySetRegionGroupAllocator(); + + private static final int TEST_DATA_NODE_NUM = 21; + private static final int DATA_REGION_PER_DATA_NODE = + (int) ConfigNodeDescriptor.getInstance().getConf().getDataRegionPerDataNode(); + private static final Map AVAILABLE_DATA_NODE_MAP = + new HashMap<>(); + private static final Map FREE_SPACE_MAP = new HashMap<>(); + + @BeforeClass + public static void setUp() { +// Construct 21 DataNodes +Random random = new Random(); +for (int i = 1; i <= TEST_DATA_NODE_NUM; i++) { + AVAILABLE_DATA_NODE_MAP.put( + i, new TDataNodeConfiguration().setLocation(new TDataNodeLocation().setDataNodeId(i))); + FREE_SPACE_MAP.put(i, random.nextDouble()); +} + } + + @Test + public void test2Factor() { +testRegionDistributionAndScatterWidth(2); + } + + @Test + public void test3Factor() { +testRegionDistributionAndScatterWidth(3); + } + + private void testRegionDistributionAndScatterWidth(int replicationFactor) { +final int dataRegionGroupNum = +DATA_REGION_PER_DATA_NODE * TEST_DATA_NODE_NUM / replicationFactor; + +/* Allocate DataRegionGroups */ +List greedyResult = new ArrayList<>(); +List greedyCopySetResult = new ArrayList<>(); +for (int index = 0; index < dataRegionGroupNum; index++) { + greedyResult.add( + GREEDY_ALLOCATOR.generateOptimalRegionReplicasDistribution( + AVAILABLE_DATA_NODE_MAP, + FREE_SPACE_MAP, + greedyResult, + replicationFactor, + new TConsensusGroupId(TConsensusGroupType.DataRegion, index))); + greedyCopySetResult.add( + GREEDY_COPY_SET_ALLOCATOR.generateOptimalRegionReplicasDistribution( + AVAILABLE_DATA_NODE_MAP, + FREE_SPACE_MAP, + greedyCopySetResult, + replicationFactor, + new TConsensusGroupId(TConsensusGroupType.DataRegion, index))); +} + +/* Statistics result */ +// Map for greedy algorithm +Map greedyRegionCounter = new HashMap<>(); Review Comment: Fixed ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RegionBalancer.java: ## @@ -147,6 +151,7 @@ private LoadManager getLoadManager() { public enum RegionGroupAllocatePolicy { COPY_SET, Review Comment: Fixed -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at:
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
CRZbulabula commented on code in PR #11572: URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901172 ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java: ## @@ -0,0 +1,183 @@ +/* + * 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.confignode.manager.load.balancer.region; + +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId; +import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; +import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** Allocate Region through Greedy and CopySet Algorithm. */ +public class GreedyCopySetRegionGroupAllocator implements IRegionGroupAllocator { + + int replicationFactor; + // RegionGroup allocation BitSet + private List allocatedBitSets; + // Map + private Map regionCounter; + // Available DataNodeIds + private Integer[] dataNodeIds; + + // First Key: the sum of Regions at the DataNodes in the allocation result is minimal + int optimalRegionSum; + // Second Key: the sum of intersected Regions with other allocated RegionGroups is minimal + int optimalIntersectionSum; + List optimalReplicaSets; + + public GreedyCopySetRegionGroupAllocator() { +// Empty constructor + } + + @Override + public TRegionReplicaSet generateOptimalRegionReplicasDistribution( + Map availableDataNodeMap, + Map freeDiskSpaceMap, + List allocatedRegionGroups, + int replicationFactor, + TConsensusGroupId consensusGroupId) { + +prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups); +dfs(-1, 0, new Integer[replicationFactor], 0, 0); + +// Randomly pick one optimal plan as result +Collections.shuffle(optimalReplicaSets); +Integer[] optimalReplicaSet = optimalReplicaSets.get(0); +TRegionReplicaSet result = new TRegionReplicaSet(); +result.setRegionId(consensusGroupId); +for (int i = 0; i < replicationFactor; i++) { + result.addToDataNodeLocations(availableDataNodeMap.get(optimalReplicaSet[i]).getLocation()); +} +return result; + } + + /** + * Prepare some statistics before dfs. + * + * @param replicationFactor replication factor in the cluster + * @param availableDataNodeMap currently available DataNodes, ensure size() >= replicationFactor + * @param allocatedRegionGroups already allocated RegionGroups in the cluster + */ + private void prepare( + int replicationFactor, + Map availableDataNodeMap, + List allocatedRegionGroups) { + +this.replicationFactor = replicationFactor; +int maxDataNodeId = availableDataNodeMap.keySet().stream().max(Integer::compareTo).orElse(0); +for (TRegionReplicaSet regionReplicaSet : allocatedRegionGroups) { + for (TDataNodeLocation dataNodeLocation : regionReplicaSet.getDataNodeLocations()) { +// Store the maximum DataNodeId in this algorithm loop +maxDataNodeId = Math.max(maxDataNodeId, dataNodeLocation.getDataNodeId()); + } +} + +// Convert the allocatedRegionGroups into allocatedBitSets, +// where a true in BitSet corresponding to a DataNodeId in the RegionGroup +allocatedBitSets = new ArrayList<>(); Review Comment: Fixed -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
CRZbulabula commented on code in PR #11572: URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901541 ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java: ## @@ -0,0 +1,183 @@ +/* + * 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.confignode.manager.load.balancer.region; + +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId; +import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; +import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** Allocate Region through Greedy and CopySet Algorithm. */ +public class GreedyCopySetRegionGroupAllocator implements IRegionGroupAllocator { + + int replicationFactor; + // RegionGroup allocation BitSet + private List allocatedBitSets; + // Map + private Map regionCounter; Review Comment: Fixed ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java: ## @@ -0,0 +1,183 @@ +/* + * 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.confignode.manager.load.balancer.region; + +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId; +import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; +import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** Allocate Region through Greedy and CopySet Algorithm. */ +public class GreedyCopySetRegionGroupAllocator implements IRegionGroupAllocator { + + int replicationFactor; + // RegionGroup allocation BitSet + private List allocatedBitSets; + // Map + private Map regionCounter; + // Available DataNodeIds + private Integer[] dataNodeIds; + + // First Key: the sum of Regions at the DataNodes in the allocation result is minimal + int optimalRegionSum; + // Second Key: the sum of intersected Regions with other allocated RegionGroups is minimal + int optimalIntersectionSum; + List optimalReplicaSets; + + public GreedyCopySetRegionGroupAllocator() { +// Empty constructor + } + + @Override + public TRegionReplicaSet generateOptimalRegionReplicasDistribution( + Map availableDataNodeMap, + Map freeDiskSpaceMap, + List allocatedRegionGroups, + int replicationFactor, + TConsensusGroupId consensusGroupId) { + +prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups); +dfs(-1, 0, new Integer[replicationFactor], 0, 0); + +// Randomly pick one optimal plan as result +Collections.shuffle(optimalReplicaSets); +Integer[] optimalReplicaSet = optimalReplicaSets.get(0); +TRegionReplicaSet result = new TRegionReplicaSet(); +result.setRegionId(consensusGroupId); +for (int i = 0; i < replicationFactor; i++) { +
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
OneSizeFitsQuorum commented on code in PR #11572: URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418307084 ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java: ## @@ -0,0 +1,183 @@ +/* + * 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.confignode.manager.load.balancer.region; + +import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId; +import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; +import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** Allocate Region through Greedy and CopySet Algorithm. */ +public class GreedyCopySetRegionGroupAllocator implements IRegionGroupAllocator { + + int replicationFactor; + // RegionGroup allocation BitSet + private List allocatedBitSets; + // Map + private Map regionCounter; + // Available DataNodeIds + private Integer[] dataNodeIds; + + // First Key: the sum of Regions at the DataNodes in the allocation result is minimal + int optimalRegionSum; + // Second Key: the sum of intersected Regions with other allocated RegionGroups is minimal + int optimalIntersectionSum; + List optimalReplicaSets; + + public GreedyCopySetRegionGroupAllocator() { +// Empty constructor + } + + @Override + public TRegionReplicaSet generateOptimalRegionReplicasDistribution( + Map availableDataNodeMap, + Map freeDiskSpaceMap, + List allocatedRegionGroups, + int replicationFactor, + TConsensusGroupId consensusGroupId) { + +prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups); +dfs(-1, 0, new Integer[replicationFactor], 0, 0); + +// Randomly pick one optimal plan as result +Collections.shuffle(optimalReplicaSets); +Integer[] optimalReplicaSet = optimalReplicaSets.get(0); +TRegionReplicaSet result = new TRegionReplicaSet(); +result.setRegionId(consensusGroupId); +for (int i = 0; i < replicationFactor; i++) { + result.addToDataNodeLocations(availableDataNodeMap.get(optimalReplicaSet[i]).getLocation()); +} +return result; + } + + /** + * Prepare some statistics before dfs. + * + * @param replicationFactor replication factor in the cluster + * @param availableDataNodeMap currently available DataNodes, ensure size() >= replicationFactor + * @param allocatedRegionGroups already allocated RegionGroups in the cluster + */ + private void prepare( + int replicationFactor, + Map availableDataNodeMap, + List allocatedRegionGroups) { + +this.replicationFactor = replicationFactor; +int maxDataNodeId = availableDataNodeMap.keySet().stream().max(Integer::compareTo).orElse(0); +for (TRegionReplicaSet regionReplicaSet : allocatedRegionGroups) { + for (TDataNodeLocation dataNodeLocation : regionReplicaSet.getDataNodeLocations()) { +// Store the maximum DataNodeId in this algorithm loop +maxDataNodeId = Math.max(maxDataNodeId, dataNodeLocation.getDataNodeId()); + } +} + +// Convert the allocatedRegionGroups into allocatedBitSets, +// where a true in BitSet corresponding to a DataNodeId in the RegionGroup +allocatedBitSets = new ArrayList<>(); Review Comment: allocatedRegionGroups.size() ## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java: ## @@ -0,0 +1,183 @@ +/* + * 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 + * + *
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1842934469 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1840265679 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1817760656 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
codecov-commenter commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1817747230 ## [Codecov](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) Report Attention: `33 lines` in your changes are missing coverage. Please review. > Comparison is base [(`8548f4c`)](https://app.codecov.io/gh/apache/iotdb/commit/8548f4c3edb3d348db7a197a5fed4eade2a23066?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 49.12% compared to head [(`2e6e970`)](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 49.14%. > Report is 2 commits behind head on master. | [Files](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | Patch % | Lines | |---|---|---| | [...otocol/thrift/async/IoTDBThriftAsyncConnector.java](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcGlwZS9jb25uZWN0b3IvcHJvdG9jb2wvdGhyaWZ0L2FzeW5jL0lvVERCVGhyaWZ0QXN5bmNDb25uZWN0b3IuamF2YQ==) | 0.00% | [26 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | | [...nnector/protocol/websocket/WebSocketConnector.java](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcGlwZS9jb25uZWN0b3IvcHJvdG9jb2wvd2Vic29ja2V0L1dlYlNvY2tldENvbm5lY3Rvci5qYXZh) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | | [...nfignode/manager/load/balancer/RegionBalancer.java](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9jb25maWdub2RlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9jb25maWdub2RlL21hbmFnZXIvbG9hZC9iYWxhbmNlci9SZWdpb25CYWxhbmNlci5qYXZh) | 50.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | | [...ndler/PipeTransferTsFileInsertionEventHandler.java](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcGlwZS9jb25uZWN0b3IvcHJvdG9jb2wvdGhyaWZ0L2FzeW5jL2hhbmRsZXIvUGlwZVRyYW5zZmVyVHNGaWxlSW5zZXJ0aW9uRXZlbnRIYW5kbGVyLmphdmE=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11572 +/- ## + Coverage 49.12% 49.14% +0.02% - Complexity2481624845 +29 Files 2789 2790 +1 Lines174548 174600 +52 Branches 2089620908 +12 + Hits 8575285814 +62 + Misses8879688786 -10 ``` [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/iotdb/pull/11572?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache). -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]
sonarcloud[bot] commented on PR #11572: URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1817740857 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [3 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org