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

Colin Patrick McCabe commented on HDFS-4947:
--------------------------------------------

{code}
diff --git 
hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
 
hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
index 301fedc..615854b 100644
--- 
hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
+++ 
hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
@@ -52,6 +52,8 @@
 import org.apache.hadoop.oncrpc.XDR;
 import org.jboss.netty.channel.Channel;
 
+import com.google.common.base.Preconditions;
+
{code}

You're not using this in OpenFileCtx.java (yet?)

I see that in some cases, you are now calling {{getFileAtr}} rather than 
{{getWccAttr}}.  Is this an effort to avoid opening files whose permissions 
have been changed recently to be more restrictive?  I'm not sure what this has 
to do with the export table changes.
{code}
-      preOpAttr = Nfs3Utils.getWccAttr(dfsClient, fileIdPath);
+      preOpAttr = Nfs3Utils.getFileAttr(dfsClient, fileIdPath, iug);
{code}

Can you comment on how you plan to handle clients with multiple hostnames or IP 
addresses?  You seem to be matching textually for now, but might it make more 
sense to resolve the hostnames to sets of IP addresses and match from there?
                
> Add NFS server export table to control export by hostname or IP range
> ---------------------------------------------------------------------
>
>                 Key: HDFS-4947
>                 URL: https://issues.apache.org/jira/browse/HDFS-4947
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: nfs
>    Affects Versions: 3.0.0
>            Reporter: Brandon Li
>            Assignee: Jing Zhao
>         Attachments: HDFS-4947.000.patch, HDFS-4947.001.patch, 
> HDFS-4947.002.patch, HDFS-4947.003.patch
>
>
> This jira adds NFS server export table (hostname or IP range) to control 
> export. Specifically, it
> 1. adds two new classes AccessPrivilege and ClientHostsMatcher for loading 
> and checking the mapping between client hosts and their access privileges. 
> These two classes are directly copied from Brock Noland's NFS4 implementation.
> 2. adds the access check (based on the export) to NFS3 procedures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to