Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
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;
Expand Down Expand Up @@ -60,10 +61,16 @@ public Void call() throws Exception {
+ " 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;
}
}
Expand Down
29 changes: 29 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/scmcli/datanode.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Settings ***
Documentation Smoketest ozone cluster startup
Library OperatingSystem
Library BuiltIn
Resource ../commonlib.robot

*** Variables ***


*** Test Cases ***
Run list datanodes
${output} = Execute ozone scmcli datanode list
Should contain ${output} Datanode:
Should contain ${output} Related pipelines:
7 changes: 6 additions & 1 deletion hadoop-ozone/dist/src/main/smoketest/scmcli/pipeline.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
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