parquet-tools class-not-found failures are silent and therefore not helpful
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.6k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 33
説明
If you download a parquet-tools jar from e.g. maven central and simply run it without the "hadoop" command prefix:
`[jlilley@rpb-dev-cent7-1 ~]$ wget [https://repo1.maven.org/maven2/org/apache/parquet/parquet-tools/1.11.1/parquet-tools-1.11.1.jar]`
`...`
`[jlilley@rpb-dev-cent7-1 ~]$ java -jar parquet-tools-1.11.1.jar --help`
`[jlilley@rpb-dev-cent7-1 ~]$`
it will fail because the hadoop dependencies are missing, and will fail silently because System.out and System.err have been replaced with VoidStream:
`System.setOut(VoidStream);`
`System.setErr(VoidStream);`
Because of this, the missing-class exceptions are not reported and user is left scratching head and wondering what happened. It is unclear why the message goes unreported, because the exception _should_ be printed to Main.err by die()
catch (Throwable th) {
` if (debug) th.printStackTrace(Main.err);`
` die(th, false, name, command);`
}
However, commenting out the System.setOut() and System.setErr() lines does indeed cause the stack trace to be shown.
**Environment**: I've tried this on both CentOS7 and Windows 10, using JDK 1.8.0_211
**Reporter**: [john lilley](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=john.lilley@redpoint.net)
**Note**: *This issue was originally created as [PARQUET-1937](https://issues.apache.org/jira/browse/PARQUET-1937). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、System.setOut(System.setErr) の置換、VoidStream、および Main.err に報告する die() パスの周辺にある parquet-tools の起動処理を追跡します。hadoop プレフィックスなしで java -jar を直接実行し、これらのストリームがエラーを抑制しなくなった後の動作と比較します。クラスが見つからないことによる失敗が、何も出力されないのではなく報告されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100