You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/05/27 04:47:23 UTC
[GitHub] [hudi] jintaoguan opened a new pull request #2999: Orc reader writer Implementation
jintaoguan opened a new pull request #2999:
URL: https://github.com/apache/hudi/pull/2999
## What is the purpose of the pull request
This pull request supports ORC storage in hudi.
## Brief change log
- Implemented HoodieOrcWriter
- Added HoodieOrcConfigs
- Added AvroOrcUtils that writes Avro record to VectorizedRowBatch
- Used orc-core:no-hive module (`no-hive` is needed because spark-sql uses no-hive version of orc and it would become easier for spark integration)
- Implemented HoodieOrcReader
- Read Avro records from VectorizedRowBatch
- Implemented OrcReaderIterator
- Implemented ORC utility functions
## Verify this pull request
- Added unit tests for
- reader/writer creation
- AvroOrcUtils
- (local) Wrote a small tool that reads from ORC/Parquet files and writes to ORC/Parquet files, verified that the records in the input/output files are identical using spark.read.orc/spark.read.parquet.
- (local) Changed the HoodieTableConfig.DEFAULT_BASE_FILE_FORMAT to force the tests to run with ORC as the base format. Some changes need to be made, but I'm leaving it out of this PR to get some initial feedback on the reader/writer implementation first.
For all tests to pass with ORC as the base file format:
- Understand schema evolution in ORC (ref TestUpdateSchemaEvolution)
- Add ORC support for places that have hardcoded ParquetReader or sqlContext.read().parquet()
- Add ORC support for bootstrap op
- Hive engine integration with ORC (implement HoodieOrcInputFormat, and more)
- Spark engine integration with ORC (implement HoodieInternalRowOrcWriter, and more)
- Add ORC support for HoodieSnapshotExporter
- Implement HDFSOrcImporter
- and possibly more.
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter commented on pull request #2999: Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (35a8cd9) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `45.69%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 9.27% -45.70%
+ Complexity 3844 48 -3796
============================================
Files 485 54 -431
Lines 23436 2016 -21420
Branches 2494 241 -2253
============================================
- Hits 12883 187 -12696
+ Misses 9400 1816 -7584
+ Partials 1153 13 -1140
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `9.27% <ø> (-61.56%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...lities/schema/SchemaProviderWithPostProcessor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFQcm92aWRlcldpdGhQb3N0UHJvY2Vzc29yLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [459 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a56ec21) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `46.48%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 8.48% -46.49%
+ Complexity 3844 62 -3782
============================================
Files 485 69 -416
Lines 23436 2863 -20573
Branches 2494 358 -2136
============================================
- Hits 12883 243 -12640
+ Misses 9400 2599 -6801
+ Partials 1153 21 -1132
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `6.79% <ø> (-39.66%)` | :arrow_down: |
| huditimelineservice | `?` | |
| hudiutilities | `9.17% <ø> (-61.67%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/hive/NonPartitionedExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTm9uUGFydGl0aW9uZWRFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [460 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (35a8cd9) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **increase** coverage by `15.86%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
=============================================
+ Coverage 54.97% 70.83% +15.86%
+ Complexity 3844 385 -3459
=============================================
Files 485 54 -431
Lines 23436 2016 -21420
Branches 2494 241 -2253
=============================================
- Hits 12883 1428 -11455
+ Misses 9400 454 -8946
+ Partials 1153 134 -1019
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `70.83% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...apache/hudi/common/model/HoodieCleaningPolicy.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUNsZWFuaW5nUG9saWN5LmphdmE=) | | |
| [...i/src/main/java/org/apache/hudi/cli/HoodieCLI.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jbGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY2xpL0hvb2RpZUNMSS5qYXZh) | | |
| [.../main/java/org/apache/hudi/cli/utils/HiveUtil.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jbGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY2xpL3V0aWxzL0hpdmVVdGlsLmphdmE=) | | |
| [...apache/hudi/common/util/ParquetReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvUGFycXVldFJlYWRlckl0ZXJhdG9yLmphdmE=) | | |
| [...va/org/apache/hudi/table/format/FilePathUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS90YWJsZS9mb3JtYXQvRmlsZVBhdGhVdGlscy5qYXZh) | | |
| [...e/hudi/common/util/queue/BoundedInMemoryQueue.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvcXVldWUvQm91bmRlZEluTWVtb3J5UXVldWUuamF2YQ==) | | |
| [...apache/hudi/common/model/WriteConcurrencyMode.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL1dyaXRlQ29uY3VycmVuY3lNb2RlLmphdmE=) | | |
| [.../hadoop/realtime/AbstractRealtimeRecordReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3JlYWx0aW1lL0Fic3RyYWN0UmVhbHRpbWVSZWNvcmRSZWFkZXIuamF2YQ==) | | |
| [.../apache/hudi/exception/TableNotFoundException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvZXhjZXB0aW9uL1RhYmxlTm90Rm91bmRFeGNlcHRpb24uamF2YQ==) | | |
| [...hudi/sink/partitioner/OverwriteBucketAssigner.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS9zaW5rL3BhcnRpdGlvbmVyL092ZXJ3cml0ZUJ1Y2tldEFzc2lnbmVyLmphdmE=) | | |
| ... and [418 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r650253725
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ Schema avroSchema;
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ avroSchema = AvroOrcUtils.createAvroSchema(reader.getSchema());
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return readAvroRecords(configuration, filePath, avroSchema);
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to create an ORC reader.", io);
+ }
+ return records;
+ }
+
+ /**
+ * Read the rowKey list from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return Set Set of row keys
+ */
+ public Set<String> readRowKeysFromOrc(Configuration configuration, Path filePath) {
+ return filterOrcRowKeys(configuration, filePath, new HashSet<>());
+ }
+
+ /**
+ * Read the rowKey list matching the given filter, from the given ORC file. If the filter is empty, then this will
+ * return all the rowkeys.
+ *
+ * @param conf configuration to build fs object.
+ * @param filePath The ORC file path.
+ * @param filter record keys filter
+ * @return Set Set of row keys matching candidateRecordKeys
+ */
+ public static Set<String> filterOrcRowKeys(Configuration conf,
+ Path filePath, Set<String> filter) throws HoodieIOException {
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+ Set<String> filteredRowKeys = new HashSet<>();
+ TypeDescription schema = reader.getSchema();
+ List<String> fieldNames = schema.getFieldNames();
+ VectorizedRowBatch batch = schema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(schema));
+
+ // column index for the RECORD_KEY_METADATA_FIELD field
+ int colIndex = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ colIndex = i;
+ break;
+ }
+ }
+ if (colIndex == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[colIndex];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ if (filter.isEmpty() || filter.contains(rowKey)) {
+ filteredRowKeys.add(rowKey);
+ }
+ }
+ }
+ return filteredRowKeys;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read row keys for ORC file" + filePath.getName(), io);
+ }
+ }
+
+ /**
+ * Read out the bloom filter from the ORC file meta data.
+ */
+ public static BloomFilter readBloomFilterFromOrcMetadata(Configuration conf, Path orcFilePath) {
+ Map<String, String> footerVals =
+ readOrcFooter(conf, orcFilePath, false,
+ HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+ HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE);
+ String footerVal = footerVals.get(HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+ BloomFilter toReturn = null;
+ if (footerVal != null) {
+ if (footerVals.containsKey(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE)) {
+ toReturn = BloomFilterFactory.fromString(footerVal,
+ footerVals.get(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE));
+ } else {
+ toReturn = BloomFilterFactory.fromString(footerVal, BloomFilterTypeCode.SIMPLE.name());
+ }
+ }
+ return toReturn;
+ }
+
+ public static String[] readMinMaxRecordKeys(Configuration conf, Path orcFilePath) {
+ Map<String, String> minMaxKeys = readOrcFooter(conf, orcFilePath, true,
+ HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER, HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER);
+ if (minMaxKeys.size() != 2) {
+ throw new HoodieException(
+ String.format("Could not read min/max record key out of footer correctly from %s. read) : %s",
+ orcFilePath, minMaxKeys));
+ }
+ return new String[] {minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER),
+ minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER)};
+ }
+
+ private static Map<String, String> readOrcFooter(Configuration conf, Path orcFilePath,
+ boolean required, String... footerNames) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ Map<String, String> footerVals = new HashMap<>();
+ List<UserMetadataItem> metadataItemList = reader.getFileTail().getFooter().getMetadataList();
+ Map<String, String> metadata = metadataItemList.stream().collect(Collectors.toMap(
+ UserMetadataItem::getName,
+ metadataItem -> metadataItem.getValue().toStringUtf8()));
+ for (String footerName : footerNames) {
+ if (metadata.containsKey(footerName)) {
+ footerVals.put(footerName, metadata.get(footerName));
+ } else if (required) {
+ throw new MetadataNotFoundException(
+ "Could not find index in ORC footer. Looked for key " + footerName + " in "
+ + orcFilePath);
+ }
+ }
+ return footerVals;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read footer for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static Schema getAvroSchema(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ TypeDescription orcSchema = reader.getSchema();
+ return AvroOrcUtils.createAvroSchema(orcSchema);
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get Avro schema for ORC file" + orcFilePath.getName(), io);
Review comment:
Updated.
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ Schema avroSchema;
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ avroSchema = AvroOrcUtils.createAvroSchema(reader.getSchema());
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return readAvroRecords(configuration, filePath, avroSchema);
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to create an ORC reader.", io);
+ }
+ return records;
+ }
+
+ /**
+ * Read the rowKey list from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return Set Set of row keys
+ */
+ public Set<String> readRowKeysFromOrc(Configuration configuration, Path filePath) {
+ return filterOrcRowKeys(configuration, filePath, new HashSet<>());
+ }
+
+ /**
+ * Read the rowKey list matching the given filter, from the given ORC file. If the filter is empty, then this will
+ * return all the rowkeys.
+ *
+ * @param conf configuration to build fs object.
+ * @param filePath The ORC file path.
+ * @param filter record keys filter
+ * @return Set Set of row keys matching candidateRecordKeys
+ */
+ public static Set<String> filterOrcRowKeys(Configuration conf,
+ Path filePath, Set<String> filter) throws HoodieIOException {
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+ Set<String> filteredRowKeys = new HashSet<>();
+ TypeDescription schema = reader.getSchema();
+ List<String> fieldNames = schema.getFieldNames();
+ VectorizedRowBatch batch = schema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(schema));
+
+ // column index for the RECORD_KEY_METADATA_FIELD field
+ int colIndex = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ colIndex = i;
+ break;
+ }
+ }
+ if (colIndex == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[colIndex];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ if (filter.isEmpty() || filter.contains(rowKey)) {
+ filteredRowKeys.add(rowKey);
+ }
+ }
+ }
+ return filteredRowKeys;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read row keys for ORC file" + filePath.getName(), io);
+ }
+ }
+
+ /**
+ * Read out the bloom filter from the ORC file meta data.
+ */
+ public static BloomFilter readBloomFilterFromOrcMetadata(Configuration conf, Path orcFilePath) {
+ Map<String, String> footerVals =
+ readOrcFooter(conf, orcFilePath, false,
+ HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+ HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE);
+ String footerVal = footerVals.get(HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+ BloomFilter toReturn = null;
+ if (footerVal != null) {
+ if (footerVals.containsKey(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE)) {
+ toReturn = BloomFilterFactory.fromString(footerVal,
+ footerVals.get(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE));
+ } else {
+ toReturn = BloomFilterFactory.fromString(footerVal, BloomFilterTypeCode.SIMPLE.name());
+ }
+ }
+ return toReturn;
+ }
+
+ public static String[] readMinMaxRecordKeys(Configuration conf, Path orcFilePath) {
+ Map<String, String> minMaxKeys = readOrcFooter(conf, orcFilePath, true,
+ HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER, HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER);
+ if (minMaxKeys.size() != 2) {
+ throw new HoodieException(
+ String.format("Could not read min/max record key out of footer correctly from %s. read) : %s",
+ orcFilePath, minMaxKeys));
+ }
+ return new String[] {minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER),
+ minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER)};
+ }
+
+ private static Map<String, String> readOrcFooter(Configuration conf, Path orcFilePath,
+ boolean required, String... footerNames) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ Map<String, String> footerVals = new HashMap<>();
+ List<UserMetadataItem> metadataItemList = reader.getFileTail().getFooter().getMetadataList();
+ Map<String, String> metadata = metadataItemList.stream().collect(Collectors.toMap(
+ UserMetadataItem::getName,
+ metadataItem -> metadataItem.getValue().toStringUtf8()));
+ for (String footerName : footerNames) {
+ if (metadata.containsKey(footerName)) {
+ footerVals.put(footerName, metadata.get(footerName));
+ } else if (required) {
+ throw new MetadataNotFoundException(
+ "Could not find index in ORC footer. Looked for key " + footerName + " in "
+ + orcFilePath);
+ }
+ }
+ return footerVals;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read footer for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static Schema getAvroSchema(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ TypeDescription orcSchema = reader.getSchema();
+ return AvroOrcUtils.createAvroSchema(orcSchema);
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get Avro schema for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static long getRowCount(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ return reader.getNumberOfRows();
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get row count for ORC file" + orcFilePath.getName(), io);
Review comment:
Updated
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
Review comment:
I made `OrcUtils` subclasses of `BaseFileUtils` and moved some common implementation to `BaseFileUtils` to reduce code duplication.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] prashantwason commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
prashantwason commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r645677619
##########
File path: hudi-common/src/test/java/org/apache/hudi/io/storage/TestHoodieOrcReader.java
##########
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.io.storage;
+
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.common.util.AvroOrcUtils;
+import org.apache.orc.CompressionKind;
+import org.apache.orc.OrcFile;
+import org.apache.orc.TypeDescription;
+import org.apache.orc.Writer;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
+import org.apache.orc.storage.ql.exec.vector.LongColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.hudi.common.testutils.SchemaTestUtil.getSchemaFromResource;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class TestHoodieOrcReader {
Review comment:
All the tests in this file are covered through TestHoodieOrcWriter tests (to test the reader you write first).
So I suggest, you rename TestHoodieOrcWriter to TestHoodieOrcReaderWriter and remove this file.
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ Schema avroSchema = AvroOrcUtils.createAvroSchema(orcSchema);
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return records;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
Review comment:
This code looks the same as the previous function except for the schema. Can the previous function call this function after reading the schema? Prevents code duplication.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-859974391
@leesf We have an umbrella ticket [HUDI-57](https://issues.apache.org/jira/browse/HUDI-57 ) that contains all the subtasks.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f564b0f) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `45.69%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 9.27% -45.70%
+ Complexity 3844 48 -3796
============================================
Files 485 54 -431
Lines 23436 2016 -21420
Branches 2494 241 -2253
============================================
- Hits 12883 187 -12696
+ Misses 9400 1816 -7584
+ Partials 1153 13 -1140
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `9.27% <ø> (-61.56%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...lities/schema/SchemaProviderWithPostProcessor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFQcm92aWRlcldpdGhQb3N0UHJvY2Vzc29yLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [459 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-861684975
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cc731794bc22494488d94eb4e951105125ab5b97",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=203",
"triggerID" : "cc731794bc22494488d94eb4e951105125ab5b97",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cc731794bc22494488d94eb4e951105125ab5b97 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=203)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (916a86c) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `46.48%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 8.48% -46.49%
+ Complexity 3844 62 -3782
============================================
Files 485 69 -416
Lines 23436 2863 -20573
Branches 2494 358 -2136
============================================
- Hits 12883 243 -12640
+ Misses 9400 2599 -6801
+ Partials 1153 21 -1132
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `6.79% <ø> (-39.66%)` | :arrow_down: |
| huditimelineservice | `?` | |
| hudiutilities | `9.17% <ø> (-61.67%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/hive/NonPartitionedExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTm9uUGFydGl0aW9uZWRFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [460 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
leesf commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-859580338
@jintaoguan would you please create jira tickets to track the follow-ups
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f69c95) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `46.48%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 8.48% -46.49%
+ Complexity 3844 62 -3782
============================================
Files 485 69 -416
Lines 23436 2863 -20573
Branches 2494 358 -2136
============================================
- Hits 12883 243 -12640
+ Misses 9400 2599 -6801
+ Partials 1153 21 -1132
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `6.79% <ø> (-39.66%)` | :arrow_down: |
| huditimelineservice | `?` | |
| hudiutilities | `9.17% <ø> (-61.67%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/hive/NonPartitionedExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTm9uUGFydGl0aW9uZWRFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [460 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r647842633
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -0,0 +1,798 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.sql.Timestamp;
+import java.util.Base64;
+import java.util.Date;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.avro.Conversions;
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema.Field;
+import org.apache.avro.generic.GenericData;
+import java.nio.charset.StandardCharsets;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData.StringType;
+import org.apache.avro.util.Utf8;
+import org.apache.orc.storage.common.type.HiveDecimal;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DecimalColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DoubleColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ListColumnVector;
+import org.apache.orc.storage.ql.exec.vector.LongColumnVector;
+import org.apache.orc.storage.ql.exec.vector.MapColumnVector;
+import org.apache.orc.storage.ql.exec.vector.StructColumnVector;
+import org.apache.orc.storage.ql.exec.vector.TimestampColumnVector;
+import org.apache.orc.storage.ql.exec.vector.UnionColumnVector;
+import org.apache.orc.storage.serde2.io.DateWritable;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Methods including addToVector, addUnionValue, createOrcSchema are originally from
Review comment:
Could you elaborate? Sorry I am not familiar with LICENSE and NOTICE requirements.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r648715398
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -0,0 +1,798 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.sql.Timestamp;
+import java.util.Base64;
+import java.util.Date;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.avro.Conversions;
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema.Field;
+import org.apache.avro.generic.GenericData;
+import java.nio.charset.StandardCharsets;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData.StringType;
+import org.apache.avro.util.Utf8;
+import org.apache.orc.storage.common.type.HiveDecimal;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DecimalColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DoubleColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ListColumnVector;
+import org.apache.orc.storage.ql.exec.vector.LongColumnVector;
+import org.apache.orc.storage.ql.exec.vector.MapColumnVector;
+import org.apache.orc.storage.ql.exec.vector.StructColumnVector;
+import org.apache.orc.storage.ql.exec.vector.TimestampColumnVector;
+import org.apache.orc.storage.ql.exec.vector.UnionColumnVector;
+import org.apache.orc.storage.serde2.io.DateWritable;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Methods including addToVector, addUnionValue, createOrcSchema are originally from
Review comment:
I added the statements in the LICENSE and NOTICE files in the latest PR.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-861684975
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cc731794bc22494488d94eb4e951105125ab5b97",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cc731794bc22494488d94eb4e951105125ab5b97",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cc731794bc22494488d94eb4e951105125ab5b97 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
leesf commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r649960195
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
Review comment:
I see the OrcUtils is almost same to ParquetUtils, would we do some refactor?
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
Review comment:
I see the OrcUtils is almost same to ParquetUtils, would we do some refactor?
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ Schema avroSchema;
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ avroSchema = AvroOrcUtils.createAvroSchema(reader.getSchema());
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return readAvroRecords(configuration, filePath, avroSchema);
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to create an ORC reader.", io);
+ }
+ return records;
+ }
+
+ /**
+ * Read the rowKey list from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return Set Set of row keys
+ */
+ public Set<String> readRowKeysFromOrc(Configuration configuration, Path filePath) {
+ return filterOrcRowKeys(configuration, filePath, new HashSet<>());
+ }
+
+ /**
+ * Read the rowKey list matching the given filter, from the given ORC file. If the filter is empty, then this will
+ * return all the rowkeys.
+ *
+ * @param conf configuration to build fs object.
+ * @param filePath The ORC file path.
+ * @param filter record keys filter
+ * @return Set Set of row keys matching candidateRecordKeys
+ */
+ public static Set<String> filterOrcRowKeys(Configuration conf,
+ Path filePath, Set<String> filter) throws HoodieIOException {
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+ Set<String> filteredRowKeys = new HashSet<>();
+ TypeDescription schema = reader.getSchema();
+ List<String> fieldNames = schema.getFieldNames();
+ VectorizedRowBatch batch = schema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(schema));
+
+ // column index for the RECORD_KEY_METADATA_FIELD field
+ int colIndex = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ colIndex = i;
+ break;
+ }
+ }
+ if (colIndex == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[colIndex];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ if (filter.isEmpty() || filter.contains(rowKey)) {
+ filteredRowKeys.add(rowKey);
+ }
+ }
+ }
+ return filteredRowKeys;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read row keys for ORC file" + filePath.getName(), io);
+ }
+ }
+
+ /**
+ * Read out the bloom filter from the ORC file meta data.
+ */
+ public static BloomFilter readBloomFilterFromOrcMetadata(Configuration conf, Path orcFilePath) {
+ Map<String, String> footerVals =
+ readOrcFooter(conf, orcFilePath, false,
+ HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+ HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE);
+ String footerVal = footerVals.get(HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+ BloomFilter toReturn = null;
+ if (footerVal != null) {
+ if (footerVals.containsKey(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE)) {
+ toReturn = BloomFilterFactory.fromString(footerVal,
+ footerVals.get(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE));
+ } else {
+ toReturn = BloomFilterFactory.fromString(footerVal, BloomFilterTypeCode.SIMPLE.name());
+ }
+ }
+ return toReturn;
+ }
+
+ public static String[] readMinMaxRecordKeys(Configuration conf, Path orcFilePath) {
+ Map<String, String> minMaxKeys = readOrcFooter(conf, orcFilePath, true,
+ HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER, HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER);
+ if (minMaxKeys.size() != 2) {
+ throw new HoodieException(
+ String.format("Could not read min/max record key out of footer correctly from %s. read) : %s",
+ orcFilePath, minMaxKeys));
+ }
+ return new String[] {minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER),
+ minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER)};
+ }
+
+ private static Map<String, String> readOrcFooter(Configuration conf, Path orcFilePath,
+ boolean required, String... footerNames) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ Map<String, String> footerVals = new HashMap<>();
+ List<UserMetadataItem> metadataItemList = reader.getFileTail().getFooter().getMetadataList();
+ Map<String, String> metadata = metadataItemList.stream().collect(Collectors.toMap(
+ UserMetadataItem::getName,
+ metadataItem -> metadataItem.getValue().toStringUtf8()));
+ for (String footerName : footerNames) {
+ if (metadata.containsKey(footerName)) {
+ footerVals.put(footerName, metadata.get(footerName));
+ } else if (required) {
+ throw new MetadataNotFoundException(
+ "Could not find index in ORC footer. Looked for key " + footerName + " in "
+ + orcFilePath);
+ }
+ }
+ return footerVals;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read footer for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static Schema getAvroSchema(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ TypeDescription orcSchema = reader.getSchema();
+ return AvroOrcUtils.createAvroSchema(orcSchema);
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get Avro schema for ORC file" + orcFilePath.getName(), io);
Review comment:
nit: "file: " + orcFilePath.getName()
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ Schema avroSchema;
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ avroSchema = AvroOrcUtils.createAvroSchema(reader.getSchema());
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return readAvroRecords(configuration, filePath, avroSchema);
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to create an ORC reader.", io);
+ }
+ return records;
+ }
+
+ /**
+ * Read the rowKey list from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return Set Set of row keys
+ */
+ public Set<String> readRowKeysFromOrc(Configuration configuration, Path filePath) {
+ return filterOrcRowKeys(configuration, filePath, new HashSet<>());
+ }
+
+ /**
+ * Read the rowKey list matching the given filter, from the given ORC file. If the filter is empty, then this will
+ * return all the rowkeys.
+ *
+ * @param conf configuration to build fs object.
+ * @param filePath The ORC file path.
+ * @param filter record keys filter
+ * @return Set Set of row keys matching candidateRecordKeys
+ */
+ public static Set<String> filterOrcRowKeys(Configuration conf,
+ Path filePath, Set<String> filter) throws HoodieIOException {
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+ Set<String> filteredRowKeys = new HashSet<>();
+ TypeDescription schema = reader.getSchema();
+ List<String> fieldNames = schema.getFieldNames();
+ VectorizedRowBatch batch = schema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(schema));
+
+ // column index for the RECORD_KEY_METADATA_FIELD field
+ int colIndex = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ colIndex = i;
+ break;
+ }
+ }
+ if (colIndex == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[colIndex];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ if (filter.isEmpty() || filter.contains(rowKey)) {
+ filteredRowKeys.add(rowKey);
+ }
+ }
+ }
+ return filteredRowKeys;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read row keys for ORC file" + filePath.getName(), io);
+ }
+ }
+
+ /**
+ * Read out the bloom filter from the ORC file meta data.
+ */
+ public static BloomFilter readBloomFilterFromOrcMetadata(Configuration conf, Path orcFilePath) {
+ Map<String, String> footerVals =
+ readOrcFooter(conf, orcFilePath, false,
+ HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+ HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE);
+ String footerVal = footerVals.get(HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+ BloomFilter toReturn = null;
+ if (footerVal != null) {
+ if (footerVals.containsKey(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE)) {
+ toReturn = BloomFilterFactory.fromString(footerVal,
+ footerVals.get(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE));
+ } else {
+ toReturn = BloomFilterFactory.fromString(footerVal, BloomFilterTypeCode.SIMPLE.name());
+ }
+ }
+ return toReturn;
+ }
+
+ public static String[] readMinMaxRecordKeys(Configuration conf, Path orcFilePath) {
+ Map<String, String> minMaxKeys = readOrcFooter(conf, orcFilePath, true,
+ HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER, HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER);
+ if (minMaxKeys.size() != 2) {
+ throw new HoodieException(
+ String.format("Could not read min/max record key out of footer correctly from %s. read) : %s",
+ orcFilePath, minMaxKeys));
+ }
+ return new String[] {minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER),
+ minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER)};
+ }
+
+ private static Map<String, String> readOrcFooter(Configuration conf, Path orcFilePath,
+ boolean required, String... footerNames) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ Map<String, String> footerVals = new HashMap<>();
+ List<UserMetadataItem> metadataItemList = reader.getFileTail().getFooter().getMetadataList();
+ Map<String, String> metadata = metadataItemList.stream().collect(Collectors.toMap(
+ UserMetadataItem::getName,
+ metadataItem -> metadataItem.getValue().toStringUtf8()));
+ for (String footerName : footerNames) {
+ if (metadata.containsKey(footerName)) {
+ footerVals.put(footerName, metadata.get(footerName));
+ } else if (required) {
+ throw new MetadataNotFoundException(
+ "Could not find index in ORC footer. Looked for key " + footerName + " in "
+ + orcFilePath);
+ }
+ }
+ return footerVals;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read footer for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static Schema getAvroSchema(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ TypeDescription orcSchema = reader.getSchema();
+ return AvroOrcUtils.createAvroSchema(orcSchema);
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get Avro schema for ORC file" + orcFilePath.getName(), io);
Review comment:
"file: " + orcFilePath.getName()
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ Schema avroSchema;
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ avroSchema = AvroOrcUtils.createAvroSchema(reader.getSchema());
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return readAvroRecords(configuration, filePath, avroSchema);
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to create an ORC reader.", io);
+ }
+ return records;
+ }
+
+ /**
+ * Read the rowKey list from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return Set Set of row keys
+ */
+ public Set<String> readRowKeysFromOrc(Configuration configuration, Path filePath) {
+ return filterOrcRowKeys(configuration, filePath, new HashSet<>());
+ }
+
+ /**
+ * Read the rowKey list matching the given filter, from the given ORC file. If the filter is empty, then this will
+ * return all the rowkeys.
+ *
+ * @param conf configuration to build fs object.
+ * @param filePath The ORC file path.
+ * @param filter record keys filter
+ * @return Set Set of row keys matching candidateRecordKeys
+ */
+ public static Set<String> filterOrcRowKeys(Configuration conf,
+ Path filePath, Set<String> filter) throws HoodieIOException {
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+ Set<String> filteredRowKeys = new HashSet<>();
+ TypeDescription schema = reader.getSchema();
+ List<String> fieldNames = schema.getFieldNames();
+ VectorizedRowBatch batch = schema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(schema));
+
+ // column index for the RECORD_KEY_METADATA_FIELD field
+ int colIndex = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ colIndex = i;
+ break;
+ }
+ }
+ if (colIndex == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[colIndex];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ if (filter.isEmpty() || filter.contains(rowKey)) {
+ filteredRowKeys.add(rowKey);
+ }
+ }
+ }
+ return filteredRowKeys;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read row keys for ORC file" + filePath.getName(), io);
+ }
+ }
+
+ /**
+ * Read out the bloom filter from the ORC file meta data.
+ */
+ public static BloomFilter readBloomFilterFromOrcMetadata(Configuration conf, Path orcFilePath) {
+ Map<String, String> footerVals =
+ readOrcFooter(conf, orcFilePath, false,
+ HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+ HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE);
+ String footerVal = footerVals.get(HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+ BloomFilter toReturn = null;
+ if (footerVal != null) {
+ if (footerVals.containsKey(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE)) {
+ toReturn = BloomFilterFactory.fromString(footerVal,
+ footerVals.get(HoodieAvroWriteSupport.HOODIE_BLOOM_FILTER_TYPE_CODE));
+ } else {
+ toReturn = BloomFilterFactory.fromString(footerVal, BloomFilterTypeCode.SIMPLE.name());
+ }
+ }
+ return toReturn;
+ }
+
+ public static String[] readMinMaxRecordKeys(Configuration conf, Path orcFilePath) {
+ Map<String, String> minMaxKeys = readOrcFooter(conf, orcFilePath, true,
+ HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER, HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER);
+ if (minMaxKeys.size() != 2) {
+ throw new HoodieException(
+ String.format("Could not read min/max record key out of footer correctly from %s. read) : %s",
+ orcFilePath, minMaxKeys));
+ }
+ return new String[] {minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MIN_RECORD_KEY_FOOTER),
+ minMaxKeys.get(HoodieAvroWriteSupport.HOODIE_MAX_RECORD_KEY_FOOTER)};
+ }
+
+ private static Map<String, String> readOrcFooter(Configuration conf, Path orcFilePath,
+ boolean required, String... footerNames) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ Map<String, String> footerVals = new HashMap<>();
+ List<UserMetadataItem> metadataItemList = reader.getFileTail().getFooter().getMetadataList();
+ Map<String, String> metadata = metadataItemList.stream().collect(Collectors.toMap(
+ UserMetadataItem::getName,
+ metadataItem -> metadataItem.getValue().toStringUtf8()));
+ for (String footerName : footerNames) {
+ if (metadata.containsKey(footerName)) {
+ footerVals.put(footerName, metadata.get(footerName));
+ } else if (required) {
+ throw new MetadataNotFoundException(
+ "Could not find index in ORC footer. Looked for key " + footerName + " in "
+ + orcFilePath);
+ }
+ }
+ return footerVals;
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read footer for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static Schema getAvroSchema(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ TypeDescription orcSchema = reader.getSchema();
+ return AvroOrcUtils.createAvroSchema(orcSchema);
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get Avro schema for ORC file" + orcFilePath.getName(), io);
+ }
+ }
+
+ public static long getRowCount(Configuration conf, Path orcFilePath) {
+ try {
+ Reader reader = OrcFile.createReader(orcFilePath, OrcFile.readerOptions(conf));
+ return reader.getNumberOfRows();
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to get row count for ORC file" + orcFilePath.getName(), io);
Review comment:
ditto
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a56ec21) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `2.43%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 52.53% -2.44%
+ Complexity 3844 403 -3441
============================================
Files 485 69 -416
Lines 23436 2863 -20573
Branches 2494 358 -2136
============================================
- Hits 12883 1504 -11379
+ Misses 9400 1215 -8185
+ Partials 1153 144 -1009
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `6.79% <ø> (-39.66%)` | :arrow_down: |
| huditimelineservice | `?` | |
| hudiutilities | `71.01% <ø> (+0.18%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../org/apache/hudi/hive/NonPartitionedExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTm9uUGFydGl0aW9uZWRFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...he/hudi/hive/HiveStylePartitionValueExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN0eWxlUGFydGl0aW9uVmFsdWVFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...main/java/org/apache/hudi/hive/HiveSyncConfig.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN5bmNDb25maWcuamF2YQ==) | `0.00% <0.00%> (-97.83%)` | :arrow_down: |
| [.../apache/hudi/hive/MultiPartKeysValueExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTXVsdGlQYXJ0S2V5c1ZhbHVlRXh0cmFjdG9yLmphdmE=) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/SchemaDifference.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvU2NoZW1hRGlmZmVyZW5jZS5qYXZh) | `0.00% <0.00%> (-84.85%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/util/ConfigUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9Db25maWdVdGlscy5qYXZh) | `0.00% <0.00%> (-73.92%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/HoodieHiveClient.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSG9vZGllSGl2ZUNsaWVudC5qYXZh) | `0.00% <0.00%> (-70.33%)` | :arrow_down: |
| [...va/org/apache/hudi/hive/util/ColumnNameXLator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9Db2x1bW5OYW1lWExhdG9yLmphdmE=) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [...java/org/apache/hudi/hive/util/HiveSchemaUtil.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9IaXZlU2NoZW1hVXRpbC5qYXZh) | `0.00% <0.00%> (-68.94%)` | :arrow_down: |
| [...c/main/java/org/apache/hudi/hive/HiveSyncTool.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN5bmNUb29sLmphdmE=) | `0.00% <0.00%> (-67.55%)` | :arrow_down: |
| ... and [420 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-861684975
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cc731794bc22494488d94eb4e951105125ab5b97",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=203",
"triggerID" : "cc731794bc22494488d94eb4e951105125ab5b97",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cc731794bc22494488d94eb4e951105125ab5b97 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=203)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r647202110
##########
File path: hudi-common/src/test/java/org/apache/hudi/io/storage/TestHoodieOrcReader.java
##########
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.io.storage;
+
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.common.util.AvroOrcUtils;
+import org.apache.orc.CompressionKind;
+import org.apache.orc.OrcFile;
+import org.apache.orc.TypeDescription;
+import org.apache.orc.Writer;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
+import org.apache.orc.storage.ql.exec.vector.LongColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.hudi.common.testutils.SchemaTestUtil.getSchemaFromResource;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class TestHoodieOrcReader {
Review comment:
Updated.
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java
##########
@@ -0,0 +1,283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hudi.avro.HoodieAvroUtils;
+import org.apache.hudi.common.fs.FSUtils;
+import org.apache.hudi.common.model.HoodieKey;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hudi.avro.HoodieAvroWriteSupport;
+import org.apache.hudi.common.bloom.BloomFilter;
+import org.apache.hudi.common.bloom.BloomFilterFactory;
+import org.apache.hudi.common.bloom.BloomFilterTypeCode;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.exception.HoodieException;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.hudi.exception.MetadataNotFoundException;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto.UserMetadataItem;
+import org.apache.orc.Reader;
+import org.apache.orc.Reader.Options;
+import org.apache.orc.RecordReader;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Utility functions for ORC files.
+ */
+public class OrcUtils {
+
+ /**
+ * Fetch {@link HoodieKey}s from the given ORC file.
+ *
+ * @param filePath The ORC file path.
+ * @param configuration configuration to build fs object
+ * @return {@link List} of {@link HoodieKey}s fetched from the ORC file
+ */
+ public List<HoodieKey> fetchRecordKeyPartitionPathFromOrc(Configuration configuration, Path filePath) {
+ List<HoodieKey> hoodieKeys = new ArrayList<>();
+ try {
+ if (!filePath.getFileSystem(configuration).exists(filePath)) {
+ return new ArrayList<>();
+ }
+
+ Configuration conf = new Configuration(configuration);
+ conf.addResource(FSUtils.getFs(filePath.toString(), conf).getConf());
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(conf));
+
+ Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readSchema);
+ List<String> fieldNames = orcSchema.getFieldNames();
+ VectorizedRowBatch batch = orcSchema.createRowBatch();
+ RecordReader recordReader = reader.rows(new Options(conf).schema(orcSchema));
+
+ // column indices for the RECORD_KEY_METADATA_FIELD, PARTITION_PATH_METADATA_FIELD fields
+ int keyCol = -1;
+ int partitionCol = -1;
+ for (int i = 0; i < fieldNames.size(); i++) {
+ if (fieldNames.get(i).equals(HoodieRecord.RECORD_KEY_METADATA_FIELD)) {
+ keyCol = i;
+ }
+ if (fieldNames.get(i).equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)) {
+ partitionCol = i;
+ }
+ }
+ if (keyCol == -1 || partitionCol == -1) {
+ throw new HoodieException(String.format("Couldn't find row keys or partition path in %s.", filePath));
+ }
+ while (recordReader.nextBatch(batch)) {
+ BytesColumnVector rowKeys = (BytesColumnVector) batch.cols[keyCol];
+ BytesColumnVector partitionPaths = (BytesColumnVector) batch.cols[partitionCol];
+ for (int i = 0; i < batch.size; i++) {
+ String rowKey = rowKeys.toString(i);
+ String partitionPath = partitionPaths.toString(i);
+ hoodieKeys.add(new HoodieKey(rowKey, partitionPath));
+ }
+ }
+ } catch (IOException e) {
+ throw new HoodieIOException("Failed to read from ORC file " + filePath, e);
+ }
+ return hoodieKeys;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) {
+ List<GenericRecord> records = new ArrayList<>();
+ try {
+ Reader reader = OrcFile.createReader(filePath, OrcFile.readerOptions(configuration));
+ TypeDescription orcSchema = reader.getSchema();
+ Schema avroSchema = AvroOrcUtils.createAvroSchema(orcSchema);
+ RecordReader recordReader = reader.rows(new Options(configuration).schema(orcSchema));
+ OrcReaderIterator<GenericRecord> iterator = new OrcReaderIterator<>(recordReader, avroSchema, orcSchema);
+ while (iterator.hasNext()) {
+ GenericRecord record = iterator.next();
+ records.add(record);
+ }
+ } catch (IOException io) {
+ throw new HoodieIOException("Unable to read Avro records from an ORC file.", io);
+ }
+ return records;
+ }
+
+ /**
+ * NOTE: This literally reads the entire file contents, thus should be used with caution.
+ */
+ public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
Review comment:
Updated.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on a change in pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
leesf commented on a change in pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#discussion_r647514027
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -0,0 +1,798 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.sql.Timestamp;
+import java.util.Base64;
+import java.util.Date;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.avro.Conversions;
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema.Field;
+import org.apache.avro.generic.GenericData;
+import java.nio.charset.StandardCharsets;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData.StringType;
+import org.apache.avro.util.Utf8;
+import org.apache.orc.storage.common.type.HiveDecimal;
+import org.apache.orc.storage.ql.exec.vector.BytesColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DecimalColumnVector;
+import org.apache.orc.storage.ql.exec.vector.DoubleColumnVector;
+import org.apache.orc.storage.ql.exec.vector.ListColumnVector;
+import org.apache.orc.storage.ql.exec.vector.LongColumnVector;
+import org.apache.orc.storage.ql.exec.vector.MapColumnVector;
+import org.apache.orc.storage.ql.exec.vector.StructColumnVector;
+import org.apache.orc.storage.ql.exec.vector.TimestampColumnVector;
+import org.apache.orc.storage.ql.exec.vector.UnionColumnVector;
+import org.apache.orc.storage.serde2.io.DateWritable;
+import org.apache.hudi.exception.HoodieIOException;
+import org.apache.orc.TypeDescription;
+
+/**
+ * Methods including addToVector, addUnionValue, createOrcSchema are originally from
Review comment:
here we need statement the source code usage in LICENSE and NOTICE
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87cc130) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `45.69%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 9.27% -45.70%
+ Complexity 3844 48 -3796
============================================
Files 485 54 -431
Lines 23436 2016 -21420
Branches 2494 241 -2253
============================================
- Hits 12883 187 -12696
+ Misses 9400 1816 -7584
+ Partials 1153 13 -1140
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `9.27% <ø> (-61.56%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/hudi/utilities/IdentitySplitter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0lkZW50aXR5U3BsaXR0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/hudi/utilities/schema/SchemaSet.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFTZXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/hudi/utilities/sources/RowSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUm93U291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/AvroSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQXZyb1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/hudi/utilities/sources/JsonSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvblNvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rg/apache/hudi/utilities/sources/CsvDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvQ3N2REZTU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/hudi/utilities/sources/JsonDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkRGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/hudi/utilities/sources/JsonKafkaSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvSnNvbkthZmthU291cmNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/hudi/utilities/sources/ParquetDFSSource.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NvdXJjZXMvUGFycXVldERGU1NvdXJjZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...lities/schema/SchemaProviderWithPostProcessor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9TY2hlbWFQcm92aWRlcldpdGhQb3N0UHJvY2Vzc29yLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [459 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
leesf commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-856833340
@jintaoguan can we also add some schema evolution tests against ORC format?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-857228051
@leesf I have added one more unit test that reads the orc file with all 5 different evolved schema.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d63d9d1) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **increase** coverage by `8.39%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
+ Coverage 54.97% 63.36% +8.39%
+ Complexity 3844 351 -3493
============================================
Files 485 55 -430
Lines 23436 2039 -21397
Branches 2494 244 -2250
============================================
- Hits 12883 1292 -11591
+ Misses 9400 622 -8778
+ Partials 1153 125 -1028
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `63.36% <ø> (-7.47%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ies/exception/HoodieSnapshotExporterException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL2V4Y2VwdGlvbi9Ib29kaWVTbmFwc2hvdEV4cG9ydGVyRXhjZXB0aW9uLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/hudi/utilities/HoodieSnapshotExporter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0hvb2RpZVNuYXBzaG90RXhwb3J0ZXIuamF2YQ==) | `5.17% <0.00%> (-83.63%)` | :arrow_down: |
| [...hudi/utilities/schema/JdbcbasedSchemaProvider.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9KZGJjYmFzZWRTY2hlbWFQcm92aWRlci5qYXZh) | `0.00% <0.00%> (-72.23%)` | :arrow_down: |
| [...he/hudi/utilities/transform/AWSDmsTransformer.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3RyYW5zZm9ybS9BV1NEbXNUcmFuc2Zvcm1lci5qYXZh) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `40.69% <0.00%> (-23.84%)` | :arrow_down: |
| [...apache/hudi/utilities/deltastreamer/DeltaSync.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL2RlbHRhc3RyZWFtZXIvRGVsdGFTeW5jLmphdmE=) | `70.84% <0.00%> (ø)` | |
| [.../main/java/org/apache/hudi/sink/CleanFunction.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS9zaW5rL0NsZWFuRnVuY3Rpb24uamF2YQ==) | | |
| [...in/java/org/apache/hudi/common/lock/LockState.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL2xvY2svTG9ja1N0YXRlLmphdmE=) | | |
| [...che/hudi/exception/InvalidHoodiePathException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvZXhjZXB0aW9uL0ludmFsaWRIb29kaWVQYXRoRXhjZXB0aW9uLmphdmE=) | | |
| [...a/org/apache/hudi/common/util/CompactionUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQ29tcGFjdGlvblV0aWxzLmphdmE=) | | |
| ... and [425 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] prashantwason merged pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
prashantwason merged pull request #2999:
URL: https://github.com/apache/hudi/pull/2999
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-857228051
@leesf I have added one more unit test that reads the ORC file with all 5 different evolved schema.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87cc130) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `0.55%`.
> The diff coverage is `32.03%`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 54.41% -0.56%
- Complexity 3844 3916 +72
============================================
Files 485 489 +4
Lines 23436 24026 +590
Branches 2494 2592 +98
============================================
+ Hits 12883 13073 +190
- Misses 9400 9781 +381
- Partials 1153 1172 +19
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `39.55% <ø> (ø)` | |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `49.33% <32.19%> (-0.98%)` | :arrow_down: |
| hudiflink | `63.41% <ø> (+0.01%)` | :arrow_up: |
| hudihadoopmr | `51.45% <0.00%> (-0.09%)` | :arrow_down: |
| hudisparkdatasource | `73.33% <ø> (ø)` | |
| hudisync | `46.44% <ø> (ø)` | |
| huditimelineservice | `64.36% <ø> (ø)` | |
| hudiutilities | `70.83% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/hudi/hadoop/utils/HoodieInputFormatUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3V0aWxzL0hvb2RpZUlucHV0Rm9ybWF0VXRpbHMuamF2YQ==) | `55.27% <0.00%> (-0.85%)` | :arrow_down: |
| [...ain/java/org/apache/hudi/common/util/OrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjVXRpbHMuamF2YQ==) | `2.45% <2.45%> (ø)` | |
| [...java/org/apache/hudi/common/util/AvroOrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQXZyb09yY1V0aWxzLmphdmE=) | `34.72% <34.72%> (ø)` | |
| [...va/org/apache/hudi/io/storage/HoodieOrcReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVPcmNSZWFkZXIuamF2YQ==) | `56.25% <56.25%> (ø)` | |
| [...org/apache/hudi/common/util/OrcReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjUmVhZGVySXRlcmF0b3IuamF2YQ==) | `81.57% <81.57%> (ø)` | |
| [...org/apache/hudi/common/model/HoodieFileFormat.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUZpbGVGb3JtYXQuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...pache/hudi/io/storage/HoodieFileReaderFactory.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyRmFjdG9yeS5qYXZh) | `61.53% <100.00%> (+11.53%)` | :arrow_up: |
| ... and [3 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87cc130) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `1.98%`.
> The diff coverage is `32.03%`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 52.98% -1.99%
+ Complexity 3844 3473 -371
============================================
Files 485 426 -59
Lines 23436 20548 -2888
Branches 2494 2171 -323
============================================
- Hits 12883 10888 -1995
+ Misses 9400 8734 -666
+ Partials 1153 926 -227
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `39.55% <ø> (ø)` | |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `49.33% <32.19%> (-0.98%)` | :arrow_down: |
| hudiflink | `63.41% <ø> (+0.01%)` | :arrow_up: |
| hudihadoopmr | `51.45% <0.00%> (-0.09%)` | :arrow_down: |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `70.83% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/hudi/hadoop/utils/HoodieInputFormatUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3V0aWxzL0hvb2RpZUlucHV0Rm9ybWF0VXRpbHMuamF2YQ==) | `55.27% <0.00%> (-0.85%)` | :arrow_down: |
| [...ain/java/org/apache/hudi/common/util/OrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjVXRpbHMuamF2YQ==) | `2.45% <2.45%> (ø)` | |
| [...java/org/apache/hudi/common/util/AvroOrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQXZyb09yY1V0aWxzLmphdmE=) | `34.72% <34.72%> (ø)` | |
| [...va/org/apache/hudi/io/storage/HoodieOrcReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVPcmNSZWFkZXIuamF2YQ==) | `56.25% <56.25%> (ø)` | |
| [...org/apache/hudi/common/util/OrcReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjUmVhZGVySXRlcmF0b3IuamF2YQ==) | `81.57% <81.57%> (ø)` | |
| [...org/apache/hudi/common/model/HoodieFileFormat.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUZpbGVGb3JtYXQuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...pache/hudi/io/storage/HoodieFileReaderFactory.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyRmFjdG9yeS5qYXZh) | `61.53% <100.00%> (+11.53%)` | :arrow_up: |
| [.../spark/sql/hudi/streaming/HoodieSourceOffset.scala](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zcGFyay1kYXRhc291cmNlL2h1ZGktc3Bhcmsvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9zcGFyay9zcWwvaHVkaS9zdHJlYW1pbmcvSG9vZGllU291cmNlT2Zmc2V0LnNjYWxh) | | |
| [...c/main/scala/org/apache/hudi/HoodieFileIndex.scala](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zcGFyay1kYXRhc291cmNlL2h1ZGktc3Bhcmsvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9odWRpL0hvb2RpZUZpbGVJbmRleC5zY2FsYQ==) | | |
| [...rc/main/scala/org/apache/hudi/Spark2RowSerDe.scala](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zcGFyay1kYXRhc291cmNlL2h1ZGktc3BhcmsyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvaHVkaS9TcGFyazJSb3dTZXJEZS5zY2FsYQ==) | | |
| ... and [66 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87cc130) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `0.55%`.
> The diff coverage is `32.03%`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 54.41% -0.56%
- Complexity 3844 3916 +72
============================================
Files 485 489 +4
Lines 23436 24026 +590
Branches 2494 2592 +98
============================================
+ Hits 12883 13073 +190
- Misses 9400 9781 +381
- Partials 1153 1172 +19
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `39.55% <ø> (ø)` | |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `49.33% <32.19%> (-0.98%)` | :arrow_down: |
| hudiflink | `63.41% <ø> (+0.01%)` | :arrow_up: |
| hudihadoopmr | `51.45% <0.00%> (-0.09%)` | :arrow_down: |
| hudisparkdatasource | `73.33% <ø> (ø)` | |
| hudisync | `46.44% <ø> (ø)` | |
| huditimelineservice | `64.36% <ø> (ø)` | |
| hudiutilities | `70.83% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/hudi/hadoop/utils/HoodieInputFormatUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3V0aWxzL0hvb2RpZUlucHV0Rm9ybWF0VXRpbHMuamF2YQ==) | `55.27% <0.00%> (-0.85%)` | :arrow_down: |
| [...ain/java/org/apache/hudi/common/util/OrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjVXRpbHMuamF2YQ==) | `2.45% <2.45%> (ø)` | |
| [...java/org/apache/hudi/common/util/AvroOrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQXZyb09yY1V0aWxzLmphdmE=) | `34.72% <34.72%> (ø)` | |
| [...va/org/apache/hudi/io/storage/HoodieOrcReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVPcmNSZWFkZXIuamF2YQ==) | `56.25% <56.25%> (ø)` | |
| [...org/apache/hudi/common/util/OrcReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjUmVhZGVySXRlcmF0b3IuamF2YQ==) | `81.57% <81.57%> (ø)` | |
| [...org/apache/hudi/common/model/HoodieFileFormat.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUZpbGVGb3JtYXQuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...pache/hudi/io/storage/HoodieFileReaderFactory.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyRmFjdG9yeS5qYXZh) | `61.53% <100.00%> (+11.53%)` | :arrow_up: |
| ... and [3 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jintaoguan commented on pull request #2999: [HUDI-764] [HUDI-765] ORC reader writer Implementation
Posted by GitBox <gi...@apache.org>.
jintaoguan commented on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-861683763
@leesf I added a new subtask in [HUDI-57](https://issues.apache.org/jira/browse/HUDI-57) about adding a new integration test for ORC reader/writer. We will merge this PR first and work on the integration later.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (35a8cd9) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **increase** coverage by `15.86%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
=============================================
+ Coverage 54.97% 70.83% +15.86%
+ Complexity 3844 385 -3459
=============================================
Files 485 54 -431
Lines 23436 2016 -21420
Branches 2494 241 -2253
=============================================
- Hits 12883 1428 -11455
+ Misses 9400 454 -8946
+ Partials 1153 134 -1019
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `70.83% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...main/java/org/apache/hudi/dla/HoodieDLAClient.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktZGxhLXN5bmMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvZGxhL0hvb2RpZURMQUNsaWVudC5qYXZh) | | |
| [...main/java/org/apache/hudi/hive/HiveSyncConfig.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN5bmNDb25maWcuamF2YQ==) | | |
| [...g/apache/hudi/exception/InvalidTableException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvZXhjZXB0aW9uL0ludmFsaWRUYWJsZUV4Y2VwdGlvbi5qYXZh) | | |
| [...op/realtime/HoodieCombineRealtimeRecordReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3JlYWx0aW1lL0hvb2RpZUNvbWJpbmVSZWFsdGltZVJlY29yZFJlYWRlci5qYXZh) | | |
| [.../org/apache/hudi/exception/HoodieKeyException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvZXhjZXB0aW9uL0hvb2RpZUtleUV4Y2VwdGlvbi5qYXZh) | | |
| [...main/java/org/apache/hudi/common/model/IOType.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0lPVHlwZS5qYXZh) | | |
| [...a/org/apache/hudi/io/storage/HoodieFileReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyLmphdmE=) | | |
| [...g/apache/hudi/common/table/HoodieTableVersion.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL0hvb2RpZVRhYmxlVmVyc2lvbi5qYXZh) | | |
| [.../versioning/compaction/CompactionPlanMigrator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL3RpbWVsaW5lL3ZlcnNpb25pbmcvY29tcGFjdGlvbi9Db21wYWN0aW9uUGxhbk1pZ3JhdG9yLmphdmE=) | | |
| [.../common/table/view/RocksDbBasedFileSystemView.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL3ZpZXcvUm9ja3NEYkJhc2VkRmlsZVN5c3RlbVZpZXcuamF2YQ==) | | |
| ... and [418 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d63d9d1) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `3.30%`.
> The diff coverage is `14.43%`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 51.66% -3.31%
+ Complexity 3844 3435 -409
============================================
Files 485 436 -49
Lines 23436 20833 -2603
Branches 2494 2209 -285
============================================
- Hits 12883 10764 -2119
+ Misses 9400 9148 -252
+ Partials 1153 921 -232
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `39.95% <ø> (+0.40%)` | :arrow_up: |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `48.11% <14.50%> (-2.20%)` | :arrow_down: |
| hudiflink | `63.01% <ø> (-0.39%)` | :arrow_down: |
| hudihadoopmr | `51.34% <0.00%> (-0.20%)` | :arrow_down: |
| hudisparkdatasource | `?` | |
| hudisync | `?` | |
| huditimelineservice | `?` | |
| hudiutilities | `63.36% <ø> (-7.47%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ain/java/org/apache/hudi/common/util/OrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjVXRpbHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ache/hudi/hadoop/utils/HoodieInputFormatUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3V0aWxzL0hvb2RpZUlucHV0Rm9ybWF0VXRpbHMuamF2YQ==) | `54.35% <0.00%> (-1.77%)` | :arrow_down: |
| [...java/org/apache/hudi/common/util/AvroOrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQXZyb09yY1V0aWxzLmphdmE=) | `10.83% <10.83%> (ø)` | |
| [...va/org/apache/hudi/io/storage/HoodieOrcReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVPcmNSZWFkZXIuamF2YQ==) | `25.00% <25.00%> (ø)` | |
| [...org/apache/hudi/common/util/OrcReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjUmVhZGVySXRlcmF0b3IuamF2YQ==) | `81.57% <81.57%> (ø)` | |
| [...org/apache/hudi/common/model/HoodieFileFormat.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUZpbGVGb3JtYXQuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...pache/hudi/io/storage/HoodieFileReaderFactory.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyRmFjdG9yeS5qYXZh) | `61.53% <100.00%> (+11.53%)` | :arrow_up: |
| [...ies/exception/HoodieSnapshotExporterException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL2V4Y2VwdGlvbi9Ib29kaWVTbmFwc2hvdEV4cG9ydGVyRXhjZXB0aW9uLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/hudi/utilities/HoodieSnapshotExporter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0hvb2RpZVNuYXBzaG90RXhwb3J0ZXIuamF2YQ==) | `5.17% <0.00%> (-83.63%)` | :arrow_down: |
| [...hudi/utilities/schema/JdbcbasedSchemaProvider.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9KZGJjYmFzZWRTY2hlbWFQcm92aWRlci5qYXZh) | `0.00% <0.00%> (-72.23%)` | :arrow_down: |
| ... and [108 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f69c95) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `2.40%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 52.56% -2.41%
+ Complexity 3844 404 -3440
============================================
Files 485 69 -416
Lines 23436 2863 -20573
Branches 2494 358 -2136
============================================
- Hits 12883 1505 -11378
+ Misses 9400 1215 -8185
+ Partials 1153 143 -1010
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `?` | |
| hudiclient | `?` | |
| hudicommon | `?` | |
| hudiflink | `?` | |
| hudihadoopmr | `?` | |
| hudisparkdatasource | `?` | |
| hudisync | `6.79% <ø> (-39.66%)` | :arrow_down: |
| huditimelineservice | `?` | |
| hudiutilities | `71.06% <ø> (+0.23%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../org/apache/hudi/hive/NonPartitionedExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTm9uUGFydGl0aW9uZWRFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...he/hudi/hive/HiveStylePartitionValueExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN0eWxlUGFydGl0aW9uVmFsdWVFeHRyYWN0b3IuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...main/java/org/apache/hudi/hive/HiveSyncConfig.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN5bmNDb25maWcuamF2YQ==) | `0.00% <0.00%> (-97.83%)` | :arrow_down: |
| [.../apache/hudi/hive/MultiPartKeysValueExtractor.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvTXVsdGlQYXJ0S2V5c1ZhbHVlRXh0cmFjdG9yLmphdmE=) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/SchemaDifference.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvU2NoZW1hRGlmZmVyZW5jZS5qYXZh) | `0.00% <0.00%> (-84.85%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/util/ConfigUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9Db25maWdVdGlscy5qYXZh) | `0.00% <0.00%> (-73.92%)` | :arrow_down: |
| [...in/java/org/apache/hudi/hive/HoodieHiveClient.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSG9vZGllSGl2ZUNsaWVudC5qYXZh) | `0.00% <0.00%> (-70.33%)` | :arrow_down: |
| [...va/org/apache/hudi/hive/util/ColumnNameXLator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9Db2x1bW5OYW1lWExhdG9yLmphdmE=) | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
| [...java/org/apache/hudi/hive/util/HiveSchemaUtil.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvdXRpbC9IaXZlU2NoZW1hVXRpbC5qYXZh) | `0.00% <0.00%> (-68.94%)` | :arrow_down: |
| [...c/main/java/org/apache/hudi/hive/HiveSyncTool.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1zeW5jL2h1ZGktaGl2ZS1zeW5jL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2hpdmUvSGl2ZVN5bmNUb29sLmphdmE=) | `0.00% <0.00%> (-67.55%)` | :arrow_down: |
| ... and [420 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-commenter edited a comment on pull request #2999: [HUDI-764] [HUDI-765] Orc reader writer Implementation
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2999:
URL: https://github.com/apache/hudi/pull/2999#issuecomment-849318661
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2999](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d63d9d1) into [master](https://codecov.io/gh/apache/hudi/commit/4eb6ef8144861599f858b4119a3574e37dfbea58?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eb6ef8) will **decrease** coverage by `1.36%`.
> The diff coverage is `14.43%`.
[](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2999 +/- ##
============================================
- Coverage 54.97% 53.60% -1.37%
- Complexity 3844 4008 +164
============================================
Files 485 524 +39
Lines 23436 25872 +2436
Branches 2494 2969 +475
============================================
+ Hits 12883 13869 +986
- Misses 9400 10623 +1223
- Partials 1153 1380 +227
```
| Flag | Coverage Δ | |
|---|---|---|
| hudicli | `39.95% <ø> (+0.40%)` | :arrow_up: |
| hudiclient | `∅ <ø> (∅)` | |
| hudicommon | `48.11% <14.50%> (-2.20%)` | :arrow_down: |
| hudiflink | `63.01% <ø> (-0.39%)` | :arrow_down: |
| hudihadoopmr | `51.34% <0.00%> (-0.20%)` | :arrow_down: |
| hudisparkdatasource | `66.51% <ø> (-6.82%)` | :arrow_down: |
| hudisync | `46.79% <ø> (+0.35%)` | :arrow_up: |
| huditimelineservice | `64.36% <ø> (ø)` | |
| hudiutilities | `63.36% <ø> (-7.47%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ain/java/org/apache/hudi/common/util/OrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjVXRpbHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ache/hudi/hadoop/utils/HoodieInputFormatUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL3V0aWxzL0hvb2RpZUlucHV0Rm9ybWF0VXRpbHMuamF2YQ==) | `54.35% <0.00%> (-1.77%)` | :arrow_down: |
| [...java/org/apache/hudi/common/util/AvroOrcUtils.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvQXZyb09yY1V0aWxzLmphdmE=) | `10.83% <10.83%> (ø)` | |
| [...va/org/apache/hudi/io/storage/HoodieOrcReader.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVPcmNSZWFkZXIuamF2YQ==) | `25.00% <25.00%> (ø)` | |
| [...org/apache/hudi/common/util/OrcReaderIterator.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3V0aWwvT3JjUmVhZGVySXRlcmF0b3IuamF2YQ==) | `81.57% <81.57%> (ø)` | |
| [...org/apache/hudi/common/model/HoodieFileFormat.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUZpbGVGb3JtYXQuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...pache/hudi/io/storage/HoodieFileReaderFactory.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaW8vc3RvcmFnZS9Ib29kaWVGaWxlUmVhZGVyRmFjdG9yeS5qYXZh) | `61.53% <100.00%> (+11.53%)` | :arrow_up: |
| [...ies/exception/HoodieSnapshotExporterException.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL2V4Y2VwdGlvbi9Ib29kaWVTbmFwc2hvdEV4cG9ydGVyRXhjZXB0aW9uLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/hudi/utilities/HoodieSnapshotExporter.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL0hvb2RpZVNuYXBzaG90RXhwb3J0ZXIuamF2YQ==) | `5.17% <0.00%> (-83.63%)` | :arrow_down: |
| [...hudi/utilities/schema/JdbcbasedSchemaProvider.java](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL3NjaGVtYS9KZGJjYmFzZWRTY2hlbWFQcm92aWRlci5qYXZh) | `0.00% <0.00%> (-72.23%)` | :arrow_down: |
| ... and [80 more](https://codecov.io/gh/apache/hudi/pull/2999/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org