RE: Converting array to DF

2016-03-02 Thread Mao, Wei
“Seq” will be implicitly converted to “DataFrameHolder”, and “toDF” method is defined in “DataFrameHolder”. And there is no such method for Array. So user has to convert explicitly by himself. implicit def localSeqToDataFrameHolder[A <: Product : TypeTag](data: Seq[A]): DataFrameHolder = {

RE: Connect the two tables in spark sql

2016-03-01 Thread Mao, Wei
It should be a “union” operation instead of “join”. And besides from Ted’s answer, if you are working with DataSet API: def union(other: Dataset[T]): Dataset[T] = withPlan[T](other){ (left, right) => Thanks, William From: Ted Yu [mailto:yuzhih...@gmail.com] Sent: Wednesday, March 2, 2016 11:41

RE: Spark Streaming - graceful shutdown when stream has no more data

2016-02-25 Thread Mao, Wei
I would argue against making it configurable unless there is real production use case. If it’s just for test, there are bunch of ways to achieve it. For example, you can mark if test streaming is finished globally, and stop ssc on another thread when status of that mark changed. Back to