From hdfs-dev-return-31723-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Mar 2 19:05:05 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7C42C18062F for ; Fri, 2 Mar 2018 19:05:04 +0100 (CET) Received: (qmail 84838 invoked by uid 500); 2 Mar 2018 18:05:03 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 84817 invoked by uid 99); 2 Mar 2018 18:05:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2018 18:05:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8D2D2C1809 for ; Fri, 2 Mar 2018 18:05:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qWO1NZxLBth1 for ; Fri, 2 Mar 2018 18:05:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3C29F5F1EE for ; Fri, 2 Mar 2018 18:05:01 +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 59323E00EA for ; Fri, 2 Mar 2018 18:05: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 17C0024775 for ; Fri, 2 Mar 2018 18:05:00 +0000 (UTC) Date: Fri, 2 Mar 2018 18:05:00 +0000 (UTC) From: "Lei (Eddy) Xu (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HDFS-13218) Log audit event only used last EC policy name when add multiple policies from file 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/HDFS-13218?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Lei (Eddy) Xu resolved HDFS-13218. ---------------------------------- Resolution: Duplicate Fix Version/s: 3.0.1 3.1.0 Target Version/s: 3.1.0, 3.0.2 Lets work on HDFS-13217. > Log audit event only used last EC policy name when add multiple policies = from file=20 > -------------------------------------------------------------------------= ---------- > > Key: HDFS-13218 > URL: https://issues.apache.org/jira/browse/HDFS-13218 > Project: Hadoop HDFS > Issue Type: Improvement > Components: erasure-coding > Affects Versions: 3.1.0 > Reporter: liaoyuxiangqin > Priority: Major > Fix For: 3.1.0, 3.0.1 > > > When i read the addErasureCodingPolicies()=C2=A0of=C2=A0FSNamesystem=C2= =A0class in namenode, i found the following code=C2=A0only used last ec pol= icy name for=C2=A0 logAuditEvent, i think this audit log can't=C2=A0track w= hole policies for the=C2=A0add multiple erasure coding policies to the Eras= ureCodingPolicyManager.=C2=A0Thanks. > {code:java|title=3DFSNamesystem.java|borderStyle=3Dsolid} > try { > checkOperation(OperationCategory.WRITE); > checkNameNodeSafeMode("Cannot add erasure coding policy"); > for (ErasureCodingPolicy policy : policies) { > try { > ErasureCodingPolicy newPolicy =3D > FSDirErasureCodingOp.addErasureCodingPolicy(this, policy, > logRetryCache); > addECPolicyName =3D newPolicy.getName(); > responses.add(new AddErasureCodingPolicyResponse(newPolicy)); > } catch (HadoopIllegalArgumentException e) { > responses.add(new AddErasureCodingPolicyResponse(policy, e)); > } > } > success =3D true; > return responses.toArray(new AddErasureCodingPolicyResponse[0]); > } finally { > writeUnlock(operationName); > if (success) { > getEditLog().logSync(); > } > logAuditEvent(success, operationName,addECPolicyName, null, null); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org