[ 
https://issues.apache.org/jira/browse/MESOS-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14334132#comment-14334132
 ] 

Adam B commented on MESOS-2390:
-------------------------------

Also looks like MESOS_FRAMEWORKS_HOME is broken too. Basic patch should look 
like the following (but with tests?):
{code:}
diff --git a/src/slave/containerizer/fetcher.cpp 
b/src/slave/containerizer/fetcher.cpp
index d290f95..a207fa3 100644
--- a/src/slave/containerizer/fetcher.cpp
+++ b/src/slave/containerizer/fetcher.cpp
@@ -67,15 +67,17 @@ map<string, string> Fetcher::environment(
     fetcherInfo.set_user(user.get());
   }
 
+  map<string, string> result;
   if (!flags.frameworks_home.empty()) {
     fetcherInfo.set_frameworks_home(flags.frameworks_home);
+    result["MESOS_FRAMEWORKS_HOME"] = flags.frameworks_home;
   }
 
   if (!flags.hadoop_home.empty()) {
     fetcherInfo.set_hadoop_home(flags.hadoop_home);
+    result["HADOOP_HOME"] = flags.hadoop_home;
   }
 
-  map<string, string> result;
   result["MESOS_FETCHER_INFO"] = stringify(JSON::Protobuf(fetcherInfo));
 
   return result;
{code}

> HADOOP_HOME no longer works with fetcher
> ----------------------------------------
>
>                 Key: MESOS-2390
>                 URL: https://issues.apache.org/jira/browse/MESOS-2390
>             Project: Mesos
>          Issue Type: Bug
>          Components: fetcher, hadoop
>    Affects Versions: 0.22.0
>            Reporter: Adam B
>            Assignee: Bernd Mathiske
>            Priority: Blocker
>              Labels: fetcher, hadoop, hdfs, mesosphere
>
> As of commit "699e638ef80739203ed38ba7238bbc176b107355 Consolidate all 
> fetcher env vars into one that holds a JSON object." the HADOOP_HOME 
> environment variable is no longer set when starting the fetcher, which means 
> that hdfs.hpp's HDFS() will no longer look for the hadoop binary inside the 
> user-provided HADOOP_HOME, whether it was specified via --hadoop_home or the 
> HADOOP_HOME env variable.
> This is a regression in functionality from Mesos 0.21 and before, and breaks 
> the use of HDFS when not installed in the slave's PATH. The future fetcher 
> patch(es) for 0.23+ fixes this, but we need something in 0.22 to prevent 
> regression.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to