-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Conversation
@@ -1067,4 +1071,43 @@ public double getCurrentContainerThreshold() { | |||
public SCMMetadataStore getScmMetadataStore() { | |||
return scmMetadataStore; | |||
} | |||
|
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
rebase against latest trunk |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
/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()); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Thanks @ChenSammi for the patch. It LGTM, +1. I will commit it shortly. |
Thanks @xiaoyuyao for reviewing the code. |
The JIRA has been merged with a different PR. |
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
https://issues.apache.org/jira/browse/HDDS-1586