Skip to content

Commit

Permalink
Revert "HDDS-2650 Fix createPipeline CLI. (apache#340)"
Browse files Browse the repository at this point in the history
This reverts commit 7c71710.
  • Loading branch information
ChenSammi authored and timmylicheng committed Feb 12, 2020
1 parent e720e7a commit 5c6d412
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

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

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

0 comments on commit 5c6d412

Please sign in to comment.