bharatviswa504 commented on pull request #1031:
URL: https://github.com/apache/hadoop-ozone/pull/1031#issuecomment-644914115
> > Can we also make the change in RpcClient.java, calling getServiceInfo
only when security is enabled?
>
> I have some fear if the secre/unsecure cluster would have such difference.
For example, I should run all the performance tests on secure cluster. We
should be careful and execute all the tests on both secure / unsecure cluster.
Seems to be safer to keep it as is. But I can be convinced.
From code, I see that we use getServiceInfo value only when security is
enabled. So, from S3G perspective, for each request, we can save one Rpc Call.
```
ServiceInfoEx serviceInfoEx = ozoneManagerClient.getServiceInfo();
String caCertPem = null;
if (OzoneSecurityUtil.isSecurityEnabled(conf)) {
caCertPem = serviceInfoEx.getCaCertificate();
}
```
I have not understood, what is the problem mentioned here, as from code we
can see the value from getServiceInfo is only used when security is enabled.
If someone has mistakenly used some of the information from getServiceInfo
mistakenly with out initializing it, it will be caught immediately as it will
throw NPE. And also we are not initializing serviceinfo, to any class
parameter, it is locally used in the RpcClient constructor only.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]