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(ReflectionUtils.java:131)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:721)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:339)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:129)
... 7 more
Caused by: java.lang.NoClassDefFoundError: org/apache/avro/mapred/AvroWrapper
at org.apache.sqoop.mapreduce.AvroImportMapper.(AvroImportMapper.java:51)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.apache.avro.mapred.AvroWrapper
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)