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 "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2010/02/02 20:28:18 UTC

[jira] Commented: (HADOOP-6532) Path objects are heavy

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

Tsz Wo (Nicholas), SZE commented on HADOOP-6532:
------------------------------------------------

- 10^6 Path objects
{noformat}
 num     #instances         #bytes  class name
----------------------------------------------
   1:       5993061      239722440  java.lang.String
   2:       1000000      144000000  java.net.URI
   3:       1003050      111550720  [C
   4:       1000000       24000000  org.apache.hadoop.fs.Path
{noformat}
A Path object ~= 239 + 144 + 111 + 24 = 518 bytes
Running time was 23986 ms

- 10^6 String objects
{noformat}
 num     #instances         #bytes  class name
----------------------------------------------
   1:       1002961      111456288  [C
   2:       1002973       40118920  java.lang.String
{noformat}
A String object ~= 111 + 40 = 151 bytes
Running time was 5834 ms

- 10^6 MyPath objects (MyPath only contains a String)
{noformat}
 num     #instances         #bytes  class name
----------------------------------------------
   1:       1002961      111456256  [C
   2:       1002973       40118920  java.lang.String
   3:       1000000       24000000  org.apache.hadoop.examples.Fun$MyPath
{noformat}
A MyPath object ~= 111 + 40 + 24 = 175 bytes
Running time was 6828 ms

> Path objects are heavy
> ----------------------
>
>                 Key: HADOOP-6532
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6532
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Compared with java.lang.String, org.apache.hadoop.fs.Path is much heavier since it contains URI.  The size of a Path is roughly 3 times of a String.  Will post some numbers in the comments.

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