@Ratna Chaitanya Raju Bandaru
如何將存儲前抽樣。我想做一些轉換
我把整個代碼
val輸入= sc.textFile (“dbfs: / FileStore shared_uploads / Recent9 / customerorders.csv”)
val mappedInput = input.map (x = > (x.split (", ") (0), x.split (", ") (2) .toFloat))
val totalByCustomer = mappedInput.reduceByKey (_ + _)
val premiumbeplay体育app下载地址Customers = totalByCustomer。過濾器(x = > x。_2 > 5000)
val doubledAmount = premiumbeplay体育app下载地址Customers.map (x = > (x。_1,x._2 * 2) .persist (StorageLevel.MEMORY_ONLY)