Skip to content

Commit eddb7fb

Browse files
committed
HDDS-2650 Fix createPipeline CLI.
1 parent 03c93ec commit eddb7fb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/CreatePipelineSubcommand.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.apache.hadoop.hdds.cli.HddsVersionProvider;
2222
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
23-
import org.apache.hadoop.hdds.scm.cli.SCMCLI;
2423
import org.apache.hadoop.hdds.scm.client.ScmClient;
2524
import picocli.CommandLine;
2625

@@ -30,13 +29,13 @@
3029
* Handler of createPipeline command.
3130
*/
3231
@CommandLine.Command(
33-
name = "createPipeline",
32+
name = "create",
3433
description = "create pipeline",
3534
mixinStandardHelpOptions = true,
3635
versionProvider = HddsVersionProvider.class)
3736
public class CreatePipelineSubcommand implements Callable<Void> {
3837
@CommandLine.ParentCommand
39-
private SCMCLI parent;
38+
private PipelineCommands parent;
4039

4140
@CommandLine.Option(
4241
names = {"-t", "--replicationType"},
@@ -60,7 +59,7 @@ public Void call() throws Exception {
6059
throw new IllegalArgumentException(type.name()
6160
+ " is not supported yet.");
6261
}
63-
try (ScmClient scmClient = parent.createScmClient()) {
62+
try (ScmClient scmClient = parent.getParent().createScmClient()) {
6463
scmClient.createReplicationPipeline(
6564
type,
6665
factor,

0 commit comments

Comments
 (0)