[ https://issues.apache.org/jira/browse/HDFS-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Wang updated HDFS-3672: ------------------------------ Attachment: hdfs-3672-2.patch Newer version of the patch, addressing Todd and Tom's comments. One unfortunate bit is that to split the NN and DN RPCs, I needed to add a subclass of {{BlockLocation}} that hides a corresponding {{LocatedBlock}}. An array of these {{HdfsBlockLocation}} is now returned by {{DFS#getFileBlockLocations}}, and downcasted in {{DFSClient#getDiskBlockLocations}} to retrieve the {{LocatedBlock}}. I took Todd's advice about {{Integer.MAX_VALUE}} for denoting invalid blocks, but turn it a boolean accessible via {{DiskId#isValid}} before it's shown to consumers of {{FileSystem}}. Finally, I already renamed things to {{DiskBlockLocation}} based on Tom's comment, and reused the name {{HdfsBlockLocation}} for my {{LocatedBlock}} wrapper class. I can re-rename both of these if we don't like them. > Expose disk-location information for blocks to enable better scheduling > ----------------------------------------------------------------------- > > Key: HDFS-3672 > URL: https://issues.apache.org/jira/browse/HDFS-3672 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.0.0-alpha > Reporter: Andrew Wang > Assignee: Andrew Wang > Attachments: hdfs-3672-1.patch, hdfs-3672-2.patch > > > Currently, HDFS exposes on which datanodes a block resides, which allows > clients to make scheduling decisions for locality and load balancing. > Extending this to also expose on which disk on a datanode a block resides > would enable even better scheduling, on a per-disk rather than coarse > per-datanode basis. > This API would likely look similar to Filesystem#getFileBlockLocations, but > also involve a series of RPCs to the responsible datanodes to determine disk > ids. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira