You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2009/11/07 02:59:41 UTC

[jira] Commented: (HADOOP-5958) Use JDK 1.6 File APIs in DF.java wherever possible

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

Todd Lipcon commented on HADOOP-5958:
-------------------------------------

- DF.java:37 - "has most of the functionality, and has better performance" - makes sense as a jira comment, but when that's the only implementation people may be left wondering "Better than what?" Best to specifically compare with PosixDF
- Now that there are two getDFs, one with a conf and one without, shouldn't one either be marked deprecated or private? I'd say we should leave the one that takes a Configuration and just ignore the configuration variable, unless we're certain we'll never want Configuration here again.
- We used to have a limit on how often df would be called. That's gone with the new implementation - I dunno if the interval was due to the fork overhead or actually some overhead in the calls themselves. Are the j.io.File implementations fast enough that we don't have to worry about it, or should JavaDF do some caching?
- For the unit test, you could use http://junit.org/apidocs/org/junit/Assert.html#assertEquals%28java.lang.String,%20double,%20double,%20double%29 though what you're doing now is fine too.

> Use JDK 1.6 File APIs in DF.java wherever possible
> --------------------------------------------------
>
>                 Key: HADOOP-5958
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5958
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Devaraj Das
>            Assignee: Aaron Kimball
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5958-hdfs.patch, HADOOP-5958-mapred.patch, HADOOP-5958.2.patch, HADOOP-5958.3.patch, HADOOP-5958.patch
>
>
> JDK 1.6 has File APIs like File.getFreeSpace() which should be used instead of spawning a command process for getting the various disk/partition related attributes. This would avoid spikes in memory consumption by tasks when things like LocalDirAllocator is used for creating paths on the filesystem.

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