Pivotal Knowledge Base

Follow

Pig Script fails with error message "Cannot instantiate class org.apache.pig.builtin. ParquetLoader"

Environment

Product Version
Pivotal Hadoop (PHD) 3.x
OS Any

Symptom

Pig Script fails with the following error message:

ERROR 2259: Cannot instantiate class org.apache.pig.builtin.ParquetLoader (parquet.pig.ParquetLoader) 

The following is the detailed error message:

ERROR 2259: Cannot instantiate class org.apache.pig.builtin.ParquetLoader (parquet.pig.ParquetLoader)

[...]
Caused by: java.lang.NoClassDefFoundError: parquet/pig/ParquetLoader
at org.apache.pig.builtin.ParquetLoader.<init>(ParquetLoader.java:40)
... 30 more
Caused by: java.lang.ClassNotFoundException: parquet.pig.ParquetLoader
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 31 more
 

Cause

The reason for this failure and the subsequent error message is that the parquet library is missing.
Resolution

  1. Download parquet-pig-bundle-1.6.0.jar from http://mvnrepository.com/artifact/com.twitter/parquet-pig-bundle/1.6.0.
  2. After downloading, place this in your classpath. By default, your classpath is located in: "/usr/phd/current/pig-client/lib/".
  3. After copying/moving the file to your classpath, rerun your Pig Script; the new JAR will be picked up automatically.

 

 

Comments

Powered by Zendesk