HDDS-4821. Use SCM service ID in SCMBlockClient and SCM Client.#1940
HDDS-4821. Use SCM service ID in SCMBlockClient and SCM Client.#1940bharatviswa504 merged 3 commits intoapache:HDDS-2823from
Conversation
…M service ID in SCMBlockClient and SCM Client.
| String localScmServiceId = conf.getTrimmed( | ||
| ScmConfigKeys.OZONE_SCM_DEFAULT_SERVICE_ID); | ||
|
|
||
| Collection< String > scmServiceIds; |
There was a problem hiding this comment.
Collection< String > -> Collection
There was a problem hiding this comment.
Here as Collection would be a string and during iteration, instead of typecasting to a string, so declared collection as String. (Removed spaces)
| @@ -0,0 +1,246 @@ | |||
| /* | |||
There was a problem hiding this comment.
Can't we reuse SCMNodeDetails class here?
There was a problem hiding this comment.
The main idea here is SCMNodeInfo will be used by SCM Clients like OM and SCM.
As they need to fiigure out rpc address from newly added config key ozone.scm.address or old rpc address config.
Whereas SCM fetches address from bindhost. To make clear distinguish I have added the new class.
|
Looks good with just minor comments. Let's add some comment on SCMNodeInfo class so as to differentiate between SCMNodeInfo and SCMNodedetails class. |
|
Thank You @bshashikant for the review. |
What changes were proposed in this pull request?
Use SCM service ID in SCMBlockClient and SCM Client.
If not defined fall back to RPC address and port config.
Rename ozone.scm.internal.service.id -> ozone.scm.default.service.id for better clarity.
Refactor/move few classes to use across ozone and hdds.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4821
How was this patch tested?
Added tests.