apache / apache/parquet-java

LZ4 decoding is not working over hadoop

オープン
#2,571 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Java Component: Parquet Priority: Blocker Type: bug
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

Hello , we just tried latest apache-arrow version 3.0.0 and the write example included in low level api example, but lz4 still seems not compatible with Hadoop . we got this error reading over hadoop file parquet produced with 3.0.0 library  :

 [leal@sulu parquet]$ ./hadoop-3.2.2/bin/hadoop jar apache-parquet-1.11.1/parquet-tools/target/parquet-tools-1.11.1.jar head --debug parquet_2_0_example2.parquet
2021-02-04 21:24:36,354 INFO hadoop.InternalParquetRecordReader: RecordReader initialized will read a total of 1500001 records.
2021-02-04 21:24:36,355 INFO hadoop.InternalParquetRecordReader: at row 0. reading next block
2021-02-04 21:24:36,397 INFO compress.CodecPool: Got brand-new decompressor [.lz4]
2021-02-04 21:24:36,410 INFO hadoop.InternalParquetRecordReader: block read in memory in 55 ms. row count = 434436
org.apache.parquet.io.ParquetDecodingException: Can not read value at 0 in block -1 in file [file:/home/leal/parquet/parquet_2_0_example2.parquet\|file://home/leal/parquet/parquet_2_0_example2.parquet]
at org.apache.parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:255)
at org.apache.parquet.hadoop.ParquetReader.read(ParquetReader.java:132)
at org.apache.parquet.hadoop.ParquetReader.read(ParquetReader.java:136)
at org.apache.parquet.tools.command.HeadCommand.execute(HeadCommand.java:87)
at org.apache.parquet.tools.Main.main(Main.java:223)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:275)
at org.apache.hadoop.io.compress.lz4.Lz4Decompressor.decompress(Lz4Decompressor.java:232)
at org.apache.hadoop.io.compress.BlockDecompressorStream.decompress(BlockDecompressorStream.java:88)
at org.apache.hadoop.io.compress.DecompressorStream.read(DecompressorStream.java:105)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
 
any advice ? we need to write Lz4 files by C++ and read oover Hadoop jobs but still stuck on this problem . 

**Reporter**: [mario luzi](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mario.luzi)
#### Related issues:
- [Support LZ4_RAW codec](https://github.com/apache/parquet-java/issues/2718) (is related to)
#### Original Issue Attachments:
- [parquet_3_0_example2.parquet](https://issues.apache.org/jira/secure/attachment/13020080/parquet_3_0_example2.parquet)

**Note**: *This issue was originally created as [PARQUET-1974](https://issues.apache.org/jira/browse/PARQUET-1974). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

添付された parquet_3_0_example2.parquet ファイルを使用し、報告に示されている Hadoop 3.2.2 および parquet-tools 1.11.1 のコマンドで失敗を再現します。まず、生成されたファイルの LZ4 の扱いを、関連する Support LZ4_RAW codec issue と比較します。完了条件は、codec の非互換性を特定し、C++ で書き込まれた LZ4 ファイルを Hadoop で読み取れることを確認することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
data-engineering
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。