parquet-tools cat命令返回“ java.lang.ExceptionInInitializerError”

时间:2019-04-07 06:26:22

标签: parquet

我安装了4 CLI。 在任何.parquet文件上运行parquet-tools时,它将返回Java错误:

parquet-tools cat --debug -j

我在MacOS上使用Homebrew安装了java.lang.ExceptionInInitializerError at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:80) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2823) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2818) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2684) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:373) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:172) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:357) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295) at org.apache.parquet.hadoop.ParquetReader$Builder.build(ParquetReader.java:299) at org.apache.parquet.tools.command.CatCommand.execute(CatCommand.java:82) at org.apache.parquet.tools.Main.main(Main.java:223) Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3410) at java.base/java.lang.String.substring(String.java:1883) at org.apache.hadoop.util.Shell.<clinit>(Shell.java:52) ... 11 more java.lang.ExceptionInInitializerError 。 我有Java SDK版本12:

parquet-tools

1 个答案:

答案 0 :(得分:2)

This error only happens with Java 12. Parquet officially only supports Java 8, but Java 11 seems to work as well.