From hdfs-issues-return-277840-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Aug 16 02:39:11 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id BCAED180645 for ; Fri, 16 Aug 2019 04:39:10 +0200 (CEST) Received: (qmail 47785 invoked by uid 500); 16 Aug 2019 02:39:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 47270 invoked by uid 99); 16 Aug 2019 02:39:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2019 02:39:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BC7B1E3051 for ; Fri, 16 Aug 2019 02:39:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 85FFC27795 for ; Fri, 16 Aug 2019 02:39:00 +0000 (UTC) Date: Fri, 16 Aug 2019 02:39:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HDDS-1894) Support listPipelines by filters in scmcli MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDDS-1894?focusedWorklogId=3D2= 95969&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpan= el#worklog-295969 ] ASF GitHub Bot logged work on HDDS-1894: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Aug/19 02:38 Start Date: 16/Aug/19 02:38 Worklog Time Spent: 10m=20 Work Description: timmylicheng commented on pull request #1286: HDDS-= 1894. Add filter to scmcli listPipelines. URL: https://github.com/apache/hadoop/pull/1286#discussion_r314565875 =20 =20 ########## File path: hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/= pipeline/ListPipelinesSubcommand.java ########## @@ -38,11 +38,34 @@ @CommandLine.ParentCommand private SCMCLI parent; =20 + @CommandLine.Option( names =3D {"-ffc", "--filterByFactor"}, + description =3D "Filter listed pipelines by Factor(ONE/one)", de= faultValue =3D "", + required =3D false) + private String factor; + + @CommandLine.Option( names =3D {"-fst", "--filterByState"}, + description =3D "Filter listed pipelines by State(OPEN/CLOSE)", = defaultValue =3D "", + required =3D false) + private String state; + + @Override public Void call() throws Exception { try (ScmClient scmClient =3D parent.createScmClient()) { - scmClient.listPipelines().forEach(System.out::println); + if (isNullOrEmpty(factor) && isNullOrEmpty(state)) { + System.out.println("No filter. List all."); =20 Review comment: Removed =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 295969) Time Spent: 10m Remaining Estimate: 0h > Support listPipelines by filters in scmcli > ------------------------------------------ > > Key: HDDS-1894 > URL: https://issues.apache.org/jira/browse/HDDS-1894 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Xiaoyu Yao > Assignee: Li Cheng > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Today scmcli has a subcmd that allow list all pipelines. This ticket is o= pened to filter the results by switches, e.g., filter by Factor: THREE and = State: OPEN. This will be useful for trouble shooting in large cluster. > =C2=A0 > {code} > bin/ozone scmcli listPipelines > Pipeline[ Id: a8d1b0c9-e1d4-49ea-8746-3f61dfb5ee3f, Nodes: cce44fde-bc8d-= 4063-97b3-6f557af756e1\{ip: 10.17.112.65, host: ia0230.halxg.cloudera.com, = networkLocation: /default-rack, certSerialId: null}, Type:RATIS, Factor:ONE= , State:OPEN] > Pipeline[ Id: c9c453d1-d74c-4414-b87f-1d3585d78a7c, Nodes: 0b7b0b93-8323-= 4b82-8cc0-a9a5c10ab827\{ip: 10.17.112.29, host: ia0138.halxg.cloudera.com, = networkLocation: /default-rack, certSerialId: null}c756a0e0-5a1b-4d03-ba5b-= cafbcabac877\{ip: 10.17.112.27, host: ia0134.halxg.cloudera.com, networkLoc= ation: /default-rack, certSerialId: null}bee45bd7-1ee6-4726-b3d1-81476dc1eb= 49\{ip: 10.17.112.28, host: ia0136.halxg.cloudera.com, networkLocation: /de= fault-rack, certSerialId: null}, Type:RATIS, Factor:THREE, State:OPEN] > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org