Skip to content

HDDS-1586. Allow Ozone RPC client to read with topology awareness. #931

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

Closed
wants to merge 2 commits into from

Conversation

ChenSammi
Copy link
Contributor

@@ -1067,4 +1071,43 @@ public double getCurrentContainerThreshold() {
public SCMMetadataStore getScmMetadataStore() {
return scmMetadataStore;
}

Choose a reason for hiding this comment

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

whitespace:end of line

@@ -76,7 +81,8 @@ public XceiverClientManager(Configuration conf) {
SCM_CONTAINER_CLIENT_MAX_SIZE_DEFAULT);
long staleThresholdMs = conf.getTimeDuration(
SCM_CONTAINER_CLIENT_STALE_THRESHOLD_KEY,
SCM_CONTAINER_CLIENT_STALE_THRESHOLD_DEFAULT, TimeUnit.MILLISECONDS);
//SCM_CONTAINER_CLIENT_STALE_THRESHOLD_DEFAULT, TimeUnit.MILLISECONDS);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to hard code the stale threshold here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's changed for unit test. Forget to remove it.

@apache apache deleted a comment from hadoop-yetus Jun 13, 2019
@apache apache deleted a comment from hadoop-yetus Jun 13, 2019
@apache apache deleted a comment from hadoop-yetus Jun 13, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 35 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
0 shelldocs 1 Shelldocs was not available.
0 yamllint 1 yamllint was not available.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ trunk Compile Tests _
0 mvndep 74 Maven dependency ordering for branch
+1 mvninstall 539 trunk passed
+1 compile 314 trunk passed
+1 checkstyle 90 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 765 branch has no errors when building and testing our client artifacts.
+1 javadoc 167 trunk passed
0 spotbugs 348 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 535 trunk passed
_ Patch Compile Tests _
0 mvndep 41 Maven dependency ordering for patch
-1 mvninstall 141 hadoop-ozone in the patch failed.
-1 compile 56 hadoop-ozone in the patch failed.
-1 cc 56 hadoop-ozone in the patch failed.
-1 javac 56 hadoop-ozone in the patch failed.
-0 checkstyle 38 hadoop-ozone: The patch generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 mvnsite 0 the patch passed
+1 shellcheck 24 There were no new shellcheck issues.
-1 whitespace 0 The patch 6 line(s) with tabs.
+1 shadedclient 634 patch has no errors when building and testing our client artifacts.
+1 javadoc 151 the patch passed
-1 findbugs 101 hadoop-ozone in the patch failed.
_ Other Tests _
-1 unit 157 hadoop-hdds in the patch failed.
-1 unit 111 hadoop-ozone in the patch failed.
+1 asflicense 42 The patch does not generate ASF License warnings.
4725
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc shellcheck shelldocs yamllint
uname Linux cd3bb4b022bb 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 940bcf0
Default Java 1.8.0_212
mvninstall https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-mvninstall-hadoop-ozone.txt
compile https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-compile-hadoop-ozone.txt
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-compile-hadoop-ozone.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-compile-hadoop-ozone.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/diff-checkstyle-hadoop-ozone.txt
whitespace https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/whitespace-tabs.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-findbugs-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/testReport/
Max. process+thread count 413 (vs. ulimit of 5500)
modules C: hadoop-hdds/client hadoop-hdds/common hadoop-hdds/server-scm hadoop-ozone/common hadoop-ozone/dist hadoop-ozone/integration-test hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-931/5/console
versions git=2.7.4 maven=3.3.9 shellcheck=0.4.6 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 44 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
0 shelldocs 0 Shelldocs was not available.
0 yamllint 0 yamllint was not available.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ trunk Compile Tests _
0 mvndep 25 Maven dependency ordering for branch
+1 mvninstall 521 trunk passed
+1 compile 290 trunk passed
+1 checkstyle 84 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 740 branch has no errors when building and testing our client artifacts.
+1 javadoc 170 trunk passed
0 spotbugs 203 Used deprecated FindBugs config; considering switching to SpotBugs.
-1 findbugs 109 hadoop-ozone in trunk failed.
_ Patch Compile Tests _
0 mvndep 41 Maven dependency ordering for patch
+1 mvninstall 480 the patch passed
+1 compile 288 the patch passed
+1 cc 288 the patch passed
+1 javac 288 the patch passed
-0 checkstyle 43 hadoop-ozone: The patch generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 mvnsite 0 the patch passed
+1 shellcheck 25 There were no new shellcheck issues.
-1 whitespace 0 The patch 6 line(s) with tabs.
+1 shadedclient 648 patch has no errors when building and testing our client artifacts.
+1 javadoc 179 the patch passed
+1 findbugs 543 the patch passed
_ Other Tests _
-1 unit 174 hadoop-hdds in the patch failed.
-1 unit 1147 hadoop-ozone in the patch failed.
+1 asflicense 68 The patch does not generate ASF License warnings.
6126
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestWatchForCommit
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.TestOzoneConfigurationFields
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc shellcheck shelldocs yamllint
uname Linux 2d25902b820f 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 940bcf0
Default Java 1.8.0_212
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/branch-findbugs-hadoop-ozone.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/diff-checkstyle-hadoop-ozone.txt
whitespace https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/whitespace-tabs.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/testReport/
Max. process+thread count 5136 (vs. ulimit of 5500)
modules C: hadoop-hdds/client hadoop-hdds/common hadoop-hdds/server-scm hadoop-ozone/common hadoop-ozone/dist hadoop-ozone/integration-test hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-931/6/console
versions git=2.7.4 maven=3.3.9 shellcheck=0.4.6 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

1, null, null, null, null, 0));
nodeList.add((DatanodeDetails)scm.getClusterMap().getNode(
2, null, null, null, null, 0));
Assume.assumeTrue(nodeList.get(0) != nodeList.get(1));
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use .equals() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

