spark map中忽略某些行
2021-08-23 13:44 ZealouSnesS 阅读(102) 评论(0) 编辑 收藏 举报用 mapPartiton
def missingFeatures(stuff): Boolean = ??? // Determine if features is missing
val data = sc.textFile(my_file)
.flatMap {line =>
if(missingFeatures(line)) None
else Some(line)
};