You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2022/04/29 17:04:49 UTC

[ozone] branch master updated: HDDS-6653. Small fixes in PipelineStateMap (#3355)

This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 59f60089bb HDDS-6653. Small fixes in PipelineStateMap (#3355)
59f60089bb is described below

commit 59f60089bb234ab7553ebade1caf8fbe343b3b86
Author: Kaijie Chen <ch...@kaijie.org>
AuthorDate: Sat Apr 30 01:04:43 2022 +0800

    HDDS-6653. Small fixes in PipelineStateMap (#3355)
---
 .../hadoop/hdds/scm/pipeline/PipelineStateMap.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
index 23351e500b..6b40f28fc0 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
@@ -145,7 +145,7 @@ class PipelineStateMap {
    *
    * @param pipelineID - PipelineID of the pipeline to be retrieved
    * @return Pipeline
-   * @throws IOException if pipeline is not found
+   * @throws PipelineNotFoundException if pipeline is not found
    */
   Pipeline getPipeline(PipelineID pipelineID) throws PipelineNotFoundException {
     Preconditions.checkNotNull(pipelineID,
@@ -205,7 +205,7 @@ class PipelineStateMap {
     if (state == PipelineState.OPEN) {
       return new ArrayList<>(
           query2OpenPipelines.getOrDefault(
-              replicationConfig, Collections.EMPTY_LIST));
+              replicationConfig, Collections.emptyList()));
     }
 
     List<Pipeline> pipelines = new ArrayList<>();
@@ -236,7 +236,7 @@ class PipelineStateMap {
 
     if (state == PipelineState.OPEN) {
       return query2OpenPipelines.getOrDefault(
-              replicationConfig, Collections.EMPTY_LIST).size();
+              replicationConfig, Collections.emptyList()).size();
     }
 
     int count = 0;
@@ -269,12 +269,12 @@ class PipelineStateMap {
     Preconditions
         .checkNotNull(excludeDns, "Datanode exclude list cannot be null");
     Preconditions
-        .checkNotNull(excludeDns, "Pipeline exclude list cannot be null");
+        .checkNotNull(excludePipelines, "Pipeline exclude list cannot be null");
 
     List<Pipeline> pipelines = null;
     if (state == PipelineState.OPEN) {
       pipelines = new ArrayList<>(query2OpenPipelines.getOrDefault(
-          replicationConfig, Collections.EMPTY_LIST));
+          replicationConfig, Collections.emptyList()));
     } else {
       pipelines = new ArrayList<>(pipelineMap.values());
     }
@@ -304,7 +304,7 @@ class PipelineStateMap {
    *
    * @param pipelineID - PipelineID
    * @return Set of containerIDs belonging to the pipeline
-   * @throws IOException if pipeline is not found
+   * @throws PipelineNotFoundException if pipeline is not found
    */
   NavigableSet<ContainerID> getContainers(PipelineID pipelineID)
       throws PipelineNotFoundException {
@@ -324,7 +324,7 @@ class PipelineStateMap {
    *
    * @param pipelineID - PipelineID
    * @return Number of containers belonging to the pipeline
-   * @throws IOException if pipeline is not found
+   * @throws PipelineNotFoundException if pipeline is not found
    */
   int getNumberOfContainers(PipelineID pipelineID)
       throws PipelineNotFoundException {
@@ -389,7 +389,7 @@ class PipelineStateMap {
    *                   to be updated
    * @param state - new state of the pipeline
    * @return Pipeline with the updated state
-   * @throws IOException if pipeline does not exist
+   * @throws PipelineNotFoundException if pipeline does not exist
    */
   Pipeline updatePipelineState(PipelineID pipelineID, PipelineState state)
       throws PipelineNotFoundException {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org