Skip to content

Commit bd3ba53

Browse files
committed
WIP
1 parent 5c04a5f commit bd3ba53

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ private[spark] object PythonRDD extends Logging {
350350
} catch {
351351
case eof: EOFException => {}
352352
}
353+
println("RDDDD ==================")
354+
println(objs)
353355
JavaRDD.fromRDD(sc.sc.parallelize(objs, parallelism))
354356
}
355357

examples/src/main/python/streaming/test_oprations.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@
99
conf = SparkConf()
1010
conf.setAppName("PythonStreamingNetworkWordCount")
1111
ssc = StreamingContext(conf=conf, duration=Seconds(1))
12+
ssc.checkpoint("/tmp/spark_ckp")
1213

13-
test_input = ssc._testInputStream([1,1,1,1])
14-
mapped = test_input.map(lambda x: (x, 1))
15-
mapped.pyprint()
14+
test_input = ssc._testInputStream([[1],[1],[1]])
15+
# ssc.checkpoint("/tmp/spark_ckp")
16+
fm_test = test_input.flatMap(lambda x: x.split(" "))
17+
mapped_test = fm_test.map(lambda x: (x, 1))
1618

19+
20+
mapped_test.print_()
1721
ssc.start()
1822
# ssc.awaitTermination()
1923
# ssc.stop()

0 commit comments

Comments
 (0)