bharatviswa504 commented on a change in pull request #2289:
URL: https://github.com/apache/ozone/pull/2289#discussion_r642589743
##########
File path:
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerOperationClient.java
##########
@@ -131,7 +135,7 @@ public ContainerWithPipeline createContainer(String owner)
allocateContainer(replicationType, replicationFactor, owner);
Pipeline pipeline = containerWithPipeline.getPipeline();
- client = xceiverClientManager.acquireClient(pipeline);
+ client = getXceiverClientManager().acquireClient(pipeline);
Review comment:
Done
##########
File path:
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerOperationClient.java
##########
@@ -69,16 +69,20 @@
private final StorageContainerLocationProtocol
storageContainerLocationClient;
private final boolean containerTokenEnabled;
+ private final OzoneConfiguration configuration;
+ private XceiverClientManager xceiverClientManager;
- public XceiverClientManager getXceiverClientManager() {
+ public synchronized XceiverClientManager getXceiverClientManager()
+ throws IOException {
+ if (this.xceiverClientManager == null) {
+ this.xceiverClientManager = newXCeiverClientManager(configuration);
+ }
return xceiverClientManager;
}
- private final XceiverClientManager xceiverClientManager;
-
public ContainerOperationClient(OzoneConfiguration conf) throws IOException {
Review comment:
Done
--
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]