You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "lokeshj1703 (via GitHub)" <gi...@apache.org> on 2023/09/26 14:38:20 UTC
[GitHub] [hudi] lokeshj1703 opened a new pull request, #9789: [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates
lokeshj1703 opened a new pull request, #9789:
URL: https://github.com/apache/hudi/pull/9789
### Change Logs
org.apache.hudi.io.storage.HoodieAvroHFileReader.RecordIterator#hasNext uses org.apache.hadoop.hbase.io.hfile.HFileScanner#isSeeked to seek to the first line of the file.
```
if (!scanner.isSeeked()) {
hasRecords = scanner.seekTo();
}
```
if isSeeked returns false, scanner seeks to start of file.
After end of file is reached, isSeeked would still return false and the next time hasNext is called it seeks to start of file again leading to an infinite loop.
Documentation for HFileScanner#isSeeked
True is scanner has had one of the seek calls invoked; i.e. seekBefore(Cell) or seekTo() or seekTo(Cell). Otherwise returns false.
The PR adds a flag(eof) to return false for hasNext if flag is true.
### Impact
NA
### Risk level (write none, low medium or high below)
low
### Documentation Update
NA
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a diff in pull request #9789: [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9789:
URL: https://github.com/apache/hudi/pull/9789#discussion_r1338004317
##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieAvroHFileReader.java:
##########
@@ -684,6 +685,10 @@ private static class RecordIterator implements ClosableIterator<IndexedRecord> {
public boolean hasNext() {
try {
// NOTE: This is required for idempotency
+ if (eof) {
+ return false;
+ }
Review Comment:
Seems a fundamental change, why the HFile reader can work now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates [hudi]
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #9789:
URL: https://github.com/apache/hudi/pull/9789#discussion_r1369683789
##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieAvroHFileReader.java:
##########
@@ -684,6 +685,10 @@ private static class RecordIterator implements ClosableIterator<IndexedRecord> {
public boolean hasNext() {
try {
// NOTE: This is required for idempotency
+ if (eof) {
+ return false;
+ }
Review Comment:
Under what condition does the infinite iteration happen? How to reproduce it in a test?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates [hudi]
Posted by "bvaradar (via GitHub)" <gi...@apache.org>.
bvaradar commented on code in PR #9789:
URL: https://github.com/apache/hudi/pull/9789#discussion_r1376867703
##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieAvroHFileReader.java:
##########
@@ -684,6 +685,10 @@ private static class RecordIterator implements ClosableIterator<IndexedRecord> {
public boolean hasNext() {
try {
// NOTE: This is required for idempotency
+ if (eof) {
+ return false;
+ }
Review Comment:
This is being handled correctly in KeyPrefixIterator but is missing in this RecordIterator. The fix is to bring the change also to this class.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9789: [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9789:
URL: https://github.com/apache/hudi/pull/9789#issuecomment-1736028367
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20139",
"triggerID" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d11766540be7c6bedac57f4fbff553908d69bdad Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20139)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9789: [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9789:
URL: https://github.com/apache/hudi/pull/9789#issuecomment-1735752224
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d11766540be7c6bedac57f4fbff553908d69bdad UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9789: [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9789:
URL: https://github.com/apache/hudi/pull/9789#issuecomment-1735834557
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20139",
"triggerID" : "d11766540be7c6bedac57f4fbff553908d69bdad",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d11766540be7c6bedac57f4fbff553908d69bdad Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20139)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-6896] HoodieAvroHFileReader.RecordIterator iteration never terminates [hudi]
Posted by "bvaradar (via GitHub)" <gi...@apache.org>.
bvaradar merged PR #9789:
URL: https://github.com/apache/hudi/pull/9789
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org