[ 
https://issues.apache.org/jira/browse/HDDS-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495683#comment-16495683
 ] 

Arpit Agarwal commented on HDDS-116:
------------------------------------

Thanks [~hanishakoneru], the patch looks good.

Let's move the synchronization requirement to the caller because 
VolumeChoosingPolicy cannot correctly synchronize access to the list wrt list 
updates. Since VolumeSet will use the policy, it can hold the volumeSetLock 
before calling chooseVolume.

Few minor comments:
# We can use getTrimmedStringCollection here instead:
{code}
String[] dataDirs = conf.getStrings(DFS_DATANODE_DATA_DIR_KEY);
{code}
# Can you please add comments to these to explain what each of these fields 
contains, and the synchronization requirements? Looks like all three are 
protected by volumeSetLock.
{code}
  private List<VolumeInfo> volumeList;
  private List<VolumeInfo> failedVolumeList;
  private Map<Path, VolumeInfo> volumeMap;
{code}
# Don't need this comment since the {{@VisibleForTesting}} annotation conveys 
the same information.
{code}
  /**
   * Visible for testing.
   */
{code}

> Implement VolumeSet to manage disk volumes
> ------------------------------------------
>
>                 Key: HDDS-116
>                 URL: https://issues.apache.org/jira/browse/HDDS-116
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>            Priority: Major
>              Labels: ContainerIO
>             Fix For: 0.2.1
>
>         Attachments: HDDS-116-HDDS-48.001.patch, HDDS-116-HDDS-48.002.patch, 
> HDDS-116-HDDS-48.003.patch
>
>
> VolumeSet would be responsible for managing volumes in the Datanode. Some of 
> its functions are:
>  # Initialize volumes on startup
>  # Provide APIs to add/ remove volumes
>  # Choose and return volume to calling service based on the volume choosing 
> policy (currently implemented Round Robin choosing policy)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to