parquet-tools gives java.lang.ExceptionInInitializerError, so I made it work with java8

Overview

I installed parquet-tools to check parquet, but I think that it doesn't work because a version higher than java8 is included in the current environment, so I installed java8 and made it usable.

Event

What kind of installation should I get an error for the time being?

% brew install parquet-tools
% parquet-tools meta file path
java.lang.ExceptionInInitializerError

If you google lightly, it will not work unless it is java8

% java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Correspondence

Let's install java8 and switch the java version at runtime

% brew tap homebrew/cask-versions
% brew cask install adoptopenjdk8
% /usr/libexec/java_home -v "1.8"
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
% export JAVA_HOME=`/usr/libexec/java_home -v "1.8"`
% PATH=${JAVA_HOME}/bin:${PATH}
% parquet-tools meta file path
file:              file:File Path
creator:           parquet-mr 

file schema:       hive_schema 
--------------------------------------------------------------------------------
hoge:            OPTIONAL BINARY O:UTF8 R:0 D:1
…

row group 1:       RC:87 TS:4687 OFFSET:4 
--------------------------------------------------------------------------------
hoge:             BINARY SNAPPY DO:0 FPO:4 SZ:1281/3193/2.49 VC:87 ENC:BIT_PACKED,PLAIN,RLE ST:[no stats for this column]
…

Congratulations

Recommended Posts

parquet-tools gives java.lang.ExceptionInInitializerError, so I made it work with java8
I made roulette in Java.
Java SE 13 (JSR388) has been released so I tried it
I solved it with Java! !! Paiza Exercise "Long Table Eel Shop"
What I learned from doing Java work with Visual Studio Code
"RSpec doesn't work!" The cause was spring, so I investigated it.
I made a shopify app @java
I made a GUI with Swing
I tried to interact with Java
I tried UDP communication with Java
Work with Google Sheets from Java
What I learned with Java Gold
I made an annotation in Java.
What I learned with Java Silver
Run an application made with Java8 with Java6
[Java] Java was said to be okay to concatenate strings with +, so I checked
I was in trouble at work, so I made a plugin for IntelliJ
I wrote a Lambda function in Java and deployed it with SAM
[LINE BOT] I made a ramen BOT with Java (Maven) + Heroku + Spring Boot (1)
I found Lombok useful so I wrote it
Java9 was included, so I tried jshell.
Learn Java with "So What" [For beginners]
I made an eco server with scala
I made a risky die with Ruby
I tried using OpenCV with Java + Tomcat
I made a rock-paper-scissors app with kotlin
Vending machine made with Java (domain driven)
I made a new Java deployment tool
I found MyBatis useful, so I wrote it.
I made a rock-paper-scissors app with android
Learn Java with Progate → I will explain because I made a basic game myself
I had a hard time doing Java multithreading from scratch, so organize it
I can't remember the text file input / output in Java, so I summarized it.
I stumbled on the Java version in Android Studio, so I will summarize it