rdd = sc.parallelize(['A', 'B', 'C', 'A'])
keyvalues = rdd.map(lambda x: (x, 1))
counts = keyvalues.reduceByKey(lambda a, b: a + b)
counts.collect()
Error occurred !! * IllegalArgumentException: 'Unsupported class file major version 55'
I asked Google in a hurry. *
It seems that there was a problem with the Java version. *
(base) xxxx:~$ sudo update-alternatives --config java
alternative java (/usr/bin/Provide java)Has two choices.
Choice Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 automatic mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
(base) xxxx:~$ sudo update-alternatives --config java
alternative java (/usr/bin/Provide java)Has two choices.
Choice Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 automatic mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
Current choice[*]To hold<Enter>, Otherwise press the key of the choice number: 2
update-alternatives: /usr/bin/java (java)In manual mode to provide/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/use java
(base) xxxx:~$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
Jupyter restart was successful !! *
Remarks: Not related to JAVA_HOME setting *
Recommended Posts