Error while creating avrodatafile?

0 votes

I am trying to create a avrodatafile using the below command.

sqoop import \
--connect jdbc:mysql://localhost/test \
--username root \
--table dept \
--as-avrodatafile \
--target-dir /user/edureka/dept

I am getting the below error. can you please help to resolve this issue.

18/01/19 12:28:30 INFO mapreduce.Job: The url to track the job: http://localhost:8088/proxy/application_1542433891662_0009/
18/01/19 12:28:30 INFO mapreduce.Job: Running job: job_1542433891662_0009
18/01/19 12:28:36 INFO mapreduce.Job: Job job_1542433891662_0009 running in uber mode : false
18/01/19 12:28:36 INFO mapreduce.Job: map 0% reduce 0%
18/01/19 12:28:47 INFO mapreduce.Job: Task Id : attempt_1542433891662_0009_m_000000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.util.ReflectionUtils.newInstance(
at org.apache.hadoop.mapred.MapTask.runNewMapper(
at org.apache.hadoop.mapred.YarnChild$
at Method)
at org.apache.hadoop.mapred.YarnChild.main(
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.apache.hadoop.util.ReflectionUtils.newInstance(
... 7 more
Caused by: java.lang.NoClassDefFoundError: org/apache/avro/mapred/AvroWrapper
at org.apache.sqoop.mapreduce.AvroImportMapper.(
... 12 more
Caused by: java.lang.ClassNotFoundException: org.apache.avro.mapred.AvroWrapper
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
Jan 22 in Big Data Hadoop by Yazim

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The error you are getting is AvroWrapper class not found. You have to download the Avro jar. You can get it from the URL below:

Now, place the above-downloaded jar into the Sqoop lib folder,

cp /home/user/Downloads/avro-mapred-1.7.7.jar /usr/lib/sqoop-1.4.4/lib/
answered Jan 22 by Omkar
• 66,910 points

Related Questions In Big Data Hadoop

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Getting error while building Hadoop core jar using ant.

I think you are missing libtool library. ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by coldcode
• 2,010 points
0 votes
1 answer

Error while copying the file from local to HDFS

Well, the reason you are getting such ...READ MORE

answered May 2, 2018 in Big Data Hadoop by Ashish
• 2,630 points
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,410 points
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,410 points
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
0 votes
1 answer

Error while creating Hive Database table

In your error, it says that the ...READ MORE

answered Jan 8 in Big Data Hadoop by Omkar
• 66,910 points
+4 votes
3 answers

Unable to find file error- while Streaming Hadoop

Is python installed running on the slaves that ...READ MORE

answered Oct 16, 2018 in Big Data Hadoop by Vinith

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.