|
[
Permlink
| « Hide
]
Mahadev konar added a comment - 22/Feb/08 08:01 PM
since hdfs:/// is an invalid uri... all the methods return an error saying that port out of range.. is that ok? or should we throw out invalid uri?
It would be good to throw readable error message. Invalid URI / missing host, port looks good
> since hdfs:/// is an invalid uri [...]
It's not invalid, it just doesn't specify a host and port. It should get its host and port from the default filesystem, if the default is hdfs, and otherwise throw an exception since the host & port are required in hdfs. In general, all paths are resolved against the default FileSystem URI. http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html#resolve(java.net.URI Thus if the default filesystem is HDFS, "hdfs:///foo" will resolve to the default filesystem's host and port, and if the default filesystem is not HDFS, then it will resolve to "hdfs:///foo", which should generate an exception, since HDFS requires a host and port. We could probably generate a better exception for this, in DistributedFileSystem#initialize(). this patch allows hdfs:/// uri and uses the default filesystem for this.
Here's a more general patch, that fixes this for all filesystems, rather than just HDFS. Now, whenever a Path is used with the same scheme as the default FileSystem but with no authority specified, the default FileSystem's authority will be used, if any.
Also:
+1 for a general patch.
the patch you uploaded doug has a line System.out.println(org.apache.hadoop.util.StringUtils.stringifyException(new Exception("foo"))); I guess it was for debugging purposes. Could you remove this line in the patch? everything else is fine. Updated version of patch with debug statement removed.
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376549/HADOOP-1967_3.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 3 new or modified tests. javadoc -1. The javadoc tool appears to have generated 1 warning messages. javac -1. The applied patch generated 620 javac compiler warnings (more than the trunk's current 619 warnings). release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1847/testReport/ This message is automatically generated. Fix javac and javadoc warnings.
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376748/HADOOP-1967_4.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 3 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1864/testReport/ This message is automatically generated. Integrated in Hadoop-trunk #416 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/416/
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||