<?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 Re: Configuration objects fail to initialize in HDP 2.2.4.8+ because /etc/hadoop/conf in no longer in CLASSPATH in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Configuration-objects-fail-to-initialize-in-HDP-2-2-4-8/m-p/95928#M9288</link>
    <description>&lt;P&gt;&lt;STRONG&gt;SYMPTOM&lt;/STRONG&gt;: The MR classpath generated in HDP 2.2.0+ no longer includes the Hadoop config files that were present in previous versions. Signs of this include an inability to read core-site.xml and find properties such as fs.defaultFS, after upgrading from HDP 2.1.x or earlier. Error messages in stdout may look similar to:&lt;/P&gt;&lt;P&gt;Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService
&lt;/P&gt;&lt;STRONG&gt;ROOT CAUSE&lt;/STRONG&gt;: As of HDP 2.2.0, the classpath is handled differently, in that MapReduce does not include the cluster classpath. This is intended to isolate a running MapReduce application from jar version changes during a rolling upgrade scenario.&lt;STRONG&gt;
&lt;/STRONG&gt;
&lt;STRONG&gt;WORKAROUND&lt;/STRONG&gt;: Potential workarounds include:
&lt;OL&gt;
&lt;LI&gt;Change code to add the required classpath elements explicitly.&lt;/LI&gt;&lt;LI&gt;Change code to exec the hadoop classpath shell command to determine the cluster classpath at runtime.&lt;/LI&gt;&lt;LI&gt;If code cannot be changed, reconfigure mapreduce.application.classpath in mapred-site.xml so that it does include the cluster classpath. However, this can compromise classpath isolation for running MapReduce jobs during a future rolling upgrade, and is therefore not recommended.&lt;/LI&gt;&lt;/OL&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt; Launch the application using a shell script that includes&lt;PRE&gt;export CLASSPATH=$CLASSPATH:`hadoop classpath`&lt;/PRE&gt;&lt;STRONG&gt;RESOLUTION&lt;/STRONG&gt;: Working as designed. Use one of the above workarounds if necessary.</description>
    <pubDate>Fri, 23 Oct 2015 21:06:03 GMT</pubDate>
    <dc:creator>amiller</dc:creator>
    <dc:date>2015-10-23T21:06:03Z</dc:date>
    <item>
      <title>Configuration objects fail to initialize in HDP 2.2.4.8+ because /etc/hadoop/conf in no longer in CLASSPATH</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Configuration-objects-fail-to-initialize-in-HDP-2-2-4-8/m-p/95927#M9287</link>
      <description>&lt;P&gt;In order to facilitate rolling upgrades,  /etc/hadoop/conf is not part of the CLASSPATH env var that is constructed for a job.

However when jobs are using a Configuration object: 

Configuration conf2 = new Configuration(); 

&lt;A href="https://hadoop.apache.org/docs/current/api/org/apache/hadoop/conf/Configuration.html"&gt;https://hadoop.apache.org/docs/current/api/org/apache/hadoop/conf/Configuration.html&lt;/A&gt;

It tries to read the core-site.xml from the CLASSPATH&lt;/P&gt;&lt;P&gt;How can this be addressed?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 16:18:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Configuration-objects-fail-to-initialize-in-HDP-2-2-4-8/m-p/95927#M9287</guid>
      <dc:creator>edemauro</dc:creator>
      <dc:date>2015-10-23T16:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Configuration objects fail to initialize in HDP 2.2.4.8+ because /etc/hadoop/conf in no longer in CLASSPATH</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Configuration-objects-fail-to-initialize-in-HDP-2-2-4-8/m-p/95928#M9288</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SYMPTOM&lt;/STRONG&gt;: The MR classpath generated in HDP 2.2.0+ no longer includes the Hadoop config files that were present in previous versions. Signs of this include an inability to read core-site.xml and find properties such as fs.defaultFS, after upgrading from HDP 2.1.x or earlier. Error messages in stdout may look similar to:&lt;/P&gt;&lt;P&gt;Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService
&lt;/P&gt;&lt;STRONG&gt;ROOT CAUSE&lt;/STRONG&gt;: As of HDP 2.2.0, the classpath is handled differently, in that MapReduce does not include the cluster classpath. This is intended to isolate a running MapReduce application from jar version changes during a rolling upgrade scenario.&lt;STRONG&gt;
&lt;/STRONG&gt;
&lt;STRONG&gt;WORKAROUND&lt;/STRONG&gt;: Potential workarounds include:
&lt;OL&gt;
&lt;LI&gt;Change code to add the required classpath elements explicitly.&lt;/LI&gt;&lt;LI&gt;Change code to exec the hadoop classpath shell command to determine the cluster classpath at runtime.&lt;/LI&gt;&lt;LI&gt;If code cannot be changed, reconfigure mapreduce.application.classpath in mapred-site.xml so that it does include the cluster classpath. However, this can compromise classpath isolation for running MapReduce jobs during a future rolling upgrade, and is therefore not recommended.&lt;/LI&gt;&lt;/OL&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt; Launch the application using a shell script that includes&lt;PRE&gt;export CLASSPATH=$CLASSPATH:`hadoop classpath`&lt;/PRE&gt;&lt;STRONG&gt;RESOLUTION&lt;/STRONG&gt;: Working as designed. Use one of the above workarounds if necessary.</description>
      <pubDate>Fri, 23 Oct 2015 21:06:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Configuration-objects-fail-to-initialize-in-HDP-2-2-4-8/m-p/95928#M9288</guid>
      <dc:creator>amiller</dc:creator>
      <dc:date>2015-10-23T21:06:03Z</dc:date>
    </item>
  </channel>
</rss>

