This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch libhdfs3
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/libhdfs3 by this push:
new 525b6a2 improve seek performence when seeking a wide range
new 23e6985 Merge pull request #2 from dujl/hdfs-scan
525b6a2 is described below
commit 525b6a2e697f02f5ab28417d4a6fb17a2eaced1b
Author: dujunling <[email protected]>
AuthorDate: Wed Aug 3 20:57:02 2022 +0800
improve seek performence when seeking a wide range
---
src/client/InputStreamImpl.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/InputStreamImpl.cpp b/src/client/InputStreamImpl.cpp
index 05f27a5..c8baa9c 100644
--- a/src/client/InputStreamImpl.cpp
+++ b/src/client/InputStreamImpl.cpp
@@ -734,7 +734,7 @@ void InputStreamImpl::seekInternal(int64_t pos) {
}
try {
- if (blockReader && pos > cursor && pos < endOfCurBlock) {
+ if (blockReader && pos > cursor && pos < endOfCurBlock && (pos -
cursor) <= blockReader->available()) {
blockReader->skip(pos - cursor);
cursor = pos;
return;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]