Github user 1ambda commented on the issue:

    https://github.com/apache/zeppelin/pull/1831
  
    I tested on yarn-client, mesos-client and found that 
    
    - **mesos-client mode copy pyspark-cassandra submitted by `--packages`** as 
you can see [here] 
(https://gist.github.com/1ambda/e3326107d14ece9a39663cbc56f05756) (the error is 
due to invalid python version, not problem of spark, pyspark-cassandra)
    
    ```python
    Using Python version 2.6.6 (r266:84292, Aug 18 2016 15:13:37)
    SparkContext available as sc, HiveContext available as sqlContext.
    >>> import pyspark_cassandra
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File 
"/tmp/spark-df7bc8fa-233f-4124-855b-4a39fa948c1a/userFiles-ab70ffa3-212b-47ee-9611-9c240d3ce899/TargetHolding_pyspark-cassandra-0.3.5.jar/pyspark_cassandra/__init__.py",
 line 24, in <module>
      File 
"/tmp/spark-df7bc8fa-233f-4124-855b-4a39fa948c1a/userFiles-ab70ffa3-212b-47ee-9611-9c240d3ce899/TargetHolding_pyspark-cassandra-0.3.5.jar/pyspark_cassandra/context.py",
 line 16, in <module>
      File 
"/tmp/spark-df7bc8fa-233f-4124-855b-4a39fa948c1a/userFiles-ab70ffa3-212b-47ee-9611-9c240d3ce899/TargetHolding_pyspark-cassandra-0.3.5.jar/pyspark_cassandra/rdd.py",
 line 291
        k = Row(**{c: row.__getattr__(c) for c in columns})
                                           ^
    SyntaxError: invalid syntax
    >>>
    ```
    
    - **yarn-client mode doens't copy pyFiles** as you can see 
[here](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L354-L357)
    
    ```scala
        // If we're running a python app, set the main class to our specific 
python runner
        if (args.isPython && deployMode == CLIENT) {
    
    ...
    
          if (clusterManager != YARN) {
            // The YARN backend handles python files differently, so don't 
merge the lists.
            args.files = mergeFileLists(args.files, args.pyFiles)
          }
    ```
    
    ## Summary
    
    @zjffdu @felixcheung 
    
    1. I am not sure why they decided not to copy py-files in yarn-client mode. 
But it's problem of spark, not zeppelin. 
    2. As you saw, this is **expected behavior** at least in local, 
mesos-client. 



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to