[MINOR] Reformat HoodieAvroParquetReader - #8888
Conversation
|
In addition, the following problem encountered when using hive2 Since the correct logical type cannot be obtained from the footer, subsequent reading still fails |
|
@Zouxxyy |
|
@cdmikechen have you try it with hive2 (parquet-hadoop-bundle 1.8.1) ? here is my test: with hive2 (parquet-hadoop-bundle 1.8.1) <dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>2.10.1</version>
</dependency>
<!-- hive2 -->
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-avro</artifactId>
<version>1.10.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>use ParquetMetadata fileFooter = ParquetFileReader.readFooter(
new Configuration(), new Path("file:///Users/zxy/Desktop/mz_parquet_to_hudi/486591f0-3e2e-457a-9f3a-d8305d5850fd-0_0-11-11_20230601185040816.parquet"),
ParquetMetadataConverter.NO_FILTER);
MessageType schema = fileFooter.getFileMetaData().getSchema();result with hive3 (parquet-hadoop-bundle 1.10.1) <dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>2.10.1</version>
</dependency>
<!-- hive3 -->
<!-- <dependency>-->
<!-- <groupId>org.apache.parquet</groupId>-->
<!-- <artifactId>parquet-hadoop</artifactId>-->
<!-- <version>1.8.1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-avro</artifactId>
<version>1.10.1</version>
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.apache.parquet</groupId>-->
<!-- <artifactId>parquet-hadoop</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
</dependency>
</dependencies>use Here is the footer read by parquet-tools: It seemed hive2 can't read So maybe we should shade |
Change Logs
Minor modification for #7173
Impact
fix HoodieAvroParquetReader
Risk level (write none, low medium or high below)
low
Documentation Update
None
Contributor's checklist