title: Hadoop on Mesos fails with "Could not find or load main class org.apache.hadoop.mapred.MesosExecutor"
body: <p>I have a Mesos cluster setup -- I have verified that the master can see the slaves -- but when I attempt to run a Hadoop job, all tasks wind up with a status of LOST.  The same error is present in all the slave stderr logs:</p>
  
  <pre><code>Error: Could not find or load main class org.apache.hadoop.mapred.MesosExecutor
  </code></pre>
  
  <p>and that is the only line in the stderr logs.</p>
  
  <p>Following the instructions on <a href="http://mesosphere.io/learn/run-hadoop-on-mesos/" rel="nofollow">http://mesosphere.io/learn/run-hadoop-on-mesos/</a>, I have put a modified Hadoop distribution on HDFS which each slave can access.
  In the <code>lib</code> directory of the Hadoop distribution, I have added <code>hadoop-mesos-0.0.4.jar</code> and <code>mesos-0.14.2.jar</code>.</p>
  
  <p>I have verified that each slave does in fact download this Hadoop distribution, and that <code>hadoop-mesos-0.0.4.jar</code> contains the class <code>org.apache.hadoop.mapred.MesosExecutor</code>, so I cannot figure out why the class cannot be found.</p>
  
  <p>I am using Hadoop from CDH4.4.0 and mesos-0.15.0-rc4.</p>
  
  <p>Does any one have any suggestions as to what might be the problem?  I know I would always start with a <code>CLASSPATH</code> problem, but, in this case, the mesos-slave is downloading, unpacking, and attempting to run a Hadoop TaskTracker so I would imagine any <code>CLASSPATH</code> would be setup by the mesos-slave.</p>
  
  <p>In the stdout of the slave logs, the environment is printed.  There is a <code>MESOS_HADOOP_HOME</code> which is empty.  Should this be set to something?  If it is supposed to be set to the downloaded Hadoop distribution, I cannot set it in advance because the Hadoop distribution is downloaded to a new location every time.</p>
  
  <p>In the event that is related (some permissions issue maybe), when attempting to browse slave logs via the master UI, I get the error <code>Error browsing path: ...</code>.
  The user running mesos-slave can browse to the correct directory when I do so manually.</p>