hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo Nicholas Sze (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7093) Allow unprivileged users to set storage policy
Date Sun, 28 Sep 2014 07:12:34 GMT

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

Tsz Wo Nicholas Sze commented on HDFS-7093:
-------------------------------------------

{code}
+    FSPermissionChecker pc = null;
+    if (restrictSetStoragePolicy) {
+      checkSuperuserPrivilege();
+    } else if (isPermissionEnabled) {
+      pc = getPermissionChecker();
+    }
{code}
If isPermissionEnabled is false, we should not checkSuperuserPrivilege().

BTW, let's change the new conf to dfs.storage.policy.enabled (which is similar to dfs.permissions.enabled
and other conf keys) so that it will enable/disable the storage policy feature for all users.

Here is my overall suggestion:
{code}
if (!isStoragePolicyEnabled) {
  throw IOException("Failed to set storage policy since "
      + DFS_STORAGE_POLICY_ENABLED_KEY + " is set to false.")
}
FSPermissionChecker pc = null;
if (isPermissionEnabled) {
  pc = getPermissionChecker();
}
{code}



> Allow unprivileged users to set storage policy
> ----------------------------------------------
>
>                 Key: HDFS-7093
>                 URL: https://issues.apache.org/jira/browse/HDFS-7093
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client, namenode
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>         Attachments: HDFS-7093.01.patch, HDFS-7093.02.patch, HDFS-7093.03.patch, HDFS-7093.04.patch
>
>
> Currently we do not allow unprivileged users to set the storage policy on a directory.
This Jira proposes removing this restriction.



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

Mime
View raw message