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

Kihwal Lee commented on HDFS-10756:
-----------------------------------

To be clear, this is not a performance bug, but a correctness bug.  It works 
with security off, but with security on, you see AccessControlException thrown 
to the internally created file system client. 
{noformat}
org.apache.hadoop.security.AccessControlException: Failed on local exception: 
org.apache.hadoop.security.AccessControlException: Client cannot authenticate 
via:[TOKEN, KERBEROS]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:831)
        at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:808)
        at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1551)
        at org.apache.hadoop.ipc.Client.call(Client.java:1493)
        at org.apache.hadoop.ipc.Client.call(Client.java:1392)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:234)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:120)
        at com.sun.proxy.$Proxy20.getServerDefaults(Unknown Source)
        at 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getServerDefaults(ClientNamenodeProtocolTranslatorPB.java:279)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:359)
        at com.sun.proxy.$Proxy21.getServerDefaults(Unknown Source)
        at 
org.apache.hadoop.hdfs.DFSClient.getServerDefaults(DFSClient.java:666)
        at 
org.apache.hadoop.hdfs.DFSClient.getKeyProviderUri(DFSClient.java:2967)
        at 
org.apache.hadoop.hdfs.DFSClient.isHDFSEncryptionEnabled(DFSClient.java:2992)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.getTrashRoot(DistributedFileSystem.java:2626)
        at 
org.apache.hadoop.hdfs.server.namenode.web.resources.NamenodeWebHdfsMethods.getTrashRoot(NamenodeWebHdfsMethods.java:1272)
{noformat}

> Expose getTrashRoot to HTTPFS and WebHDFS
> -----------------------------------------
>
>                 Key: HDFS-10756
>                 URL: https://issues.apache.org/jira/browse/HDFS-10756
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: encryption, httpfs, webhdfs
>            Reporter: Xiao Chen
>            Assignee: Yuanbo Liu
>            Priority: Major
>             Fix For: 2.9.0, 3.0.0-alpha2
>
>         Attachments: HDFS-10756.001.patch, HDFS-10756.002.patch, 
> HDFS-10756.003.patch, HDFS-10756.004.patch, HDFS-10756.005.patch, 
> HDFS-10756.006.patch, HDFS-10756.007.patch
>
>
> Currently, hadoop FileSystem API has 
> [getTrashRoot|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L2708]
>  to determine trash directory at run time. Default trash dir is under 
> {{/user/$USER}}
> For an encrypted file, since moving files between/in/out of EZs are not 
> allowed, when an EZ file is deleted via CLI, it calls in to [DFS 
> implementation|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L2485]
>  to move the file to a trash directory under the same EZ.
> This works perfectly fine for CLI users or java users who call FileSystem 
> API. But for users via httpfs/webhdfs, currently there is no way to figure 
> out what the trash root would be. This jira is proposing we add such 
> interface to httpfs and webhdfs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to