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 28C5F108FA for ; Wed, 30 Apr 2014 08:48:25 +0000 (UTC) Received: (qmail 31659 invoked by uid 500); 30 Apr 2014 08:48:24 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 31191 invoked by uid 500); 30 Apr 2014 08:48:19 -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 30332 invoked by uid 99); 30 Apr 2014 08:48:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 08:48:16 +0000 Date: Wed, 30 Apr 2014 08:48:16 +0000 (UTC) From: "Uma Maheswara Rao G (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6302) Implement XAttr as a INode feature. 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-6302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985288#comment-13985288 ] Uma Maheswara Rao G commented on HDFS-6302: ------------------------------------------- Thanks a lot Yi, for the patch. Below are my initial comments on the patch. {code} if (f1 != null) { + throw new IllegalStateException("Duplicated XAttrsFeature"); + } {code} How about having the preconditions check like Preconditions.checkState? {code} +/** + * Feature for extends attributes. + */ {code} Is this "Feature for extended attributes." ? I agree that more higher level tests will come as part of other patches. But having some test with unit level is needed. How about adding some test for change like below? {code} @Test public void testXattrFeature() { replication = 3; preferredBlockSize = 128 * 1024 * 1024; INodeFile inf = createINodeFile(replication, preferredBlockSize); List list = new ArrayList(); list.add(new XAttr.Builder().setName("testxattrname") .setValue(new byte[] { 1, 2, 3 }).setNameSpace(NameSpace.USER).build()); ImmutableList ls= ImmutableList.copyOf(list); XAttrFeature f = new XAttrFeature(ls); inf.addXAttrsFeature(f); XAttrFeature xAttrsFeature = inf.getXAttrsFeature(); assertEquals("testxattrname", xAttrsFeature.getXAttrs().get(0).getName()); } } {code} > Implement XAttr as a INode feature. > ----------------------------------- > > Key: HDFS-6302 > URL: https://issues.apache.org/jira/browse/HDFS-6302 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Affects Versions: HDFS XAttrs (HDFS-2006) > Reporter: Yi Liu > Assignee: Yi Liu > Fix For: HDFS XAttrs (HDFS-2006) > > Attachments: HDFS-6302.patch > > > XAttr is based on INode feature(HDFS-5284). > Persisting XAttrs in fsimage and edit log is handled by HDFS-6301. -- This message was sent by Atlassian JIRA (v6.2#6252)