[ 
https://issues.apache.org/jira/browse/HADOOP-2902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581774#action_12581774
 ] 

stack commented on HADOOP-2902:
-------------------------------

Patch looks fine.  Applied.  Tests won't compile for me (r640362).  Two errors 
of same type in same file.  Here is one:

{code}
    [javac] 
/Users/stack/Documents/checkouts/hadoop-trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java:103:
 set(java.lang.String,java.lang.String) in org.apache.hadoop.conf.Configuration 
cannot be applied to (java.lang.String,java.net.URI)
    [javac]       conf2.set("mapred.job.tracker",
{code}

You need to toString it?

Couple of minor items.  Wouldn't put them in way of a commit.

Regards:

{code}+      if (namenode.startsWith("hdfs://")) {code}

...isn't there a define for "hdfs://" you could use or a method you could pass 
a URI to under dfs package that would tell you if its a HDFS URI?  (You do 
"hdfs://" multiple times in TestCopyFiles.  Same for the string "file:///").

Are you toStringing a URI and then creating a URI in the following code from 
TestCopyFiles?

{code}
+      namenode = FileSystem.getDefaultUri(conf).toString();
+      if (namenode.startsWith("hdfs://")) {
+        MyFile[] files = createFiles(URI.create(namenode), "/srcdat");
{code}






> replace accesss of "fs.default.name" with FileSystem accessor methods
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-2902
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2902
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>             Fix For: 0.17.0
>
>         Attachments: HADOOP-2902.patch, HADOOP-2902.patch
>
>
> HADOOP-1967 added accessor methods to set the default filesystem.  We should 
> start using them.
> While doing this, we should also replace uses of "local" and "host:port" with 
> proper URIs, e.g., "file:///" and "hdfs://host:port/".  This will silence 
> warnings about the use of old-format names.

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

Reply via email to