hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-456) Problems with dfs.name.edits.dirs as URI
Date Fri, 03 Jul 2009 00:29:47 GMT

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

Konstantin Shvachko commented on HDFS-456:

In {{FSNamesystem.getNamespaceDirs()}} I replaced 
-    u = new URI("file://" + new File(name).getAbsolutePath());
+    u = new File(name).getAbsoluteFile().toURI();
And the name-node started well.

Some additional comments:
# {{getCanonicalFile()}} is preferrable to {{getAbsoluteFile()}} since the former replaces
. and .. and resolves links.
# You should use {{LOG.error(message, exception)}} instead of {{LOG.error(message + exception.getMessage())}}.
I saw this in 4 places.
# When file directories are specified as files rather than URIs the warning should explicitly
say that that this api is *deprecated*. Instead of
LOG.warn("Scheme is undefined for " + name);
LOG.warn("Please check your file system configuration in " +
I'd rather say
LOG.warn("Use of file paths for " + propertyName + " is deprecated. Instead URIs instead.");
The key words is deprecated, so that we could replace it with an error in next release, and
URI so that users new what to do.

> Problems with dfs.name.edits.dirs as URI
> ----------------------------------------
>                 Key: HDFS-456
>                 URL: https://issues.apache.org/jira/browse/HDFS-456
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Luca Telloli
>             Fix For: 0.21.0
> There are several problems with recent commit of HDFS-396.
> # It does not work with default configuration "file:///". Throws {{IllegalArgumentException}}.
> # *ALL* hdfs tests fail on Windows because "C:\mypath" is treated as an illegal URI.
Backward compatibility is not provided.
> # {{IllegalArgumentException}} should not be thrown within hdfs code because it is a
{{RuntimException}}. We should throw {{IOException}} instead. This was recently discussed
in another jira.
> # Why do we commit patches without running unit tests and test-patch? This is the minimum
requirement for a patch to qualify as committable, right?

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

View raw message