u'r right.

throws IOException {
HddsProtos.ReplicationType type = pipeline.getType();
try {
// create different client for read different pipeline node based on
// network topology
String key = pipeline.getId().getId().toString() + type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we wrap this logic in a help function like getPipelineKey()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

@ChenSammi
Copy link
Contributor Author

rebase against latest trunk

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 52 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
0 shelldocs 1 Shelldocs was not available.
0 yamllint 1 yamllint was not available.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ trunk Compile Tests _
0 mvndep 74 Maven dependency ordering for branch
+1 mvninstall 487 trunk passed
+1 compile 265 trunk passed
+1 checkstyle 79 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 818 branch has no errors when building and testing our client artifacts.
+1 javadoc 163 trunk passed
0 spotbugs 319 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 515 trunk passed
_ Patch Compile Tests _
0 mvndep 33 Maven dependency ordering for patch
+1 mvninstall 462 the patch passed
+1 compile 270 the patch passed
+1 cc 270 the patch passed
+1 javac 270 the patch passed
-0 checkstyle 40 hadoop-hdds: The patch generated 15 new + 0 unchanged - 0 fixed = 15 total (was 0)
-0 checkstyle 46 hadoop-ozone: The patch generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 mvnsite 0 the patch passed
+1 shellcheck 26 There were no new shellcheck issues.
-1 whitespace 0 The patch 6 line(s) with tabs.
+1 shadedclient 667 patch has no errors when building and testing our client artifacts.
+1 javadoc 164 the patch passed
+1 findbugs 517 the patch passed
_ Other Tests _
+1 unit 280 hadoop-hdds in the patch passed.
-1 unit 1602 hadoop-ozone in the patch failed.
+1 asflicense 51 The patch does not generate ASF License warnings.
6866
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.TestOzoneConfigurationFields
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestWatchForCommit
hadoop.ozone.client.rpc.TestReadRetries
hadoop.ozone.client.rpc.TestCommitWatcher
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc shellcheck shelldocs yamllint
uname Linux 3d82ee40aff2 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 15d82fc
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/artifact/out/diff-checkstyle-hadoop-hdds.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/artifact/out/diff-checkstyle-hadoop-ozone.txt
whitespace https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/artifact/out/whitespace-tabs.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/testReport/
Max. process+thread count 4739 (vs. ulimit of 5500)
modules C: hadoop-hdds/client hadoop-hdds/common hadoop-hdds/server-scm hadoop-ozone/common hadoop-ozone/dist hadoop-ozone/integration-test hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-931/8/console
versions git=2.7.4 maven=3.3.9 shellcheck=0.4.6 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 73 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
0 shelldocs 1 Shelldocs was not available.
0 yamllint 1 yamllint was not available.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ trunk Compile Tests _
0 mvndep 74 Maven dependency ordering for branch
+1 mvninstall 605 trunk passed
+1 compile 269 trunk passed
+1 checkstyle 83 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 860 branch has no errors when building and testing our client artifacts.
+1 javadoc 176 trunk passed
0 spotbugs 327 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 530 trunk passed
_ Patch Compile Tests _
0 mvndep 39 Maven dependency ordering for patch
+1 mvninstall 450 the patch passed
+1 compile 278 the patch passed
+1 cc 278 the patch passed
+1 javac 278 the patch passed
+1 checkstyle 86 the patch passed
+1 mvnsite 0 the patch passed
+1 shellcheck 32 There were no new shellcheck issues.
-1 whitespace 0 The patch 6 line(s) with tabs.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 745 patch has no errors when building and testing our client artifacts.
+1 javadoc 171 the patch passed
+1 findbugs 547 the patch passed
_ Other Tests _
-1 unit 280 hadoop-hdds in the patch failed.
-1 unit 1731 hadoop-ozone in the patch failed.
+1 asflicense 48 The patch does not generate ASF License warnings.
7349
Reason Tests
Failed junit tests hadoop.hdds.scm.block.TestBlockManager
hadoop.ozone.client.rpc.TestWatchForCommit
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.hdds.scm.pipeline.TestNodeFailure
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.om.TestSecureOzoneManager
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestFailureHandlingByClient
hadoop.ozone.TestMiniChaosOzoneCluster
hadoop.ozone.client.rpc.TestOzoneRpcClient
Subsystem Report/Notes
Docker Client=18.09.5 Server=18.09.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml shellcheck shelldocs yamllint
uname Linux e1d558648b61 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a2a8be1
Default Java 1.8.0_212
whitespace https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/artifact/out/whitespace-tabs.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/testReport/
Max. process+thread count 5045 (vs. ulimit of 5500)
modules C: hadoop-hdds/client hadoop-hdds/common hadoop-hdds/server-scm hadoop-ozone/common hadoop-ozone/dist hadoop-ozone/integration-test hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-931/9/console
versions git=2.7.4 maven=3.3.9 shellcheck=0.4.6 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@xiaoyuyao
Copy link
Contributor

/retest

@@ -2347,7 +2347,7 @@ public OmKeyInfo lookupKey(OmKeyArgs args) throws IOException {
boolean auditSuccess = true;
try {
metrics.incNumKeyLookups();
return keyManager.lookupKey(args);
return keyManager.lookupKey(args, getClientAddress());
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we assume the topology mapping always use Ip address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, use Ip address or hostname depends on the value of "dfs.datanode.use.datanode.hostname" property. If it's true, then use hostname, if it's false, the use Ipaddress. The default value of this property is false.

@xiaoyuyao
Copy link
Contributor

Thanks @ChenSammi for the patch. It LGTM, +1. I will commit it shortly.

@ChenSammi
Copy link
Contributor Author

Thanks @xiaoyuyao for reviewing the code.

@xiaoyuyao xiaoyuyao closed this Jul 25, 2019
@xiaoyuyao
Copy link
Contributor

The JIRA has been merged with a different PR.

shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
Author: Ray Matharu <rmatharu@linkedin.com>

Reviewers: shanthoosh

Closes apache#931 from rmatharu/test-standby-grouper-fix and squashes the following commits:

767ca92e [Ray Matharu] Updating test
4eab3c18 [Ray Matharu] Minor
1394a6d7 [Ray Matharu] Igoring standby tasks when grouping
96e3d8f3 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
40f68a61 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
497602ab [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
1a72dc48 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
36c0b339 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
12ca96bb [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
ee7daac8 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
08006871 [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
916f66ae [Ray Matharu] Merge branch 'master' of https://github.com/apache/samza
2c09b081 [Ray Matharu] Rocksdb bug fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants