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 2009/04/03 00:07:13 UTC

[jira] Created: (HADOOP-5618) Convert Storage.storageDirs into a map.

Convert Storage.storageDirs into a map.
---------------------------------------

                 Key: HADOOP-5618
                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
             Project: Hadoop Core
          Issue Type: Improvement
    Affects Versions: 0.21.0
            Reporter: Konstantin Shvachko
             Fix For: 0.21.0


{{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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


[jira] Commented: (HADOOP-5618) Convert Storage.storageDirs into a map.

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

Konstantin Shvachko commented on HADOOP-5618:
---------------------------------------------

I agree.

> Convert Storage.storageDirs into a map.
> ---------------------------------------
>
>                 Key: HADOOP-5618
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>
> {{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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


[jira] Updated: (HADOOP-5618) Convert Storage.storageDirs into a map.

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

Konstantin Shvachko updated HADOOP-5618:
----------------------------------------

    Component/s: dfs

> Convert Storage.storageDirs into a map.
> ---------------------------------------
>
>                 Key: HADOOP-5618
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>             Fix For: 0.21.0
>
>
> {{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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


[jira] Commented: (HADOOP-5618) Convert Storage.storageDirs into a map.

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699349#action_12699349 ] 

Jakob Homan commented on HADOOP-5618:
-------------------------------------

This actually isn't a good idea at this time.  The problem is that the implementation detail that storageDirs is an ordered list leaked out into many other places in the code and is now relied on.  Many places expect the iterator over the list to traverse it in the order the storage dirs were added to it, not by the path name associated with the storage (the most reasonable key to a map).  For instance, in FSEditLog.java, divertFileStreams is expecting to find corresponding storage dirs and edit streams to work over.  Of the 27 or so times that the DirIterator is used (which is based on this ArrayList), only one is actually searching for something like a pathname.  
There's certainly room to correct this but it should be done as a larger clean up of the fsimage code. Thoughts?

> Convert Storage.storageDirs into a map.
> ---------------------------------------
>
>                 Key: HADOOP-5618
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>
> {{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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


[jira] Assigned: (HADOOP-5618) Convert Storage.storageDirs into a map.

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

Jakob Homan reassigned HADOOP-5618:
-----------------------------------

    Assignee: Jakob Homan

> Convert Storage.storageDirs into a map.
> ---------------------------------------
>
>                 Key: HADOOP-5618
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>
> {{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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


[jira] Resolved: (HADOOP-5618) Convert Storage.storageDirs into a map.

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

Jakob Homan resolved HADOOP-5618.
---------------------------------

    Resolution: Won't Fix

Resolving as won't fix. 

> Convert Storage.storageDirs into a map.
> ---------------------------------------
>
>                 Key: HADOOP-5618
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5618
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>
> {{Storage.storageDirs}} is currently declared as an {{ArrayList}}. Recent changes made {{storageDirs}} a searchable collection. In order to reflect this changes the {{storageDirs}} type should be changed to a searchable collection. This will simplify and optimize current code.

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