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 6381217AD3 for ; Tue, 2 Jun 2015 11:33:18 +0000 (UTC) Received: (qmail 6756 invoked by uid 500); 2 Jun 2015 11:33:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 6707 invoked by uid 500); 2 Jun 2015 11:33:18 -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 6695 invoked by uid 99); 2 Jun 2015 11:33:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2015 11:33:18 +0000 Date: Tue, 2 Jun 2015 11:33:18 +0000 (UTC) From: "Rakesh R (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8495) Consolidate append() related implementation into a single class 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-8495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568975#comment-14568975 ] Rakesh R commented on HDFS-8495: -------------------------------- # Checkstyle warnings: {code} ./hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAppendOp.java:29:8: Unused import - org.apache.hadoop.hdfs.protocol.ClientProtocol. ./hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAppendOp.java:39:8: Unused import - org.apache.hadoop.io.EnumSetWritable. {code} It seems checkstyle is not considering the imports which are used in javadoc references like below: {code} {@link ClientProtocol#append(String, String, EnumSetWritable)} {code} # Checkstyle warning: {code} ./hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAppendOp.java:131:23: More than 7 parameters (found 8). {code} It complains about the extra arguments in the following method. I gone through the function several times and IMHO it is good to maintain as a single function call. I couldn't find a better way to re-factor this:(. Also, after looking into the code base I could see this comment is not strictly followed in the project. Welcome any suggestions. Thanks! {code} static LocatedBlock prepareFileForAppend(FSNamesystem fsn, String src, INodesInPath iip, String leaseHolder, String clientMachine, boolean newBlock, boolean writeToEditLog, boolean logRetryCache) throws IOException { {code} > Consolidate append() related implementation into a single class > --------------------------------------------------------------- > > Key: HDFS-8495 > URL: https://issues.apache.org/jira/browse/HDFS-8495 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Reporter: Rakesh R > Assignee: Rakesh R > Attachments: HDFS-8495-000.patch > > > This jira proposes to consolidate {{FSNamesystem#append()}} related methods into a single class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)