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

Tathagata Das commented on SPARK-6211:
--------------------------------------

That a good point. That requires the kafka-assembly. Fortunately, the 
external/kafka-assembly project already exists, that create the JAR. All you 
need to figure out how to add that the generated kafka-assembly.jar to the Java 
class path when pyspark is called for running tests. 

1. bin/pyspark already calls bin/spark-submit, which can take the 
kafka-assembly jar as    --jars <path-to-jar>. 
2. The python tests are run with bin/python/run-tests, which calls bin/pyspark. 
Please take a look at those to figure out how we can pass on the kafka assembly 
with --jars for the kafka python tests.

Does that make sense?




> Test Python Kafka API using Python unit tests
> ---------------------------------------------
>
>                 Key: SPARK-6211
>                 URL: https://issues.apache.org/jira/browse/SPARK-6211
>             Project: Spark
>          Issue Type: Test
>          Components: Streaming, Tests
>            Reporter: Tathagata Das
>            Assignee: Saisai Shao
>            Priority: Critical
>
> This is tricky in python because the KafkaStreamSuiteBase (which has the 
> functionality of creating embedded kafka clusters) is in the test package, 
> which is not in the python path. To fix that, we have to ways. 
> 1. Add test jar to classpath in python test. Thats kind of trickier.
> 2. Bring that into the src package (maybe renamed as KafkaTestUtils), and 
> then wrap that in python to use it from python. 
> If (2) does not add any extra test dependencies to the main Kafka pom, then 2 
> should be simpler to do.  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to