[
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)