Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7BC86200C81 for ; Fri, 26 May 2017 19:19:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 771E7160B9C; Fri, 26 May 2017 17:19:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C1EBB160BC8 for ; Fri, 26 May 2017 19:19:10 +0200 (CEST) Received: (qmail 81162 invoked by uid 500); 26 May 2017 17:19:09 -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 80972 invoked by uid 99); 26 May 2017 17:19:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 17:19:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E63191813AB for ; Fri, 26 May 2017 17:19:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vq0pdmSK_khI for ; Fri, 26 May 2017 17:19:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A75C55FD90 for ; Fri, 26 May 2017 17:19:05 +0000 (UTC) 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 16E31E0D50 for ; Fri, 26 May 2017 17:19:05 +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 8590621B5C for ; Fri, 26 May 2017 17:19:04 +0000 (UTC) Date: Fri, 26 May 2017 17:19:04 +0000 (UTC) From: "Anu Engineer (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11779) Ozone: KSM: add listBuckets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 26 May 2017 17:19:11 -0000 [ https://issues.apache.org/jira/browse/HDFS-11779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026529#comment-16026529 ] Anu Engineer commented on HDFS-11779: ------------------------------------- [~cheersyang] Thanks for the patch. My comments are based on the earlier patch, but I thought they are still relevant. Some very minor comments. * {{KeySpaceManagerProtocol.java}} and few other files. {code} import javax.annotation.Nullable; import javax.annotation.Nonnull; {code} Personally I like these annotations, but javax is traditionally a namespace that is used for UI. While I have no better suggestion (I know there are other projects which can provide this), would you please reconsider if we need to add these ? * {{BucketManagerImpl.java}} Check if this value is greater than 0 ? _maxNumOfBuckets_ * {{KeySpaceManager.java}} catch (Exception ex) ==> should this be IOException * {{MetadataManagerImpl.java}} Just a meta-comment -- {{getVolumeBucket}} I don't want to change this code in this patch, but I would like to formalize all these parsing assumptions in one single class -- so this info is localized in one file. * {{ResultCodes.FAILED_VOLUME_NOT_FOUND}} ==> VOLUME_NOT_FOUND * Please forgive me if my understanding is not correct. Would you not be able to collapse this into a single filter -- since /volume/prefix -- must match -- and both levelDB and RocksDB would do that match ? {code} 246 LevelDBKeyFilter bucketPrefixFilter = key -> { 247 String[] volumeBucket = getVolumeBucket(key); 248 return bucketPrefix == null ? true : 249 volumeBucket[1].startsWith(bucketPrefix); 250 }; 251 LevelDBKeyFilter volumeNameFilter = key -> { 252 String[] volumeBucket = getVolumeBucket(key); 253 return volumeName.equals(volumeBucket[0]); 254 }; {code} > Ozone: KSM: add listBuckets > --------------------------- > > Key: HDFS-11779 > URL: https://issues.apache.org/jira/browse/HDFS-11779 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ozone > Affects Versions: HDFS-7240 > Reporter: Anu Engineer > Assignee: Weiwei Yang > Attachments: HDFS-11779-HDFS-7240.001.patch, HDFS-11779-HDFS-7240.002.patch, HDFS-11779-HDFS-7240.003.patch, HDFS-11779-HDFS-7240.004.patch, HDFS-11779-HDFS-7240.005.patch, HDFS-11779-HDFS-7240.006.patch > > > Lists buckets of a given volume. Similar to listVolumes, paging supported via prevKey, prefix and maxKeys. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org