hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java
@Override
  public HddsProtos.NodePool queryNode(EnumSet<NodeState> nodeStatuses,
      HddsProtos.QueryScope queryScope, String poolName) throws IOException {

    if (queryScope == HddsProtos.QueryScope.POOL) {
      throw new IllegalArgumentException("Not Supported yet");
    }

    List<DatanodeDetails> datanodes = queryNode(nodeStatuses);
    HddsProtos.NodePool.Builder poolBuilder =
        HddsProtos.NodePool.newBuilder();

    for (DatanodeDetails datanode : datanodes) {
      HddsProtos.Node node = HddsProtos.Node.newBuilder()
          .setNodeID(datanode.getProtoBufMessage())
          .addAllNodeStates(nodeStatuses)
          .build();
      poolBuilder.addNodes(node);
    }

    return poolBuilder.build();
  }
/**
   * Queries a list of Node Statuses.
   *
   * @param nodeStatuses
   * @param queryScope
   * @param poolName @return List of Datanodes.
   */
Queries a list of Node Statuses.
@param nodeStatuses
@param queryScope
@param poolName @return List of Datanodes.
Queries a list of Node Statuses . @param nodeStatuses @param queryScope @param poolName @return List of Datanodes .
@Override
  public HddsProtos.NodePool queryNode(EnumSet<NodeState> nodeStatuses,
      HddsProtos.QueryScope queryScope, String poolName) throws IOException {
    if (queryScope == HddsProtos.QueryScope.POOL) {
      throw new IllegalArgumentException("Not Supported yet");
    }
    List<DatanodeDetails> datanodes = queryNode(nodeStatuses);
    HddsProtos.NodePool.Builder poolBuilder =
        HddsProtos.NodePool.newBuilder();
    for (DatanodeDetails datanode : datanodes) {
      HddsProtos.Node node = HddsProtos.Node.newBuilder()
          .setNodeID(datanode.getProtoBufMessage())
          .addAllNodeStates(nodeStatuses)
          .build();
      poolBuilder.addNodes(node);
    }
    return poolBuilder.build();
  }
@ Override public HddsProtos . NodePool queryNode ( EnumSet < NodeState > nodeStatuses , HddsProtos . QueryScope queryScope , String poolName ) throws IOException { if ( queryScope == HddsProtos . QueryScope . POOL ) { throw new IllegalArgumentException ( "Not Supported yet" ) ; } List < DatanodeDetails > datanodes = queryNode ( nodeStatuses ) ; HddsProtos . NodePool . Builder poolBuilder = HddsProtos . NodePool . newBuilder ( ) ; for ( DatanodeDetails datanode : datanodes ) { HddsProtos . Node node = HddsProtos . Node . newBuilder ( ) . setNodeID ( datanode . getProtoBufMessage ( ) ) . addAllNodeStates ( nodeStatuses ) . build ( ) ; poolBuilder . addNodes ( node ) ; } return poolBuilder . build ( ) ; }
Queries a list of Node Statuses.
Queries a list of Node Statuses .