Description
It seems, that method takeSample ends in infinite loop if called on empty RDD, trying to collect enough samples.
val list = List[String]("aaa")
val rdd = sc.parallelize(list)
rdd.takeSample(true, 1, System.nanoTime.toInt)
val empty = rdd.filter(_ => false)
empty.takeSample(true, 1, System.nanoTime.toInt)