This is an automated email from the ASF dual-hosted git repository.
nanda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 1f8c66a HDDS-2463. Reduce unnecessary getServiceInfo calls.
Contributed by Xiaoyu Yao. (#146)
1f8c66a is described below
commit 1f8c66ac25ffe9df1bf9c97d85436e316b1f9acc
Author: Xiaoyu Yao <[email protected]>
AuthorDate: Wed Nov 13 08:49:57 2019 -0800
HDDS-2463. Reduce unnecessary getServiceInfo calls. Contributed by Xiaoyu
Yao. (#146)
---
.../hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java
index ef96e0c..0a8e70b 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java
@@ -46,6 +46,7 @@ import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs;
import org.apache.hadoop.ozone.om.helpers.OpenKeySession;
import org.apache.hadoop.ozone.om.helpers.OzoneFileStatus;
import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfoEx;
import
org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclResponse;
import
org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.GetFileStatusRequest;
import
org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.GetFileStatusResponse;
@@ -763,11 +764,12 @@ public class OzoneManagerRequestHandler implements
RequestHandler {
throws IOException {
ServiceListResponse.Builder resp = ServiceListResponse.newBuilder();
- resp.addAllServiceInfo(impl.getServiceInfo().getServiceInfoList().stream()
+ ServiceInfoEx serviceInfoEx = impl.getServiceInfo();
+ resp.addAllServiceInfo(serviceInfoEx.getServiceInfoList().stream()
.map(ServiceInfo::getProtobuf)
.collect(Collectors.toList()));
- if (impl.getServiceInfo().getCaCertificate() != null) {
- resp.setCaCertificate(impl.getServiceInfo().getCaCertificate());
+ if (serviceInfoEx.getCaCertificate() != null) {
+ resp.setCaCertificate(serviceInfoEx.getCaCertificate());
}
return resp.build();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]