FAQ
Federation: FSVolumeSet volumes is not synchronized correctly
--------------------------------------------------------------

Key: HDFS-1720
URL: https://issues.apache.org/jira/browse/HDFS-1720
Project: Hadoop HDFS
Issue Type: Sub-task
Components: data-node
Affects Versions: Federation Branch
Reporter: Suresh Srinivas
Assignee: Suresh Srinivas
Fix For: Federation Branch
Attachments: HDFS-1720.patch

Currently FSVolumeSet#volumes is package private and is exposed to outside classes:
# Only some methods (such as FSVolumeSet#checkDirs()) are synchronized on FSVolumeSet.this. This method changes the
content of the array (sets volumes with errors to null).
# Some access to volumes are synchronized by FSDataset.this. Some access are not synchronized at all.

I propose making FSVolumeSet#unmodifiable list. This prevents accidental mutation from outside the class. The volumes
also are created anew when modifications are made.


--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

  • Suresh Srinivas (JIRA) at Mar 9, 2011 at 8:49 am
    [ https://issues.apache.org/jira/browse/HDFS-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Suresh Srinivas resolved HDFS-1720.
    -----------------------------------

    Resolution: Fixed
    Hadoop Flags: [Reviewed]

    I committed this patch.
    Federation: FSVolumeSet volumes is not synchronized correctly
    --------------------------------------------------------------

    Key: HDFS-1720
    URL: https://issues.apache.org/jira/browse/HDFS-1720
    Project: Hadoop HDFS
    Issue Type: Sub-task
    Components: data-node
    Affects Versions: Federation Branch
    Reporter: Suresh Srinivas
    Assignee: Suresh Srinivas
    Fix For: Federation Branch

    Attachments: HDFS-1720.1.patch, HDFS-1720.patch


    Currently FSVolumeSet#volumes is package private and is exposed to outside classes:
    # Only some methods (such as FSVolumeSet#checkDirs()) are synchronized on FSVolumeSet.this. This method changes the
    content of the array (sets volumes with errors to null).
    # Some access to volumes are synchronized by FSDataset.this. Some access are not synchronized at all.
    I propose making FSVolumeSet#unmodifiable list. This prevents accidental mutation from outside the class. The volumes
    also are created anew when modifications are made.
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouphdfs-dev @
categorieshadoop
postedMar 3, '11 at 9:10p
activeMar 9, '11 at 8:49a
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Suresh Srinivas (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase