Skip to content

Commit

Permalink
HDDS-2650 Fix createPipeline CLI. (apache#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmylicheng authored and ChenSammi committed Dec 12, 2019
1 parent 03c93ec commit 7c71710
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -20,7 +20,6 @@

import org.apache.hadoop.hdds.cli.HddsVersionProvider;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.scm.cli.SCMCLI;
import org.apache.hadoop.hdds.scm.client.ScmClient;
import picocli.CommandLine;

Expand All @@ -30,13 +29,13 @@
* Handler of createPipeline command.
*/
@CommandLine.Command(
name = "createPipeline",
name = "create",
description = "create pipeline",
mixinStandardHelpOptions = true,
versionProvider = HddsVersionProvider.class)
public class CreatePipelineSubcommand implements Callable<Void> {
@CommandLine.ParentCommand
private SCMCLI parent;
private PipelineCommands parent;

@CommandLine.Option(
names = {"-t", "--replicationType"},
Expand All @@ -60,7 +59,7 @@ public Void call() throws Exception {
throw new IllegalArgumentException(type.name()
+ " is not supported yet.");
}
try (ScmClient scmClient = parent.createScmClient()) {
try (ScmClient scmClient = parent.getParent().createScmClient()) {
scmClient.createReplicationPipeline(
type,
factor,
Expand Down

0 comments on commit 7c71710

Please sign in to comment.