You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Leemoonsoo <gi...@git.apache.org> on 2015/09/02 06:20:23 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

GitHub user Leemoonsoo opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/270

    ZEPPELIN-262 Use spark-submit to run spark interpreter process

    https://issues.apache.org/jira/browse/ZEPPELIN-262
    
    This patch make zeppelin uses spark-submit to run spark interpreter process, when SPARK_HOME is defined. This will potentially solve all the configuration problems related to spark interpreter.
    
    When SPARK_HOME is not defined, it still functioning by configure and run spark interpreter in current(old) way. However, using spark interpreter without SPARK_HOME is not encouraged from this patch.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Leemoonsoo/incubator-zeppelin spark_submit

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/270.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #270
    
----
commit 2d27e9cb7d24b0569d8af1f5a2b22fc3128140cc
Author: Lee moon soo <mo...@apache.org>
Date:   2015-09-02T02:45:07Z

    use spark-submit to run spark interpreter process when SPARK_HOME is defined

commit 5d3154e542cacab229b39688026a3d88b6ff6b78
Author: Lee moon soo <mo...@apache.org>
Date:   2015-09-02T02:45:31Z

    Remove clean. otherwise mvn clean package will remove interpreter/spark/dep directory

commit cac2bb83f539f077769e73067e35ff17816b3077
Author: Lee moon soo <mo...@apache.org>
Date:   2015-09-02T03:32:31Z

    Take care classpath of SparkIMain

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-190863726
  
    @smusevic You look like have `export SPARK_CLASSPATH=/etc/hbase/conf` in conf/zeppelin-env.sh
    Could you try `export ZEPPELIN_CLASSPATH=/etc/hbase/conf` instead?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by smusevic <gi...@git.apache.org>.
Github user smusevic commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-191162345
  
    @Leemoonsoo thanks for your reply. I most definitely do not have `export SPARK_CLASSPATH=/etc/hbase/conf` in my `conf/zeppelin-env.sh`, double checked just now.
    However, is anyone aware of `SPARK_CLASSPATH` getting initialized during `spark-submit`?
    `SPARK_CLASSPATH` does get initialized in the `bit/interpreter.sh`, but investigation has revealed that the line in question does not execute if `SPARK_HOME` is set in `conf/zeppelin-env.sh`.
    Anyway, my question now would be: if `SPARK_CLASSPATH` is not set when `spark-submit` is executed then Zeppelin using a `SPARK_HOME` set to some value should work?
    Thank you in advance!
    Regards,
     S.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-138149117
  
    Merging, if there're no more discussions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-191328897
  
    @smusevic 
    Right, that should work. Set `SPARK_HOME` is preferred way to configure Zeppelin with Spark.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-137628826
  
    I have pushed more commits, that handles pyspark. Please review them, too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-zeppelin/pull/270


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-137828701
  
    @Leemoonsoo how does z.load work with spark-submit? Seems those dependency jars should be added automatically to spark-submit's --jars argument.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-137376098
  
    This is awesome improvement, thank you @Leemoonsoo
    Looks great to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-137903488
  
    looks good!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-136947830
  
    Ready to merge. Please review the changes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-137893230
  
    @randerzander  dependency jars downloaded from z.load() is being loaded after SparkContext is created by calling sc.addJar(). So i think it'll not be affected by this change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by smusevic <gi...@git.apache.org>.
Github user smusevic commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-191650701
  
    Thanks, it turned out that `SPARK_CLASSPATH` was set in one of the shell files, bag practice... It works fine now, thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-262 Use spark-submit to ...

Posted by smusevic <gi...@git.apache.org>.
Github user smusevic commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/270#issuecomment-190727451
  
    Hello,
      I'm testing out `zeppelin-0.5.6-incubating-bin-all.tgz`.
    
    I might be wrong but it seems to me that this change causes:
    ```
    SPARK_CLASSPATH was detected (set to ':/etc/hbase/conf').
    This is deprecated in Spark 1.0+.
    
    Please instead use:
     - ./spark-submit with --driver-class-path to augment the driver classpath
     - spark.executor.extraClassPath to augment the executor classpath
    
    16/03/01 08:11:50 WARN spark.SparkConf: Setting 'spark.executor.extraClassPath' to ':/etc/hbase/conf' as a work-around.
    16/03/01 08:11:50 ERROR spark.SparkContext: Error initializing SparkContext.
    org.apache.spark.SparkException: Found both spark.driver.extraClassPath and SPARK_CLASSPATH. Use only the former.
            at org.apache.spark.SparkConf$$anonfun$validateSettings$6$$anonfun$apply$8.apply(SparkConf.scala:473)
            at org.apache.spark.SparkConf$$anonfun$validateSettings$6$$anonfun$apply$8.apply(SparkConf.scala:471)
            at scala.collection.immutable.List.foreach(List.scala:318)
            at org.apache.spark.SparkConf$$anonfun$validateSettings$6.apply(SparkConf.scala:471)
            at org.apache.spark.SparkConf$$anonfun$validateSettings$6.apply(SparkConf.scala:459)
            at scala.Option.foreach(Option.scala:236)
            at org.apache.spark.SparkConf.validateSettings(SparkConf.scala:459)
            at org.apache.spark.SparkContext.<init>(SparkContext.scala:391)
            at org.apache.zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:339)
            at org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:145)
            at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:465)
            at org.apache.zeppelin.interpreter.ClassloaderInterpreter.open(ClassloaderInterpreter.java:74)
            at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:68)
            at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:92)
            at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:300)
            at org.apache.zeppelin.scheduler.Job.run(Job.java:169)
            at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:134)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
    ```
    when `conf/zeppelin-env.sh` contains `export SPARK_HOME=...`.
    Removing the following text from added line `138` in `bin/interpreter.sh`:
    ```
    --driver-class-path "${ZEPPELIN_CLASSPATH_OVERRIDES}:${CLASSPATH}"
    ```
    the issue is resolved, as suggested by this [email](https://mail-archives.apache.org/mod_mbox/incubator-zeppelin-users/201509.mbox/%3CCADRmTZK5giPRhwjFqaQP_1PL08QWyRMTA=XhDg=z59nwPW3D9Q@mail.gmail.com%3E) but something else happens:
    ```
    | z
    <console>:22: error: not found: value z
                  z
                  ^
    ```
    which sadly blocks me from using `z.load("path/to/jar")` which is what I really need to do.
    Please note that I do not have access to change any of the files inside `SPARK_HOME`, including any `conf` files residing therein. 
    
    Is there a workaround for this? Am I doing something wrong?
    Thanks in advance!
    S.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---