Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
For now we have already supportted using private readers for compaction, by creating a new StoreFile copy. I think a better way is to allow creating multiple readers from a single StoreFile instance, thus we can avoid the ugly cloning, and the reader can also be used for streaming scan, not only for compaction.
The reason we want to do this is that, we found a read amplification when using short circult read. BlockReaderLocal will use an internal buffer to read data first, the buffer size is based on the configured buffer size and the readahead option in CachingStrategy. For normal pread request, we should just bypass the buffer, this can be achieved by setting readahead to 0. But for streaming read I think the buffer is somehow still useful? So we need to use different FSDataInputStream for pread and streaming read.
And one more thing is that, we can also remove the streamLock if streaming read always use its own reader.
Attachments
Issue Links
- relates to
-
HBASE-18031 Reopen StoreFileScanners in background when switching from pread to stream
- Open
1.
|
Create a new reader instead of cloning a new StoreFile when compaction | Resolved | Duo Zhang | |
2.
|
Use pread by default for all user scan and switch to streaming read if needed | Resolved | Duo Zhang | |
3.
|
Add more options for PE tool | Resolved | Duo Zhang | |
4.
|
Backport HBASE-17914 to branch-1 | Resolved | Unassigned | |
5.
|
The new options for PE tool do not work | Resolved | Duo Zhang | |
6.
|
Backport HBASE-17917 to branch-1 | Resolved | Unassigned |