>> As you shall see,
>> https://github.com/apache/incubator-zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java#L354
>>  
>> <https://github.com/apache/incubator-zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java#L354>
>> 
>> Env var overrides property setting, so if env var is set in zeppelin-env.sh 
>> then the user setting the property on the Interpreter page would have no 
>> effect. So that behavior seems to be opposite to what you want?

To summarize what I document below, I do not observe the behavior that Felix 
documents above.  It appears that setting env vars provides defaults and the 
user can indeed override them in the interpreter settings.

So here’s what I did.  I build zeppelin using the following:

mvn clean package -Pspark-1.5 -Dhadoop.version=2.6.0 -Phadoop-2.6 -DskipTests 
-P build-distr

Then I:

tar -zxvf 
~/Development/zeppelin/cching/incubator-zeppelin/zeppelin-distribution/target/zeppelin-0.6.0-incubating-SNAPSHOT.tar.gz
cd zeppelin-0.6.0-incubating-SNAPSHOT
ls -l conf

<Here I note that conf/interpreters.json does not exist>

echo 'export MASTER=spark://hyperdawn:7077' >conf/zeppelin-env.sh
echo 'export SPARK_HOME=/Users/cching/apps/spark/spark-1.5.1-bin-hadoop2.6' 
>>conf/zeppelin-env.sh
echo 'export ZEPPELIN_PORT=8082' >>conf/zeppelin-env.sh

<I have a port conflict on 8080, hence I use port 8082 instead>

➜  cat conf/zeppelin-env.sh
export MASTER=spark://hyperdawn:7077
export SPARK_HOME=/Users/cching/apps/spark/spark-1.5.1-bin-hadoop2.6
export ZEPPELIN_PORT=8082

bin/zeppelin.sh

I then go to http://localhost:8082/#/interpreter 
<http://localhost:8082/#/interpreter> and note:

master  spark://hyperdawn:7077
spark.home      /Users/cching/apps/spark/spark-1.5.1-bin-hadoop2.6
I then change “master” to “spark://localhost:7077 <spark://localhost:7077>” and 
spark.home to a blank value and save.  I am prompted to confirm that I want to 
save my changes and restart, though I’m not sure if a restart actually 
occurred.  Certainly on the console it doesn’t appear to have done anything.

So I manually restart with a Ctrl+C and bin/zeppelin.sh.  I refresh 
http://localhost:8082/#/interpreter <http://localhost:8082/#/interpreter> and 
check “master” and “spark.home”:

master  spark://localhost:7077

spark.home
They appear to be what I, as a user, have set them to and not to what’s set in 
the environment variables.

This appears to be exactly what I want.  My immediate need is to simply be able 
to set spark.app.name, but ideally the above is the behavior I want. So, what 
is my recourse here?  I note that IMO setting spark.app.name through 
environment variables is not the best way to do things, but with spark master 
and spark.home being set this way, I don’t see that what I want to do is 
inconsistent with that.

Felix or any other developers, I really would appreciate why what I want to do 
is unacceptable.  I am a reasonable person, but I need to solve my problem ;-)

Cheers,
Craig

Reply via email to