Shashikant Banerjee created HDDS-3387:
-----------------------------------------

             Summary: Fix ContainerOperationClient#createContainer
                 Key: HDDS-3387
                 URL: https://issues.apache.org/jira/browse/HDDS-3387
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
    Affects Versions: 0.6.0
            Reporter: Shashikant Banerjee
            Assignee: Sadanand Shenoy
             Fix For: 0.6.0


In the following snippet of code , it seems to acquire the xcieverclient 
instance twice and but release once. It should be acquired only once.
{code:java}
  @Override
  public ContainerWithPipeline createContainer(HddsProtos.ReplicationType type,
      HddsProtos.ReplicationFactor factor, String owner) throws IOException {
    XceiverClientSpi client = null;
    try {
      // allocate container on SCM.
      ContainerWithPipeline containerWithPipeline =
          storageContainerLocationClient.allocateContainer(type, factor,
              owner);
      Pipeline pipeline = containerWithPipeline.getPipeline();
     client = xceiverClientManager.acquireClient(pipeline);

      // connect to pipeline leader and allocate container on leader datanode.
      client = xceiverClientManager.acquireClient(pipeline);
      createContainer(client,
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to