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 679CF200C4E for ; Fri, 7 Apr 2017 02:06:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66433160BA4; Fri, 7 Apr 2017 00:06:49 +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 AE272160B9F for ; Fri, 7 Apr 2017 02:06:48 +0200 (CEST) Received: (qmail 36071 invoked by uid 500); 7 Apr 2017 00:06:46 -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 35510 invoked by uid 99); 7 Apr 2017 00:06:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 00:06:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id F1B2DC05E9 for ; Fri, 7 Apr 2017 00:06:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id CZ2ScESL2jrg for ; Fri, 7 Apr 2017 00:06:45 +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 953A15FCAC for ; Fri, 7 Apr 2017 00:06:44 +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 B97C5E0BD2 for ; Fri, 7 Apr 2017 00:06:43 +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 4FF8E240A5 for ; Fri, 7 Apr 2017 00:06:42 +0000 (UTC) Date: Fri, 7 Apr 2017 00:06:42 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HDFS-11565) Use compact identifiers for built-in ECPolicies in HdfsFileStatus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 07 Apr 2017 00:06:49 -0000 [ https://issues.apache.org/jira/browse/HDFS-11565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959995#comment-15959995 ] Wei-Chiu Chuang edited comment on HDFS-11565 at 4/7/17 12:06 AM: ----------------------------------------------------------------- [~andrew.wang] thanks for working it. The patch itself looks reasonable. Let's review it after HDFS-11623 is checked in. One issue I saw is {code} + if (policy == null) { + return new ErasureCodingPolicy(proto.getName(), + convertECSchema(proto.getSchema()), + proto.getCellSize(), id); + } {code} This means a new ErasureCodingPolicy object each time it is called. Shouldn't it be cached like SYSTEM_POLICIES_BY_NAME? was (Author: jojochuang): [~andrew.wang] thanks for working it. The patch itself looks reasonable. Let's review it after HDFS-11623 is checked in. One issue I saw is {code} + if (policy == null) { + return new ErasureCodingPolicy(proto.getName(), + convertECSchema(proto.getSchema()), + proto.getCellSize(), id); + } {code} This means a new ErasureCodingPolicy object each time it is called. Shouldn't it be cached like SYSTEM_POLICIES_BY_ID? > Use compact identifiers for built-in ECPolicies in HdfsFileStatus > ----------------------------------------------------------------- > > Key: HDFS-11565 > URL: https://issues.apache.org/jira/browse/HDFS-11565 > Project: Hadoop HDFS > Issue Type: Improvement > Components: erasure-coding > Affects Versions: 3.0.0-alpha2 > Reporter: Andrew Wang > Assignee: Andrew Wang > Priority: Blocker > Labels: hdfs-ec-3.0-must-do > Attachments: HDFS-11565.001.patch > > > Discussed briefly on HDFS-7337 with Kai Zheng. Quoting our convo: > {quote} > From looking at the protos, one other question I had is about the overhead of these protos when using the hardcoded policies. There are a bunch of strings and ints, which can be kind of heavy since they're added to each HdfsFileStatus. Should we make the built-in ones identified by purely an ID, with these fully specified protos used for the pluggable policies? > {quote} > {quote} > Sounds like this could be considered separately because, either built-in policies or plugged-in polices, the full meta info is maintained either by the codes or in the fsimage persisted, so identifying them by purely an ID should works fine. If agree, we could refactor the codes you mentioned above separately. > {quote} -- 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