hadoop-ozone-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanishakon...@apache.org
Subject [hadoop-ozone] branch HDDS-1564 updated: HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI (#375)
Date Wed, 08 Jan 2020 21:19:41 GMT
This is an automated email from the ASF dual-hosted git repository.

hanishakoneru pushed a commit to branch HDDS-1564
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/HDDS-1564 by this push:
     new 129d464  HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI
(#375)
129d464 is described below

commit 129d46444999eb67f4dd78aea6be226f62d04cf5
Author: Li Cheng <bloodhell2004@gmail.com>
AuthorDate: Thu Jan 9 05:19:34 2020 +0800

    HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI (#375)
    
    * HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI.
---
 .../hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java   | 9 ++++++++-
 .../src/main/smoketest/scmcli/{pipeline.robot => datanode.robot} | 7 ++++---
 hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot       | 7 ++++++-
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java
b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java
index 58a1778..e0bdddb 100644
--- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java
+++ b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hdds.scm.cli.pipeline;
 import org.apache.hadoop.hdds.cli.HddsVersionProvider;
 import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
 import org.apache.hadoop.hdds.scm.client.ScmClient;
+import org.apache.hadoop.hdds.scm.pipeline.Pipeline;
 import picocli.CommandLine;
 
 import java.util.concurrent.Callable;
@@ -60,10 +61,16 @@ public class CreatePipelineSubcommand implements Callable<Void>
{
           + " is not supported yet.");
     }
     try (ScmClient scmClient = parent.getParent().createScmClient()) {
-      scmClient.createReplicationPipeline(
+      Pipeline pipeline = scmClient.createReplicationPipeline(
           type,
           factor,
           HddsProtos.NodePool.getDefaultInstance());
+
+      if (pipeline != null) {
+        System.out.println(pipeline.getId().toString() +
+            " is created. Factor: " + pipeline.getFactor() +
+            ", Type: " + pipeline.getType());
+      }
       return null;
     }
   }
diff --git a/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot b/hadoop-ozone/dist/src/main/smoketest/scmcli/datanode.robot
similarity index 82%
copy from hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
copy to hadoop-ozone/dist/src/main/smoketest/scmcli/datanode.robot
index 6a6f0b0..ed1173d 100644
--- a/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/scmcli/datanode.robot
@@ -23,6 +23,7 @@ Resource            ../commonlib.robot
 
 
 *** Test Cases ***
-Run list pipeline
-    ${output} =         Execute          ozone scmcli pipeline list
-                        Should contain   ${output}   Type:RATIS, Factor:ONE, State:OPEN
\ No newline at end of file
+Run list datanodes
+    ${output} =         Execute          ozone scmcli datanode list
+                        Should contain   ${output}   Datanode:
+                        Should contain   ${output}   Related pipelines:
\ No newline at end of file
diff --git a/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot b/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
index 6a6f0b0..f411e0c 100644
--- a/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
@@ -25,4 +25,9 @@ Resource            ../commonlib.robot
 *** Test Cases ***
 Run list pipeline
     ${output} =         Execute          ozone scmcli pipeline list
-                        Should contain   ${output}   Type:RATIS, Factor:ONE, State:OPEN
\ No newline at end of file
+                        Should contain   ${output}   Type:
+                        Should contain   ${output}   Factor:ONE, State:
+
+Run create pipeline
+    ${output} =         Execute          ozone scmcli pipeline create
+                        Should contain   ${output}   is created. Factor: ONE, Type: STAND_ALONE
\ No newline at end of file


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


Mime
View raw message