File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1503,10 +1503,13 @@ def search_flume_assembly_jar():
15031503 return jars [0 ]
15041504
15051505
1506- def search_kinesis_asl_assembly_jar ():
1506+ def _kinesis_asl_assembly_dir ():
15071507 SPARK_HOME = os .environ ["SPARK_HOME" ]
1508- kinesis_asl_assembly_dir = os .path .join (SPARK_HOME , "external/kinesis-asl-assembly" )
1509- jars = search_jar (kinesis_asl_assembly_dir , "spark-streaming-kinesis-asl-assembly" )
1508+ return os .path .join (SPARK_HOME , "external/kinesis-asl-assembly" )
1509+
1510+
1511+ def search_kinesis_asl_assembly_jar ():
1512+ jars = search_jar (_kinesis_asl_assembly_dir (), "spark-streaming-kinesis-asl-assembly" )
15101513 if not jars :
15111514 return None
15121515 elif len (jars ) > 1 :
@@ -1569,7 +1572,7 @@ def search_kinesis_asl_assembly_jar():
15691572 else :
15701573 raise Exception (
15711574 ("Failed to find Spark Streaming Kinesis assembly jar in %s. "
1572- % kinesis_asl_assembly_dir ) +
1575+ % _kinesis_asl_assembly_dir () ) +
15731576 "You need to build Spark with 'build/sbt -Pkinesis-asl "
15741577 "assembly/package streaming-kinesis-asl-assembly/assembly'"
15751578 "or 'build/mvn -Pkinesis-asl package' before running this test." )
You can’t perform that action at this time.
0 commit comments