hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/Dispatcher.java
private ContainerCommandResponseProto handleUpdateContainer(
      ContainerCommandRequestProto msg)
      throws IOException {
    if (!msg.hasUpdateContainer()) {
      LOG.debug("Malformed read container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }

    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getUpdateContainer().getPipeline());
    String containerName = msg.getUpdateContainer()
        .getContainerData().getName();

    ContainerData data = ContainerData.getFromProtBuf(
        msg.getUpdateContainer().getContainerData(), conf);
    boolean forceUpdate = msg.getUpdateContainer().getForceUpdate();
    this.containerManager.updateContainer(
        pipeline, containerName, data, forceUpdate);
    return ContainerUtils.getContainerResponse(msg);
  }
/**
   * Update an existing container with the new container data.
   *
   * @param msg Request
   * @return ContainerCommandResponseProto
   * @throws IOException
   */
Update an existing container with the new container data.
@param msg Request
@return ContainerCommandResponseProto
@throws IOException
Update an existing container with the new container data . @param msg Request @return ContainerCommandResponseProto @throws IOException
private ContainerCommandResponseProto handleUpdateContainer(
      ContainerCommandRequestProto msg)
      throws IOException {
    if (!msg.hasUpdateContainer()) {
      LOG.debug("Malformed read container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }
    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getUpdateContainer().getPipeline());
    String containerName = msg.getUpdateContainer()
        .getContainerData().getName();
    ContainerData data = ContainerData.getFromProtBuf(
        msg.getUpdateContainer().getContainerData(), conf);
    boolean forceUpdate = msg.getUpdateContainer().getForceUpdate();
    this.containerManager.updateContainer(
        pipeline, containerName, data, forceUpdate);
    return ContainerUtils.getContainerResponse(msg);
  }
private ContainerCommandResponseProto handleUpdateContainer ( ContainerCommandRequestProto msg ) throws IOException { if ( ! msg . hasUpdateContainer ( ) ) { LOG . debug ( "Malformed read container request. trace ID: {}" , msg . getTraceID ( ) ) ; return ContainerUtils . malformedRequest ( msg ) ; } Pipeline pipeline = Pipeline . getFromProtoBuf ( msg . getUpdateContainer ( ) . getPipeline ( ) ) ; String containerName = msg . getUpdateContainer ( ) . getContainerData ( ) . getName ( ) ; ContainerData data = ContainerData . getFromProtBuf ( msg . getUpdateContainer ( ) . getContainerData ( ) , conf ) ; boolean forceUpdate = msg . getUpdateContainer ( ) . getForceUpdate ( ) ; this . containerManager . updateContainer ( pipeline , containerName , data , forceUpdate ) ; return ContainerUtils . getContainerResponse ( msg ) ; }
Update an existing container with the new container data.
Update an existing container with the new container data .