[ 
https://issues.apache.org/jira/browse/HDFS-11448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995890#comment-15995890
 ] 

Arpit Agarwal edited comment on HDFS-11448 at 5/3/17 11:20 PM:
---------------------------------------------------------------

Thanks for updating the patch [~hanishakoneru]. The v2 patch looks good. A few 
comments:
# {{editsSyncDir.delete();}} should probably use {{FileUtil#fullyDelete}} 
instead.
# The loop in {{createEditsSyncDir}} should be deleted.
{code}
    // Wait for journal node to get formatted
    while (!journal.getStorage().isFormatted()) {

    }
{code}
# The syncer thread should not swallow InterruptedException. At least after 
catching InterruptedException it should invoke 
{{Thread.currentThread.interrupt()}} and return immediately. This needs to be 
fixed on lines 161, 181 and 189. Also there is a missing return after line 161.
# A minor comment: STORAGE_EDITS_SYNC looks out of place in the class 
StorageDirectory. Instead you can rewrite JNStorage#getEditsSyncDir as:
{code}
  File getEditsSyncDir() {
    return new File(sd.getRoot(), STORAGE_EDITS_SYNC);
  }
{code}


was (Author: arpitagarwal):
Thanks for updating the patch [~hanishakoneru]. The v2 patch looks good. A few 
comments:
# {{editsSyncDir.delete();}} should probably use {{FileUtil#fullyDelete}} 
instead.
# The loop in {{createEditsSyncDir}} should be deleted.
{code}
    // Wait for journal node to get formatted
    while (!journal.getStorage().isFormatted()) {

    }
{code}
# The syncer thread should not swallow InterruptedException. At least after 
catching InterruptedException it should invoke 
{{Thread.currentThread.interrupt()}} and return immediately. This needs to be 
fixed on lines 161, 181 and 189. Also there is a missing return after line 161.
# A minor comment: STORAGE_EDITS_SYNC looks out of place in the class 
StorageDirectory. Instead you can rewrite JNStorage#getEditsSyncDir as:
{code}
  File getEditsSyncDir() {
    return sd.getRoot() + STORAGE_EDITS_SYNC;
  }
{code}

> JN log segment syncing should support HA upgrade
> ------------------------------------------------
>
>                 Key: HDFS-11448
>                 URL: https://issues.apache.org/jira/browse/HDFS-11448
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>         Attachments: HDFS-11448.001.patch, HDFS-11448.002.patch
>
>
> HDFS-4025 adds support for sychronizing past log segments to JNs that missed 
> them. But, as pointed out by [~jingzhao], if the segment download happens 
> when an admin tries to rollback, it might fail ([see 
> comment|https://issues.apache.org/jira/browse/HDFS-4025?focusedCommentId=15850633&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15850633]).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to