hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingliang Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9349) Reconfigure NN protected directories on the fly
Date Tue, 10 Nov 2015 22:58:11 GMT

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

Mingliang Liu commented on HDFS-9349:
-------------------------------------

Thanks for working on this, [~xiaobingo].

Is it possible to eliminate the {{new TreeSet()}} when re-configurate the protected directories?
Plus, {{setProtectedDirectoriesToDefault()}} seems not needed as {{StringUtils.getTrimmedStringCollection()}}
accepts null value.

{code}
private final SortedSet<String> protectedDirectories;
  ....
void setProtectedDirectories(String dirString) {
  protectedDirRWL.writeLock().lock();
  try {
    protectedDirectories.clear();
    protectedDirectories.addAll(normalizePaths(
        StringUtils.getTrimmedStringCollection(dirString),
        FS_PROTECTED_DIRECTORIES));
  } finally {
    protectedDirRWL.writeLock().unlock();
  }
}
{code}

> Reconfigure NN protected directories on the fly
> -----------------------------------------------
>
>                 Key: HDFS-9349
>                 URL: https://issues.apache.org/jira/browse/HDFS-9349
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HDFS-9349.001.patch
>
>
> This is to reconfigure
> {code}
> fs.protected.directories
> {code}
> without restarting NN.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message