[
https://issues.apache.org/jira/browse/HDFS-8397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545886#comment-14545886
]
Jing Zhao commented on HDFS-8397:
---------------------------------
Thanks for the refactoring, Nicholas! The patch looks pretty good to me. Only
some minors:
# {{setRestartingNodeIndex}} has not been used
# The value error is always false in the following code
{code}
if (!error) {
throw new IllegalStateException("error=" + error);
}
{code}
# Looks like {{checkRestartingNodeDeadline}} can return void.
{code}
if (errorState.checkRestartingNodeDeadline(nodes)) {
continue; // within the deadline
}
{code}
# Need to fix the checkstyle and whitespace warnings.
+1 after addressing the comments.
> Refactor the error handling code in DataStreamer
> ------------------------------------------------
>
> Key: HDFS-8397
> URL: https://issues.apache.org/jira/browse/HDFS-8397
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs-client
> Reporter: Tsz Wo Nicholas Sze
> Assignee: Tsz Wo Nicholas Sze
> Priority: Minor
> Attachments: h8397_20150513.patch, h8397_20150514.patch
>
>
> DataStreamer handles (1) bad datanode, (2) restarting datanode and (3)
> datanode replacement and keeps various state and indexes. This issue is to
> clean up the code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)