<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122054#M43125</link>
    <description>&lt;P&gt;After upgrading HPD to 2.5 all our Sqoop jobs that imports "as-avrodatafile" fails with&lt;/P&gt;&lt;PRE&gt;FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion(Lorg/apache/avro/Conversion;)V
        at org.apache.sqoop.mapreduce.AvroOutputFormat.getRecordWriter(AvroOutputFormat.java:97)
        at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.&amp;lt;init&amp;gt;(MapTask.java:647)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:767)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)&lt;/PRE&gt;&lt;P&gt;Sqoop depends on avro version 1.8.0 (which does have that method) and I guess that the problem could be due to the presence of avro versions 1.7.4 (hbase) and 1.7.5 (hive).&lt;/P&gt;&lt;P&gt;Please, is there a way to make yarn use version 1.8.0 instead of 1.7.x in case that is the problem?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Oct 2016 15:46:24 GMT</pubDate>
    <dc:creator>saparicio</dc:creator>
    <dc:date>2016-10-10T15:46:24Z</dc:date>
    <item>
      <title>Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122054#M43125</link>
      <description>&lt;P&gt;After upgrading HPD to 2.5 all our Sqoop jobs that imports "as-avrodatafile" fails with&lt;/P&gt;&lt;PRE&gt;FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion(Lorg/apache/avro/Conversion;)V
        at org.apache.sqoop.mapreduce.AvroOutputFormat.getRecordWriter(AvroOutputFormat.java:97)
        at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.&amp;lt;init&amp;gt;(MapTask.java:647)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:767)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)&lt;/PRE&gt;&lt;P&gt;Sqoop depends on avro version 1.8.0 (which does have that method) and I guess that the problem could be due to the presence of avro versions 1.7.4 (hbase) and 1.7.5 (hive).&lt;/P&gt;&lt;P&gt;Please, is there a way to make yarn use version 1.8.0 instead of 1.7.x in case that is the problem?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 15:46:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122054#M43125</guid>
      <dc:creator>saparicio</dc:creator>
      <dc:date>2016-10-10T15:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122055#M43126</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/13610/saparicio.html" nodeid="13610"&gt;@Sergio Aparicio&lt;/A&gt;&lt;P&gt;This is actually a known issue, and there is a Jira for a documentation bug to get this fixed in a later HDP release. Sqoop uses 1.8.0 of avro and there are other Hadoop components using 1.7.5 or 1.7.4 avro. 

Please add the following property after 'import': -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 &lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 17:30:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122055#M43126</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-10-10T17:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122056#M43127</link>
      <description>&lt;P&gt;Thank you very much, with -Dmapreduce.job.user.classpath.first=true works like a charm!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 18:05:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122056#M43127</guid>
      <dc:creator>saparicio</dc:creator>
      <dc:date>2016-10-10T18:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122057#M43128</link>
      <description>&lt;P&gt;I'm getting this same error , but when trying to call swoop export.  The -Dmapreduce.job.user.classpath.first=true is not valid for export.  Does anyone know how to resolve this similar issue but for exports. (I'm running HDP 2.6)&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 21:02:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122057#M43128</guid>
      <dc:creator>sculver</dc:creator>
      <dc:date>2017-04-19T21:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122058#M43129</link>
      <description>&lt;P&gt;Sorry, never mind -- I didn't realize that the -D parameters must appear before other params.  I added it as my first param and it worked like a charm.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 21:46:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/122058#M43129</guid>
      <dc:creator>sculver</dc:creator>
      <dc:date>2017-04-19T21:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import as-avrodatafile fails with java.lang.NoSuchMethodError: org.apache.avro.reflect.ReflectData.addLogicalTypeConversion</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/286863#M43131</link>
      <description>&lt;P&gt;this solution is not working for please tell me where I am going wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sqoop-import -Dmapreduce.job.user.classpath.first=true -Dhadoop.security.credential.provider.path=jceks://x.jceks \&lt;BR /&gt;--connect="jdbc:mysql://quickstart.cloudera:3306/retail_db" \&lt;BR /&gt;--username retail_dba \&lt;BR /&gt;--password cloudera \&lt;BR /&gt;--table=departments \&lt;BR /&gt;--hive-import \&lt;BR /&gt;--target-dir=/departments \&lt;BR /&gt;--as-avrodatafile&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jan 2020 15:07:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-as-avrodatafile-fails-with-java-lang/m-p/286863#M43131</guid>
      <dc:creator>saskan</dc:creator>
      <dc:date>2020-01-05T15:07:20Z</dc:date>
    </item>
  </channel>
</rss>

