hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/client/ContainerOperationClient.java
private void createPipeline(XceiverClientSpi client, Pipeline pipeline)
      throws IOException {

    Preconditions.checkNotNull(pipeline.getPipelineName(), "Pipeline " +
        "name cannot be null when client create flag is set.");

    // Pipeline creation is a three step process.
    //
    // 1. Notify SCM that this client is doing a create pipeline on
    // datanodes.
    //
    // 2. Talk to Datanodes to create the pipeline.
    //
    // 3. update SCM that pipeline creation was successful.
    storageContainerLocationClient.notifyObjectStageChange(
        ObjectStageChangeRequestProto.Type.pipeline,
        pipeline.getPipelineName(),
        ObjectStageChangeRequestProto.Op.create,
        ObjectStageChangeRequestProto.Stage.begin);

    client.createPipeline(pipeline.getPipelineName(),
        pipeline.getMachines());

    storageContainerLocationClient.notifyObjectStageChange(
        ObjectStageChangeRequestProto.Type.pipeline,
        pipeline.getPipelineName(),
        ObjectStageChangeRequestProto.Op.create,
        ObjectStageChangeRequestProto.Stage.complete);

    // TODO : Should we change the state on the client side ??
    // That makes sense, but it is not needed for the client to work.
    LOG.debug("Pipeline creation successful. Pipeline: {}",
        pipeline.toString());
  }
/**
   * Creates a pipeline over the machines choosen by the SCM.
   *
   * @param client - Client
   * @param pipeline - pipeline to be createdon Datanodes.
   * @throws IOException
   */
Creates a pipeline over the machines choosen by the SCM.
@param client - Client
@param pipeline - pipeline to be createdon Datanodes.
Creates a pipeline over the machines choosen by the SCM . @param client - Client @param pipeline - pipeline to be createdon Datanodes .
private void createPipeline(XceiverClientSpi client, Pipeline pipeline)
      throws IOException {
    Preconditions.checkNotNull(pipeline.getPipelineName(), "Pipeline " +
        "name cannot be null when client create flag is set.");
     1. Notify SCM that this client is doing a create pipeline on
     datanodes.
     2. Talk to Datanodes to create the pipeline.
     3. update SCM that pipeline creation was successful.
    storageContainerLocationClient.notifyObjectStageChange(
        ObjectStageChangeRequestProto.Type.pipeline,
        pipeline.getPipelineName(),
        ObjectStageChangeRequestProto.Op.create,
        ObjectStageChangeRequestProto.Stage.begin);
    client.createPipeline(pipeline.getPipelineName(),
        pipeline.getMachines());
    storageContainerLocationClient.notifyObjectStageChange(
        ObjectStageChangeRequestProto.Type.pipeline,
        pipeline.getPipelineName(),
        ObjectStageChangeRequestProto.Op.create,
        ObjectStageChangeRequestProto.Stage.complete);
     TODO : Should we change the state on the client side ??
     That makes sense, but it is not needed for the client to work.
    LOG.debug("Pipeline creation successful. Pipeline: {}",
        pipeline.toString());
  }
private void createPipeline ( XceiverClientSpi client , Pipeline pipeline ) throws IOException { Preconditions . checkNotNull ( pipeline . getPipelineName ( ) , "Pipeline " + "name cannot be null when client create flag is set." ) ; storageContainerLocationClient . notifyObjectStageChange ( ObjectStageChangeRequestProto . Type . pipeline , pipeline . getPipelineName ( ) , ObjectStageChangeRequestProto . Op . create , ObjectStageChangeRequestProto . Stage . begin ) ; client . createPipeline ( pipeline . getPipelineName ( ) , pipeline . getMachines ( ) ) ; storageContainerLocationClient . notifyObjectStageChange ( ObjectStageChangeRequestProto . Type . pipeline , pipeline . getPipelineName ( ) , ObjectStageChangeRequestProto . Op . create , ObjectStageChangeRequestProto . Stage . complete ) ; LOG . debug ( "Pipeline creation successful. Pipeline: {}" , pipeline . toString ( ) ) ; }
Creates a pipeline over the machines choosen by the SCM.
Creates a pipeline over the machines choosen by the SCM .
// Pipeline creation is a three step process. // // 1. Notify SCM that this client is doing a create pipeline on // datanodes. // // 2. Talk to Datanodes to create the pipeline. // // 3. update SCM that pipeline creation was successful. // TODO : Should we change the state on the client side ?? // That makes sense, but it is not needed for the client to work.