You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Konstantin Shvachko (JIRA)" <ji...@apache.org> on 2007/08/22 20:12:30 UTC

[jira] Created: (HADOOP-1759) File name should be represented by a byte array instead of a String

File name should be represented by a byte array instead of a String
-------------------------------------------------------------------

                 Key: HADOOP-1759
                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
             Project: Hadoop
          Issue Type: Improvement
          Components: dfs
    Affects Versions: 0.14.0
            Reporter: Konstantin Shvachko
            Assignee: Konstantin Shvachko
             Fix For: 0.15.0
         Attachments: byteName.patch

This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Commented: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521995 ] 

Hadoop QA commented on HADOOP-1759:
-----------------------------------

+1

http://issues.apache.org/jira/secure/attachment/12364342/byteName.patch applied and successfully tested against trunk revision r568776.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/599/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/599/console

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Commented: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521939 ] 

Owen O'Malley commented on HADOOP-1759:
---------------------------------------

Can we please use a Text rather than a byte[]?

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Commented: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521975 ] 

Konstantin Shvachko commented on HADOOP-1759:
---------------------------------------------

This is about saving bytes.
Using Text as an object with a length field will add  24 bytes for each name.
For regular (ascii) file names String and Text have almost the same memory overhead.


> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Commented: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Sameer Paranjpye (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521974 ] 

Sameer Paranjpye commented on HADOOP-1759:
------------------------------------------

Don't think we should. This is a memory conservation exercise. Using a Text would mean an additional 28 bytes/file (16 byte JVM header + 8 byte reference  + 4 bytes of length), for 64-bit JVMs at any rate.

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Updated: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Shvachko updated HADOOP-1759:
----------------------------------------

    Status: Patch Available  (was: Open)

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Issue Comment Edited: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521975 ] 

shv edited comment on HADOOP-1759 at 8/22/07 5:15 PM:
----------------------------------------------------------------------

This is about saving bytes.
Using Text as an object with a length field will add  32 bytes (28 as Sameer calculated + padding) for each name.
For regular (ascii) file names String and Text have almost the same memory overhead.


      was (Author: shv):
    This is about saving bytes.
Using Text as an object with a length field will add  24 bytes for each name.
For regular (ascii) file names String and Text have almost the same memory overhead.

  
> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Updated: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Shvachko updated HADOOP-1759:
----------------------------------------

    Attachment: byteName.patch

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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


[jira] Updated: (HADOOP-1759) File name should be represented by a byte array instead of a String

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated HADOOP-1759:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Konstantin!

> File name should be represented by a byte array instead of a String
> -------------------------------------------------------------------
>
>                 Key: HADOOP-1759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1759
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: 0.15.0
>
>         Attachments: byteName.patch
>
>
> This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
> I submit it as a separate patch since it does not touch a lot of code, just INode.java

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