hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/client/ContainerOperationClient.java
@Override
  public ContainerData readContainer(Pipeline pipeline) throws IOException {
    XceiverClientSpi client = null;
    try {
      client = xceiverClientManager.acquireClient(pipeline);
      String traceID = UUID.randomUUID().toString();
      ReadContainerResponseProto response =
          ContainerProtocolCalls.readContainer(client,
              pipeline.getContainerName(), traceID);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Read container {}, leader: {}, machines: {} ",
            pipeline.getContainerName(),
            pipeline.getLeader(),
            pipeline.getMachines());
      }
      return response.getContainerData();
    } finally {
      if (client != null) {
        xceiverClientManager.releaseClient(client);
      }
    }
  }
/**
   * Get meta data from an existing container.
   *
   * @param pipeline - pipeline that represents the container.
   * @return ContainerInfo - a message of protobuf which has basic info
   * of a container.
   * @throws IOException
   */
Get meta data from an existing container.
@param pipeline - pipeline that represents the container.
@return ContainerInfo - a message of protobuf which has basic info
of a container.
Get meta data from an existing container . @param pipeline - pipeline that represents the container . @return ContainerInfo - a message of protobuf which has basic info of a container .
@Override
  public ContainerData readContainer(Pipeline pipeline) throws IOException {
    XceiverClientSpi client = null;
    try {
      client = xceiverClientManager.acquireClient(pipeline);
      String traceID = UUID.randomUUID().toString();
      ReadContainerResponseProto response =
          ContainerProtocolCalls.readContainer(client,
              pipeline.getContainerName(), traceID);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Read container {}, leader: {}, machines: {} ",
            pipeline.getContainerName(),
            pipeline.getLeader(),
            pipeline.getMachines());
      }
      return response.getContainerData();
    } finally {
      if (client != null) {
        xceiverClientManager.releaseClient(client);
      }
    }
  }
@ Override public ContainerData readContainer ( Pipeline pipeline ) throws IOException { XceiverClientSpi client = null ; try { client = xceiverClientManager . acquireClient ( pipeline ) ; String traceID = UUID . randomUUID ( ) . toString ( ) ; ReadContainerResponseProto response = ContainerProtocolCalls . readContainer ( client , pipeline . getContainerName ( ) , traceID ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Read container {}, leader: {}, machines: {} " , pipeline . getContainerName ( ) , pipeline . getLeader ( ) , pipeline . getMachines ( ) ) ; } return response . getContainerData ( ) ; } finally { if ( client != null ) { xceiverClientManager . releaseClient ( client ) ; } } }
Get meta data from an existing container.
Get meta data from an existing container .