Support Questions
Find answers, ask questions, and share your expertise

Sqoop import as-avrodatafile fails; please tell me where I am going wrong

Highlighted

Sqoop import as-avrodatafile fails; please tell me where I am going wrong

New Contributor

I am trying this solution but for some reason it is not working for me. please tell me where I am going wrong

 


sqoop-import -Dmapreduce.job.user.classpath.first=true -Dhadoop.security.credential.provider.path=jceks://x.jceks \
--connect="jdbc:mysql://quickstart.cloudera:3306/retail_db" \
--username retail_dba \
--password cloudera \
--table=departments \
--hive-import \
--as-avrodatafile

4 REPLIES 4
Highlighted

Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion

New Contributor

for some reason this is not working for me. please help me with where I am going wrong

 


sqoop-import -Dmapreduce.job.user.classpath.first=true -Dhadoop.security.credential.provider.path=jceks://x.jceks \
--connect="jdbc:mysql://quickstart.cloudera:3306/retail_db" \
--username retail_dba \
--password cloudera \
--table=departments \
--hive-import \
--as-avrodatafile

Highlighted

Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion

@saskan the two questions above were moved into this newly-created thread because you posted both of them12-28-2019 to a thread with an accepted solution posted ‎10-10-2016. 

 

You will be much more likely to obtain a response from other members of this community if you provide some additional context here, such as:

  • What version of Sqoop are you using?
  • Is it the same one that ships with the Cloudera Quickstart? If so, what version of the Quickstart are you using?
  • Are you following the steps from a tutorial? If so, which one?

You also might try posting a screen shot of the error message you're receiving.

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Highlighted

Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion

New Contributor

No I am not using this form a tutorial. I got it from the community.

 

I am using the sqoop version Sqoop 1.4.6-cdh5.13.0

 

Highlighted

Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion

Did you try the new line escape char (\) on end of first line?

 

In the OP sample, his is all one line (no new line escape chars):

 

Dmapreduce.job.user.classpath.first=true Example: sqoop import -Dmapreduce.job.user.classpath.first=true -Dhadoop.security.credential.provider.path=jceks://x.jceks --connect jdbc:db2://xxx:60000/VKTXAP02 --username xx -password-alias xx --as-avrodatafile --target-dir xx/data/test --fields-terminated-by '\001' --table xx -m 1

 

Your sample has new line escape chars....