我正在尝试使用Spark中的takeSample()函数,参数是 - 数据,要采取的样本数和种子.但我不想使用种子.我想每次都有不同的答案.我无法弄明白我该怎么做.我尝试使用作为种子值,但它给出了一个错误,因为我认为数据类型不匹配.是否有其他类似的功能可以在没有种子的情况下使用?或者我可以使用任何其他实现,以便每次都获得不同的输出.System.nanoTimetakeSample()takeSample()
takeSample()
System.nanoTime
random scala seeding
random ×1
scala ×1
seeding ×1