From hdfs-issues-return-272171-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Jul 16 02:48:13 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 EC46D180595 for ; Tue, 16 Jul 2019 04:48:12 +0200 (CEST) Received: (qmail 18323 invoked by uid 500); 16 Jul 2019 02:48:04 -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 17992 invoked by uid 99); 16 Jul 2019 02:48:04 -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; Tue, 16 Jul 2019 02:48:04 +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 90084E2F0A for ; Tue, 16 Jul 2019 02:48:02 +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 2F36C265A1 for ; Tue, 16 Jul 2019 02:48:01 +0000 (UTC) Date: Tue, 16 Jul 2019 02:48:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HDDS-1544) Support default Acls for volume, bucket, keys and prefix 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-1544?focusedWorklogId=3D2= 77149&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpan= el#worklog-277149 ] ASF GitHub Bot logged work on HDDS-1544: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Jul/19 02:47 Start Date: 16/Jul/19 02:47 Worklog Time Spent: 10m=20 Work Description: hadoop-yetus commented on pull request #1101: HDDS-= 1544. Support default Acls for volume, bucket, keys and prefix. =E2=80=A6 URL: https://github.com/apache/hadoop/pull/1101#discussion_r303709421 =20 =20 ########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozon= e/om/KeyManagerImpl.java ########## @@ -983,6 +1019,44 @@ public OmMultipartInfo applyInitiateMultipartUpload(= OmKeyArgs keyArgs, } } =20 + private List getAclsForKey(OmKeyArgs keyArgs,=20 + OmVolumeArgs volArgs, OmBucketInfo bucketInfo) { + List acls =3D new ArrayList<>(keyArgs.getAcls().size()); + + keyArgs.getAcls().stream().map(OzoneAcl::toProtobuf). + collect(Collectors.toList()); + + // Inherit DEFAULT acls from prefix. + boolean prefixParentFound =3D false; + if(prefixManager !=3D null) { + List prefixList =3D prefixManager.getLongestPrefixPath= ( + OZONE_URI_DELIMITER + + keyArgs.getVolumeName() + OZONE_URI_DELIMITER + + keyArgs.getBucketName() + OZONE_URI_DELIMITER + + keyArgs.getKeyName()); + + if(prefixList.size() > 0) { + // Add all acls from direct parent to key. + OmPrefixInfo prefixInfo =3D prefixList.get(prefixList.size() - 1); + if(prefixInfo !=3D null) { + acls.addAll(OzoneUtils.getDefaultAclsProto(prefixInfo.getAcls())= ); + prefixParentFound =3D true; + } + } + } + =20 Review comment: whitespace:end of line =20 =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: 277149) Time Spent: 12h 50m (was: 12h 40m) > Support default Acls for volume, bucket, keys and prefix > -------------------------------------------------------- > > Key: HDDS-1544 > URL: https://issues.apache.org/jira/browse/HDDS-1544 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Ajay Kumar > Assignee: Xiaoyu Yao > Priority: Major > Labels: pull-request-available > Attachments: HDDS-1544.00.patch > > Time Spent: 12h 50m > Remaining Estimate: 0h > > Add dAcls for volume, bucket, keys and prefix -- 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