hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/Dispatcher.java
private ContainerCommandResponseProto handleCreateContainer(
      ContainerCommandRequestProto msg) throws IOException {
    if (!msg.hasCreateContainer()) {
      LOG.debug("Malformed create container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }
    ContainerData cData = ContainerData.getFromProtBuf(
        msg.getCreateContainer().getContainerData(), conf);
    Preconditions.checkNotNull(cData, "Container data is null");

    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getCreateContainer().getPipeline());
    Preconditions.checkNotNull(pipeline, "Pipeline cannot be null");

    this.containerManager.createContainer(pipeline, cData);
    return ContainerUtils.getContainerResponse(msg);
  }
/**
   * Calls into container logic and returns appropriate response.
   *
   * @param msg - Request
   * @return Response.
   * @throws IOException
   */
Calls into container logic and returns appropriate response.
@param msg - Request
@return Response.
Calls into container logic and returns appropriate response . @param msg - Request @return Response .
private ContainerCommandResponseProto handleCreateContainer(
      ContainerCommandRequestProto msg) throws IOException {
    if (!msg.hasCreateContainer()) {
      LOG.debug("Malformed create container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }
    ContainerData cData = ContainerData.getFromProtBuf(
        msg.getCreateContainer().getContainerData(), conf);
    Preconditions.checkNotNull(cData, "Container data is null");
    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getCreateContainer().getPipeline());
    Preconditions.checkNotNull(pipeline, "Pipeline cannot be null");
    this.containerManager.createContainer(pipeline, cData);
    return ContainerUtils.getContainerResponse(msg);
  }
private ContainerCommandResponseProto handleCreateContainer ( ContainerCommandRequestProto msg ) throws IOException { if ( ! msg . hasCreateContainer ( ) ) { LOG . debug ( "Malformed create container request. trace ID: {}" , msg . getTraceID ( ) ) ; return ContainerUtils . malformedRequest ( msg ) ; } ContainerData cData = ContainerData . getFromProtBuf ( msg . getCreateContainer ( ) . getContainerData ( ) , conf ) ; Preconditions . checkNotNull ( cData , "Container data is null" ) ; Pipeline pipeline = Pipeline . getFromProtoBuf ( msg . getCreateContainer ( ) . getPipeline ( ) ) ; Preconditions . checkNotNull ( pipeline , "Pipeline cannot be null" ) ; this . containerManager . createContainer ( pipeline , cData ) ; return ContainerUtils . getContainerResponse ( msg ) ; }
Calls into container logic and returns appropriate response.
Calls into container logic and returns appropriate response .