Search code examples
linuxubuntuhadoopbigdataapache-pig

Pig Installation error: ERROR pig.Main: ERROR 2998: Unhandled internal error


enter image description here

ERROR pig.Main: ERROR 2998: Unhandled internal error. com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
WARN pig.Main: There is no log file to write to.
ERROR pig.Main: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V

Above is the pig installation error I got. Any fix?


Solution

  • It is mostly caused due to the 'Guava jar issue'.

    1. Check 'Guava' jar version in Hadoop and Pig.

      ls $PIG_HOME/lib
      ls $HADOOP_HOME/share/hadoop/hdfs/lib

    2. Delete Guava jar in Pig

      rm $PIG_HOME/lib/guava-19.0.jar

    3. Copy Guava jar from Hadoop to Pig

      cp $HADOOP_HOME/share/hadoop/hdfs/lib/guava-27.0-jre.jar $PIG_HOME/lib/

    For more info follow this doc, but replace 'hive' with 'pig' everywhere http://cis.csuohio.edu/~sschung/cis612/CIS612_Lab4_2_Hive_CommonInstallationProblems.pdf