hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsh J (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8437) getLocalPathForWrite is not throwing any expection for invalid paths
Date Sun, 23 Sep 2012 17:13:08 GMT

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

Harsh J commented on HADOOP-8437:

Hi Brahma,

Couple of comments:

+        if (0 == dirs.size()) {

I feel this check can happen slightly more earlier as the hunk itself seems to suggest that
dirs is being utilized before we come to this new check.

+          throw new IOException("No dirs to select.Total dirs size is 0");

Please space the two sentences (general rule: Always a space after a punctuation mark, never

+    for (int i = 0; i < 256; i++) {
+      invalidPath.append("A");
+    }

Seems excessive to do this. Just declare a constant string? :-)

fail("not throwing the exception");

Lets describe failure strings better since it is a specific test we're carrying out/expecting
a failure from: "An exception should have been thrown when an invalid directory is used."

> getLocalPathForWrite is not throwing any expection for invalid paths
> --------------------------------------------------------------------
>                 Key: HADOOP-8437
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8437
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.0.0-alpha
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-8437.patch
> call dirAllocator.getLocalPathForWrite ( "/InvalidPath", conf );
> Here it will not thrown any exception but earlier version it used throw.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message