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

Junping Du commented on HDFS-4990:
----------------------------------

Hi Nicholas, thanks for the patch. Just some initial comments as patch seems 
not finished:
{code}
+  public DatanodeStorageInfo[] chooseTarget(final String src,
{code}
Do we want to add StorageType to parameter so that DatanodeStorageInfo[] chosen 
here is with required storage type?
Also, the code below can pickup storageInfo on specific type in random sequence 
rather than always the first one.
{code}
+  static DatanodeStorageInfo[] toDatanodeStorageInfos(final 
DatanodeDescriptor[] targets) {
+    final DatanodeStorageInfo[] storages = new 
DatanodeStorageInfo[targets.length];
+    for(int i = 0; i < targets.length; i++) {
+      final DatanodeDescriptor dd = targets[i];
+      storages[i] = dd.getStorageInfos()[0]; 
+    }
+    return storages;
+  }
{code}
                
> Block placement for storage types
> ---------------------------------
>
>                 Key: HDFS-4990
>                 URL: https://issues.apache.org/jira/browse/HDFS-4990
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Suresh Srinivas
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h4990_20130909.patch
>
>
> Currently block location for writes are made based on:
> # Datanode load (number of transceivers)
> # Space left on datanode
> # Topology
> With storage abstraction, namenode must choose a storage instead of a 
> datanode for block placement. It also needs to consider storage type, load on 
> the storage etc.
> As an additional benefit, currently HDFS support heterogeneous nodes (nodes 
> with different number of spindles etc.) poorly. This work should help solve 
> that issue as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to