2016-08-24 82 views

回答

1

Try:

rdd.map(_.split("@")).flatMap { case Array(_, d) => d.split("\\.").headOption }.distinct