hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-3108) NPE in FSDirectory.unprotectedSetPermission
Date Fri, 28 Mar 2008 12:44:24 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Konstantin Shvachko updated HADOOP-3108:

    Attachment: getNodeNPE.patch

I extended Nicholas's patch.
Found one more potential NPE related to getNode() method in FSDirectory.
TestPermissions failed in its original version because it was catching
FileNotFoundException but was receiving a RemoteException instead.

I wrote a unwrapRemoteException() method, which throws the cause of the
RemoteException if it is of the right type. I recommend using it instead
of analyzing the exception message.
I should say in general that handling of RemoteExceptions e.g. in connection
with FileNotFoundException is terrible. I will file a separate jira.
The test was not closing file system correctly, I fixed that.
And also a couple of findBugs warnings related to ignoring return values of called methods.
I used the same unwrapping for canMkdirs(), canCreate() and canOpen() methods:
this test is based on FileSystem API, which should not know anything about
RemoteException, because e.g. LocalFileSystem does not throw this, ever.
These changes affected TestDFSPermission, which in turn led to changes in 
DFSClient methods responsible, which report permission violations.
With all the changes TestPermissions now correctly tests the case of changing
permissions and owner of missing files Nicholas introduced.

All tests pass on my machine except for TestDFSShell. Something is wrong with getFileInfo().
Hudson is stuck again so I cannot verify on a different machine either.
Please somebody take a look.

> NPE in FSDirectory.unprotectedSetPermission
> -------------------------------------------
>                 Key: HADOOP-3108
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3108
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.16.1
>            Reporter: Koji Noguchi
>            Assignee: Konstantin Shvachko
>            Priority: Blocker
>             Fix For: 0.16.2
>         Attachments: 3108_20080327.patch, getNodeNPE.patch
> Not sure if this is fixed in later release, but I'm seeing many NPE in the namenode log.
> Permission is disabled on this cluster.
> {noformat} 
> 2008-03-27 03:22:39,984 INFO org.apache.hadoop.ipc.Server: IPC Server handler 18 on 8020,

> call setPermission(/user/knoguchi/file0, rwxr-xr-x) from 
> error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.dfs.FSDirectory.unprotectedSetPermission(FSDirectory.java:411)
>         at org.apache.hadoop.dfs.FSDirectory.setPermission(FSDirectory.java:405)
>         at org.apache.hadoop.dfs.FSNamesystem.setPermission(FSNamesystem.java:716)
>         at org.apache.hadoop.dfs.NameNode.setPermission(NameNode.java:297)
>         at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:409)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:899)
> {noformat} 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message