This is an automated email from the ASF dual-hosted git repository.
sshenoy 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 83dbd1d17f HDDS-1056. Remove Standalone as the replication type in
Ozone client api. (#6466)
83dbd1d17f is described below
commit 83dbd1d17f903bdf852d1536a28a8d97ebb3bb80
Author: Sarveksha Yeshavantha Raju
<[email protected]>
AuthorDate: Fri Apr 12 14:01:43 2024 +0530
HDDS-1056. Remove Standalone as the replication type in Ozone client api.
(#6466)
---
.../scm/cli/pipeline/CreatePipelineSubcommand.java | 10 +++++----
.../src/main/smoketest/admincli/pipeline.robot | 24 +++++++++-------------
2 files changed, 16 insertions(+), 18 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 86299eec2d..209acd3223 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
@@ -39,15 +39,16 @@ public class CreatePipelineSubcommand extends ScmSubcommand
{
@CommandLine.Option(
names = {"-t", "--replication-type", "--replicationType"},
- description = "Replication type (STAND_ALONE, RATIS). Full name" +
+ description = "Replication type is RATIS. Full name" +
" --replicationType will be removed in later versions.",
- defaultValue = "STAND_ALONE"
+ defaultValue = "RATIS",
+ hidden = true
)
private HddsProtos.ReplicationType type;
@CommandLine.Option(
names = {"-f", "--replication-factor", "--replicationFactor"},
- description = "Replication factor (ONE, THREE). Full name" +
+ description = "Replication factor for RATIS (ONE, THREE). Full name" +
" --replicationFactor will be removed in later versions.",
defaultValue = "ONE"
)
@@ -62,7 +63,8 @@ public class CreatePipelineSubcommand extends ScmSubcommand {
// As I see there is no way to specify ECReplicationConfig properly here
// so failing the request if type is EC, seems to be safe.
if (type == HddsProtos.ReplicationType.CHAINED
- || type == HddsProtos.ReplicationType.EC) {
+ || type == HddsProtos.ReplicationType.EC
+ || type == HddsProtos.ReplicationType.STAND_ALONE) {
throw new IllegalArgumentException(type.name()
+ " is not supported yet.");
}
diff --git a/hadoop-ozone/dist/src/main/smoketest/admincli/pipeline.robot
b/hadoop-ozone/dist/src/main/smoketest/admincli/pipeline.robot
index c35cb7f53d..d81d0ea1a6 100644
--- a/hadoop-ozone/dist/src/main/smoketest/admincli/pipeline.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/admincli/pipeline.robot
@@ -25,30 +25,22 @@ ${PIPELINE}
${SCM} scm
*** Test Cases ***
-Create pipeline
- ${output} = Execute ozone admin pipeline create
- Should contain ${output} is created.
- Should contain ${output} STANDALONE/ONE
- ${pipeline} = Execute echo "${output}" | grep 'is created'
| cut -f1 -d' ' | cut -f2 -d'='
- Set Suite Variable ${PIPELINE} ${pipeline}
-
List pipelines
${output} = Execute ozone admin pipeline list
- Should contain ${output} STANDALONE/ONE
+ Should contain ${output} RATIS/ONE
+ ${pipeline} = Execute ozone admin pipeline list | grep
'ReplicationConfig: RATIS/ONE' | head -n 1 | cut -d' ' -f3 | sed 's/,$//'
+ Set Suite Variable ${PIPELINE} ${pipeline}
List pipeline with json option
- ${output} = Execute ozone admin pipeline list --json | jq
'map(.replicationConfig) | contains([{"replicationFactor": "ONE",
"replicationType": "STANDALONE"}])'
-
+ ${output} = Execute ozone admin pipeline list --json | jq
'map(.replicationConfig) | contains([{"replicationFactor": "ONE",
"replicationType": "RATIS"}])'
Should be true $output
List pipelines with explicit host
${output} = Execute ozone admin pipeline list --scm ${SCM}
- Should contain ${output} STANDALONE/ONE
+ Should contain ${output} RATIS/ONE
List pipelines with explicit host and json option
- ${output} = Execute ozone admin pipeline list --scm ${SCM}
--json | jq 'map(.replicationConfig) | contains([{"replicationFactor": "ONE",
"replicationType": "STANDALONE"}])'
-
- Should be true $output
+ ${output} = Execute ozone admin pipeline list --scm ${SCM}
--json | jq 'map(.replicationConfig) | contains([{"replicationFactor": "ONE",
"replicationType": "RATIS"}])'
Deactivate pipeline
Execute ozone admin pipeline deactivate
"${PIPELINE}"
@@ -74,6 +66,10 @@ Incomplete command
Should contain ${output} deactivate
Should contain ${output} list
+Create pipeline
+ ${output} = Execute And Ignore Error ozone admin pipeline
create -t RATIS -f ONE
+ Should Contain Any ${output} is created.
RATIS/ONE Cannot create pipeline
+
#List pipelines on unknown host
# ${output} = Execute And Ignore Error ozone admin --verbose
pipeline list --scm unknown-host
# Should contain ${output} Invalid host name
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]