Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6EE8A17BBC for ; Fri, 17 Oct 2014 14:00:55 +0000 (UTC) Received: (qmail 75959 invoked by uid 500); 17 Oct 2014 14:00:55 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 75911 invoked by uid 500); 17 Oct 2014 14:00:55 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 75898 invoked by uid 99); 17 Oct 2014 14:00:55 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2014 14:00:55 +0000 Date: Fri, 17 Oct 2014 14:00:55 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7252) small refinement to the use of isInAnEZ in FSNamesystem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-7252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175066#comment-14175066 ] Hudson commented on HDFS-7252: ------------------------------ FAILURE: Integrated in Hadoop-Mapreduce-trunk #1929 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1929/]) HDFS-7252. small refinement to the use of isInAnEZ in FSNamesystem. (Yi Liu via vinayakumarb) (vinayakumarb: rev 368743140dd076ecd5af309c1ed83c5ae2d59fc8) * hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java > small refinement to the use of isInAnEZ in FSNamesystem > ------------------------------------------------------- > > Key: HDFS-7252 > URL: https://issues.apache.org/jira/browse/HDFS-7252 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.6.0 > Reporter: Yi Liu > Assignee: Yi Liu > Priority: Trivial > Fix For: 2.7.0 > > Attachments: HDFS-7252.001.patch, HDFS-7252.002.patch > > > In {{FSN#startFileInt}}, _EncryptionZoneManager#getEncryptionZoneForPath_ is invoked 3 times (_dir.isInAnEZ(iip)_, _dir.getEZForPath(iip)_, _dir.getKeyName(iip)_) in following code, actually we just need one. > {code} > if (dir.isInAnEZ(iip)) { > EncryptionZone zone = dir.getEZForPath(iip); > protocolVersion = chooseProtocolVersion(zone, supportedVersions); > suite = zone.getSuite(); > ezKeyName = dir.getKeyName(iip); > Preconditions.checkNotNull(protocolVersion); > Preconditions.checkNotNull(suite); > Preconditions.checkArgument(!suite.equals(CipherSuite.UNKNOWN), > "Chose an UNKNOWN CipherSuite!"); > Preconditions.checkNotNull(ezKeyName); > } > {code} > Also there are 2 times in following code, but just need one > {code} > if (dir.isInAnEZ(iip)) { > // The path is now within an EZ, but we're missing encryption parameters > if (suite == null || edek == null) { > throw new RetryStartFileException(); > } > // Path is within an EZ and we have provided encryption parameters. > // Make sure that the generated EDEK matches the settings of the EZ. > String ezKeyName = dir.getKeyName(iip); > if (!ezKeyName.equals(edek.getEncryptionKeyName())) { > throw new RetryStartFileException(); > } > feInfo = new FileEncryptionInfo(suite, version, > edek.getEncryptedKeyVersion().getMaterial(), > edek.getEncryptedKeyIv(), > ezKeyName, edek.getEncryptionKeyVersionName()); > Preconditions.checkNotNull(feInfo); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)