You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "bithw1 (via GitHub)" <gi...@apache.org> on 2024/09/25 04:45:07 UTC
[I] [SUPPORT] Hive incremental query option consume.max.commits=1 seems not working as expected [hudi]
bithw1 opened a new issue, #11998:
URL: https://github.com/apache/hudi/issues/11998
I am using Hudi 0.15.0,
I have an MOR table with 5 records, as follows:
```
hive> select * from hudi_mor_14_ro;
_hoodie_commit_time _hoodie_commit_seqno _hoodie_record_key _hoodie_partition_path _hoodie_file_name a b c
20240923202849814 20240923202849814_0_1 1 53baa9db-ee83-4c17-9b66-4e1ec2a7632d-0_0-173-131_20240923202852055.parquet 1 11 1
20240923202839778 20240923202839778_0_1 2 53baa9db-ee83-4c17-9b66-4e1ec2a7632d-0_0-173-131_20240923202852055.parquet 2 2 2
20240923202842621 20240923202842621_0_2 3 53baa9db-ee83-4c17-9b66-4e1ec2a7632d-0_0-173-131_20240923202852055.parquet 3 3 3
20240923202844926 20240923202844926_0_3 4 53baa9db-ee83-4c17-9b66-4e1ec2a7632d-0_0-173-131_20240923202852055.parquet 4 4 4
20240923202847174 20240923202847174_0_4 5 53baa9db-ee83-4c17-9b66-4e1ec2a7632d-0_0-173-131_20240923202852055.parquet 5 5 5
```
There are 5 commits there, one for each record.
I use following hive sql statement to to query:
```
set hoodie.hudi_mor_14_ro.consume.mode=INCREMENTAL;
set hoodie.hudi_mor_14_ro.consume.start.timestamp=20240923202842621;
set hoodie.hudi_mor_14_ro.consume.max.commits=1;
select * from hudi_mor_14_ro where `_hoodie_commit_time` > "20240923202842621";
```
With the above query, three records are queried out(all of them have _hoodie_commit_time larger than 20240923202842621)
I have thought only one record will be queried out because I have set max commit to be 1,
I would ask how could this happens or I have missed something, thanks.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [SUPPORT] Hive incremental query option consume.max.commits=1 seems not working as expected [hudi]
Posted by "bithw1 (via GitHub)" <gi...@apache.org>.
bithw1 closed issue #11998: [SUPPORT] Hive incremental query option consume.max.commits=1 seems not working as expected
URL: https://github.com/apache/hudi/issues/11998
--
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: [I] [SUPPORT] Hive incremental query option consume.max.commits=1 seems not working as expected [hudi]
Posted by "bithw1 (via GitHub)" <gi...@apache.org>.
bithw1 commented on issue #11998:
URL: https://github.com/apache/hudi/issues/11998#issuecomment-2373113826
> You are right, the behavior here is unexpected, I dig the code a little bit and find out the reason, in
>
> https://github.com/apache/hudi/blob/59d10808481ad127c43e817608be8f528325e519/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieMergeOnReadTableInputFormat.java#L197
>
> , we do filter the fs view by the given commits timeline and the incremental file paths, and then we fetch the latest file slice from the fs view, one reason is because even with mor write, there could have been file slice continuout write if the file slice is small enough(for default bloom filter index), if that happens, the latest file slice could have include all the commits there.
Thanks @danny0405 for the help!
--
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: [I] [SUPPORT] Hive incremental query option consume.max.commits=1 seems not working as expected [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #11998:
URL: https://github.com/apache/hudi/issues/11998#issuecomment-2373106284
You are right, the behavior here is unexpected, I dig the code a little bit and find out the reason, in https://github.com/apache/hudi/blob/59d10808481ad127c43e817608be8f528325e519/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieMergeOnReadTableInputFormat.java#L197, we do filter the fs view by the given commits timeline and the incremental file paths, and then we fetch the latest file slice from the fs view, one reason is because even with mor write, there could have been file slice continuout write if the file slice is small enough(for default bloom filter index), if that happens, the latest file slice could have include all the commits there.
--
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