hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineSelector.java
public static PipelineChannel newPipelineFromNodes(
      List<DatanodeDetails> nodes, LifeCycleState state,
      ReplicationType replicationType, ReplicationFactor replicationFactor,
      String name) {
    Preconditions.checkNotNull(nodes);
    Preconditions.checkArgument(nodes.size() > 0);
    String leaderId = nodes.get(0).getUuidString();
    PipelineChannel
        pipelineChannel = new PipelineChannel(leaderId, state, replicationType,
        replicationFactor, name);
    for (DatanodeDetails node : nodes) {
      pipelineChannel.addMember(node);
    }
    return pipelineChannel;
  }
/**
   * Translates a list of nodes, ordered such that the first is the leader, into
   * a corresponding {@link Pipeline} object.
   *
   * @param nodes - list of datanodes on which we will allocate the container.
   * The first of the list will be the leader node.
   * @return pipeline corresponding to nodes
   */
Translates a list of nodes, ordered such that the first is the leader, into
a corresponding  Pipeline object.

@param nodes - list of datanodes on which we will allocate the container.
The first of the list will be the leader node.
@return pipeline corresponding to nodes
Translates a list of nodes ordered such that the first is the leader into a corresponding Pipeline object . @param nodes - list of datanodes on which we will allocate the container . The first of the list will be the leader node . @return pipeline corresponding to nodes
public static PipelineChannel newPipelineFromNodes(
      List<DatanodeDetails> nodes, LifeCycleState state,
      ReplicationType replicationType, ReplicationFactor replicationFactor,
      String name) {
    Preconditions.checkNotNull(nodes);
    Preconditions.checkArgument(nodes.size() > 0);
    String leaderId = nodes.get(0).getUuidString();
    PipelineChannel
        pipelineChannel = new PipelineChannel(leaderId, state, replicationType,
        replicationFactor, name);
    for (DatanodeDetails node : nodes) {
      pipelineChannel.addMember(node);
    }
    return pipelineChannel;
  }
public static PipelineChannel newPipelineFromNodes ( List < DatanodeDetails > nodes , LifeCycleState state , ReplicationType replicationType , ReplicationFactor replicationFactor , String name ) { Preconditions . checkNotNull ( nodes ) ; Preconditions . checkArgument ( nodes . size ( ) > 0 ) ; String leaderId = nodes . get ( 0 ) . getUuidString ( ) ; PipelineChannel pipelineChannel = new PipelineChannel ( leaderId , state , replicationType , replicationFactor , name ) ; for ( DatanodeDetails node : nodes ) { pipelineChannel . addMember ( node ) ; } return pipelineChannel ; }
Translates a list of nodes, ordered such that the first is the leader, into
 a corresponding {@link Pipeline} object.
Translates a list of nodes ordered such that the first is the leader into a corresponding { @link Pipeline } object .