Vikas Vishwakarma created HBASE-20891:
-----------------------------------------
Summary: Avoid intermediate array to arraylist conversions while
loading scan cache
Key: HBASE-20891
URL: https://issues.apache.org/jira/browse/HBASE-20891
Project: HBase
Issue Type: Bug
Components: Client
Affects Versions: 3.0.0, 2.1.0
Reporter: Vikas Vishwakarma
Assignee: Vikas Vishwakarma
As discussed in HBASE-20866, we would like to avoid array to arraylist
conversions while loading scan cache which is currently happening as part of
partial result handling. In HBASE-20866 we are handling the changes for
branch-1.x. In this request we will handle it for branch-2 and master branch,
since the code has been refactored and will require more changes compared to
branch-1
Also preliminary look at the master branch shows that result handling has been
separated out into AllowPartialScanResultCache, BatchScanResultCache and
CompleteScanResultCache.
In case of BatchScanResultCache we are actually converting Result[] to
List<Result> for result grooming and then List<Result> back to toArray before
returning to loadCache() where it is added to cache.
So in case of BatchScanResultCache if we are able to directly load the results
to cache then we would be avoiding two intermediate conversions
* result Array to ArrayList in BatchScanResultCache for result grooming
* ArrayList to array conversion while returning to loadCache()
Which will probably give higher performance improvement compared to branch-1
case handled in HBASE-20866 where we avoided just one result array to arraylist
conversion and saw upto 10% improvement in scan performance
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)