Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-23944 The method setClusterLoad of SimpleLoadBalancer is incorr… #1243

Merged
merged 1 commit into from
Mar 7, 2020

Conversation

nyl3532016
Copy link
Contributor

…ect when balance by table

@@ -402,13 +402,13 @@ protected void updateLoad(final Map<ServerName, ServerAndLoad> map,
return servers;
}

protected HashMap<TableName, TreeMap<ServerName, List<RegionInfo>>> mockClusterServersWithTables(Map<ServerName, List<RegionInfo>> clusterServers) {
HashMap<TableName, TreeMap<ServerName, List<RegionInfo>>> result = new HashMap<>();
protected Map<TableName, Map<ServerName, List<RegionInfo>>> mockClusterServersWithTables(Map<ServerName, List<RegionInfo>> clusterServers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change TreeMap to Map?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the return value of method mockClusterServersWithTables as clusterLoad
the extend feature of treeMap is no use , Map is enough

Map<TableName, Map<ServerName, List<RegionInfo>>> clusterLoad = new TreeMap<>();
Map<ServerName, List<RegionInfo>> clusterServers = mockUniformClusterServers(mockUniformCluster);
List<ServerAndLoad> clusterList = convertToList(clusterServers);
clusterLoad.put(TableName.valueOf(name.getMethodName()), clusterServers);
// use overall can achieve both table and cluster level balance
HashMap<TableName, TreeMap<ServerName, List<RegionInfo>>> result1 = mockClusterServersWithTables(clusterServers);
loadBalancer.setClusterLoad(clusterLoad);
Map<TableName, Map<ServerName, List<RegionInfo>>> result1 = mockClusterServersWithTables(clusterServers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference of results1 and clusterLoad is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clusterLoad's value is map (server to all region on it , whatever region's table), clusterLoad's key is no use
results1's value is map(server to region ,the region only belong to the key table), results1's key is actual tableName
in balance by table, we should use results1

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 7s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --findbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 7m 22s master passed
+1 💚 compile 1m 12s master passed
+1 💚 shadedjars 5m 35s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 42s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 7m 7s the patch passed
+1 💚 compile 1m 12s the patch passed
+1 💚 javac 1m 12s the patch passed
+1 💚 shadedjars 5m 27s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 41s hbase-server in the patch failed.
_ Other Tests _
-1 ❌ unit 6m 56s hbase-server in the patch failed.
38m 35s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1243
Optional Tests javac javadoc unit shadedjars compile
uname Linux 28df17da8449 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4ef326b
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/testReport/
Max. process+thread count 1099 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 50s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 6m 25s master passed
+1 💚 checkstyle 1m 19s master passed
+0 🆗 spotbugs 4m 53s Used deprecated FindBugs config; considering switching to SpotBugs.
-1 ❌ findbugs 3m 24s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 5m 47s the patch passed
-0 ⚠️ checkstyle 1m 19s hbase-server: The patch generated 8 new + 146 unchanged - 7 fixed = 154 total (was 153)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 19m 11s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
-1 ❌ findbugs 3m 21s hbase-server in the patch failed.
_ Other Tests _
+1 💚 asflicense 0m 14s The patch does not generate ASF License warnings.
50m 27s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1243
Optional Tests dupname asflicense spotbugs findbugs hadoopcheck hbaseanti checkstyle
uname Linux 16d57915a67b 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4ef326b
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-general-check/output/branch-findbugs-hbase-server.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-general-check/output/patch-findbugs-hbase-server.txt
Max. process+thread count 83 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 36s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --findbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 5m 49s master passed
+1 💚 compile 1m 0s master passed
+1 💚 shadedjars 4m 48s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 39s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 19s the patch passed
+1 💚 compile 1m 2s the patch passed
+1 💚 javac 1m 2s the patch passed
+1 💚 shadedjars 4m 49s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s the patch passed
_ Other Tests _
-1 ❌ unit 65m 11s hbase-server in the patch failed.
91m 56s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1243
Optional Tests javac javadoc unit shadedjars compile
uname Linux a3c5e8f11540 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4ef326b
Default Java 1.8.0_232
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/artifact/yetus-jdk8-hadoop2-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/testReport/
Max. process+thread count 8270 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 6m 13s master passed
+1 💚 checkstyle 1m 16s master passed
+0 🆗 spotbugs 4m 44s Used deprecated FindBugs config; considering switching to SpotBugs.
-1 ❌ findbugs 3m 18s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 5m 39s the patch passed
-0 ⚠️ checkstyle 1m 16s hbase-server: The patch generated 6 new + 76 unchanged - 5 fixed = 82 total (was 81)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 17m 54s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
-1 ❌ findbugs 3m 18s hbase-server in the patch failed.
_ Other Tests _
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
47m 20s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1243
Optional Tests dupname asflicense spotbugs findbugs hadoopcheck hbaseanti checkstyle
uname Linux dbde835f53d6 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d099f24
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-general-check/output/branch-findbugs-hbase-server.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-general-check/output/patch-findbugs-hbase-server.txt
Max. process+thread count 83 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 50s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --findbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 7m 36s master passed
+1 💚 compile 1m 21s master passed
+1 💚 shadedjars 5m 45s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 46s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 7m 15s the patch passed
+1 💚 compile 1m 17s the patch passed
+1 💚 javac 1m 17s the patch passed
+1 💚 shadedjars 6m 43s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 1m 5s hbase-server in the patch failed.
_ Other Tests _
-1 ❌ unit 11m 50s hbase-server in the patch failed.
47m 57s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1243
Optional Tests javac javadoc unit shadedjars compile
uname Linux ee2f41201739 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d099f24
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/testReport/
Max. process+thread count 1046 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 3m 7s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --findbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 6m 13s master passed
+1 💚 compile 1m 2s master passed
+1 💚 shadedjars 5m 18s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 42s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 52s the patch passed
+1 💚 compile 1m 5s the patch passed
+1 💚 javac 1m 5s the patch passed
+1 💚 shadedjars 5m 18s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 39s the patch passed
_ Other Tests _
+1 💚 unit 101m 17s hbase-server in the patch passed.
132m 24s
Subsystem Report/Notes
Docker Client=19.03.7 Server=19.03.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1243
Optional Tests javac javadoc unit shadedjars compile
uname Linux 247e71a37e4e 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d099f24
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/testReport/
Max. process+thread count 6732 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1243/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@infraio infraio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@infraio infraio merged commit 819965a into apache:master Mar 7, 2020
asfgit pushed a commit that referenced this pull request Mar 7, 2020
…ect when balance by table (#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
asfgit pushed a commit that referenced this pull request Mar 7, 2020
…ect when balance by table (#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
asfgit pushed a commit that referenced this pull request Mar 7, 2020
…ect when balance by table (#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
thangTang pushed a commit to thangTang/hbase that referenced this pull request Apr 16, 2020
…ect when balance by table (apache#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
thangTang pushed a commit to thangTang/hbase that referenced this pull request Apr 16, 2020
…ect when balance by table (apache#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
infraio pushed a commit to infraio/hbase that referenced this pull request Aug 17, 2020
…ect when balance by table (apache#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
…ect when balance by table (apache#1243)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
(cherry picked from commit 6587a95)

Change-Id: Icb9adfb5af4613e40c806fc8c07ab9fa78c7f5f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants