From e61825682a1fe19ccf43fae5ff64beb078d8af62 Mon Sep 17 00:00:00 2001 From: Vivek Ratnavel Subramanian Date: Sat, 17 Aug 2019 21:53:12 -0700 Subject: [PATCH] HDDS-1979. Fix checkstyle errors (#1312) --- .../cli/pipeline/ListPipelinesSubcommand.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/ListPipelinesSubcommand.java b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/ListPipelinesSubcommand.java index 1489ed06bf..51c4043486 100644 --- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/ListPipelinesSubcommand.java +++ b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/ListPipelinesSubcommand.java @@ -38,14 +38,16 @@ public class ListPipelinesSubcommand implements Callable { @CommandLine.ParentCommand private SCMCLI parent; - @CommandLine.Option( names = {"-ffc", "--filterByFactor"}, - description = "Filter listed pipelines by Factor(ONE/one)", defaultValue = "", - required = false) + @CommandLine.Option(names = {"-ffc", "--filterByFactor"}, + description = "Filter listed pipelines by Factor(ONE/one)", + defaultValue = "", + required = false) private String factor; - @CommandLine.Option( names = {"-fst", "--filterByState"}, - description = "Filter listed pipelines by State(OPEN/CLOSE)", defaultValue = "", - required = false) + @CommandLine.Option(names = {"-fst", "--filterByState"}, + description = "Filter listed pipelines by State(OPEN/CLOSE)", + defaultValue = "", + required = false) private String state; @@ -56,9 +58,12 @@ public Void call() throws Exception { scmClient.listPipelines().forEach(System.out::println); } else { scmClient.listPipelines().stream() - .filter(p -> ((isNullOrEmpty(factor) || (p.getFactor().toString().compareToIgnoreCase(factor) == 0)) - && (isNullOrEmpty(state) || (p.getPipelineState().toString().compareToIgnoreCase(state) == 0)))) - .forEach(System.out::println); + .filter(p -> ((isNullOrEmpty(factor) || + (p.getFactor().toString().compareToIgnoreCase(factor) == 0)) + && (isNullOrEmpty(state) || + (p.getPipelineState().toString().compareToIgnoreCase(state) + == 0)))) + .forEach(System.out::println); } return null; }