parquet-tools class-not-found failures are silent and therefore not helpful
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
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.*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách lần theo quá trình khởi động của parquet-tools xung quanh các thay thế System.setOut(System.setErr), VoidStream và nhánh die() báo cáo tới Main.err. Tái hiện lệnh gọi trực tiếp java -jar mà không có tiền tố hadoop và so sánh với hành vi sau khi các stream đó không còn chặn lỗi. Hoàn tất khi các lỗi do thiếu class được báo cáo thay vì không tạo ra đầu ra nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100