本篇內(nèi)容介紹了“如何使用scala編寫wordcount程序”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
直接上程序吧
一、公共類
六、測(cè)試數(shù)據(jù)
hdfs dfs -ls /ruozedata/scala
Found 3 items
-rw-r--r-- 3 hadoop supergroup 24 2018-02-12 14:48 /ruozedata/scala/201802121449-1.txt
-rw-r--r-- 3 hadoop supergroup 12 2018-02-12 14:48 /ruozedata/scala/201802121449-2.txt
-rw-r--r-- 3 hadoop supergroup 12 2018-02-12 14:48 /ruozedata/scala/201802121449-3.txt
-----------------------------------------------------------------------------------------------------------
hdfs dfs -cat /ruozedata/scala/201802121449-1.txt
hello world
hello worls
hdfs dfs -cat /ruozedata/scala/201802121449-2.txt
hello ruoze
hdfs dfs -cat /ruozedata/scala/201802121449-3.txt
ruoze hello
七、測(cè)試結(jié)果
“如何使用scala編寫wordcount程序”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!