Issue:
While configuring Sqoop (Sqoop: Downloaded was 1.4.6) on HDFS (Hadoop: 2.7.2), I encountered the below error,
Exception in thread “main” java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected at org.apache.sqoop.config.ConfigurationHelper.getJobNumMaps(ConfigurationHelper.java:65) at com.cloudera.sqoop.config.ConfigurationHelper.getJobNumMaps(ConfigurationHelper.java:36) at org.apache.sqoop.mapreduce.db.DataDrivenDBInputFormat.getSplits(DataDrivenDBInputFormat.java:125)
Cause:
Could be something to do with versions conflict between Sqoop and Hadoop
Resolution:
The version of Sqoop (1.4.6) that was downloaded was for Hadoop 1, so, you may have to pick the right version of Sqoop + Hadoop combination to overcome the issue.Below is the snapshot for your reference.
@mohammadarifmustafa@gmail.com, thanks man, you save my day….
LikeLiked by 1 person
open oozie directory and check pom.xml file like below:
hadoop-1
false
1.2.1
1
hadoop100
hadoop-0.23
false
0.23.5
0.23
h2
hadoop23
hadoop-2
true
2.7.3
2
h2
hadoop200
1.9.13
hadoop-3
false
3.0.0-SNAPSHOT
3
h2
hadoop200
1.9.13
for example you are using hadoop 2.7.3 version make it “activeByDefault” is “true” like below
true
and save it and run below command .
cd /opt/oozie-4.2.0/bin
./mkdistro.sh assembly:single -P hadoop-2 -D javaVersion=1.8 -D targetJavaVersion=1.8 -DskipTests -DadditionalJOption=-Xdoclint:none
based on version you can change.
LikeLiked by 1 person