Thanks Tobias & Tathagata.
these are great.
On Wed, May 21, 2014 at 8:02 PM, Tobias Pfeiffer wrote:
> On Thu, May 22, 2014 at 8:07 AM, Tathagata Das
> wrote:
> > records.filter { _.isInstanceOf[Orange] } .map { _.asInstanceOf[Orange] }
>
> I think a Scala-ish way would be
>
> records.flatMap(_
On Thu, May 22, 2014 at 8:07 AM, Tathagata Das
wrote:
> records.filter { _.isInstanceOf[Orange] } .map { _.asInstanceOf[Orange] }
I think a Scala-ish way would be
records.flatMap(_ match {
case i: Int=>
Some(i)
case _ =>
None
})
You could do
records.filter { _.isInstanceOf[Orange] } .map { _.asInstanceOf[Orange] }
On Wed, May 21, 2014 at 3:28 PM, Ian Holsman wrote:
> Hi.
> Firstly I'm a newb (to both Scala & Spark).
>
> I have a stream, that contains multiple types of records, and I would like
> to create multiple st
Hi.
Firstly I'm a newb (to both Scala & Spark).
I have a stream, that contains multiple types of records, and I would like
to create multiple streams based on that
currently I have it set up as
class ALL
class Orange extends ALL
class Apple extends ALL
now I can easily add a filter ala
val reco