[
https://issues.apache.org/jira/browse/HBASE-16398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15730682#comment-15730682
]
Thiruvel Thirumoolan commented on HBASE-16398:
----------------------------------------------
[~aoxiang],
Sorry about the delay. Thanks for the patch. Looks fine overall. Minor nits:
1. Can we move getStoreFilesLocatedStatus() to HRegionFileSystem? Since
getStoreFiles() is already part of it, would probably be a better place?
2. Move addToHDFSBlocksDistribution() to FSUtils, as
computeHDFSBlocksDistribution() is already part of it?
3. listLocatedStatus() - also to FSUtils, as we have listStatus() etc in that
class?
4. Make "LOG.debug("No StoreFiles for: " + familyDir);" as LOG.trace? My code
was based on 0.98 and hence it had debug(), sorry about that.
5. Do you think it would help to add a little bit of comment for these methods?
Sorry, since mine was a stand alone client code, I didn't have them.
> optimize HRegion computeHDFSBlocksDistribution
> ----------------------------------------------
>
> Key: HBASE-16398
> URL: https://issues.apache.org/jira/browse/HBASE-16398
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver
> Affects Versions: 2.0.0
> Reporter: binlijin
> Assignee: binlijin
> Fix For: 2.0.0
>
> Attachments: HBASE-16398.patch, HBASE-16398_v2.patch,
> LocatedBlockStatusComparison.java
>
>
> First i assume there is no reference and link in a region family's directory.
> Without the patch to computeHDFSBlocksDistribution for a region family, there
> is 1+2*N rpc call, N is hfile numbers, The first rpc call is to
> DistributedFileSystem#listStatus to get hfiles, for every hfile there is two
> rpc call DistributedFileSystem#getFileStatus(path) and then
> DistributedFileSystem#getFileBlockLocations(status, start, length).
> With the patch to computeHDFSBlocksDistribution for a region family, there is
> 2 rpc call, they are DistributedFileSystem#getFileStatus(path) and
> DistributedFileSystem#listLocatedStatus(final Path p, final PathFilter
> filter).
> So if there is at least one hfile, with the patch, the rpc call will less.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)