[
https://issues.apache.org/jira/browse/HADOOP-3225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Douglas updated HADOOP-3225:
----------------------------------
Attachment: 3225-2.patch
One can be more specific with some of the generic types. There's no clean way
around the generic array param, but within RemoteException we can replace:
{code}
private Throwable instantiateException(Class<?> cls) throws Exception {
Constructor<?> cn = cls.getConstructor(String.class);
Throwable ex = (Throwable)cn.newInstance(this.getMessage());
ex.initCause(this);
return ex;
}
{code}
with
{code}
private IOException instantiateException(Class<? extends IOException> cls)
throws Exception {
Constructor<? extends IOException> cn = cls.getConstructor(String.class);
cn.setAccessible(true);
return (IOException)cn.newInstance(this.getMessage()).initCause(this);
}
{code}
The cast from newInstance is necessary because initCause returns Throwable,
though newInstance returns IOException. If we call instantiateException with
{code}
instantiateException(realClass.asSubclass(IOException.class));
{code}
Then the types hold together. +1 for everything else.
> FsShell showing null instead of a error message
> -----------------------------------------------
>
> Key: HADOOP-3225
> URL: https://issues.apache.org/jira/browse/HADOOP-3225
> Project: Hadoop Core
> Issue Type: Bug
> Components: dfs
> Affects Versions: 0.17.0
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Mahadev konar
> Priority: Blocker
> Fix For: 0.17.0
>
> Attachments: 3225-2.patch, ACException.patch, HADOOP-3225_1.patch,
> NullInRemoteExceptionMsg.patch
>
>
> Tried the following in 0.17 and trunk:
> User is nn_sze here
> {noformat}
> $ ./bin/hadoop fs -lsr /
> /foo <dir> 2008-04-09 17:19 rwx------ nn_sze
> supergroup
> /foo/bar <dir> 2008-04-09 17:19 rwxr-xr-x
> nn_sze supergroup
> {noformat}
> User is now tsz (non-superuser)
> {noformat}
> bash-3.2$ ./bin/hadoop fs -ls /foo
> ls: null
> bash-3.2$ ./bin/hadoop fs -put README.txt /foo
> put: null
> bash-3.2$ ./bin/hadoop fs -rmr /foo/bar
> rmr: null
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.