win10+ eclipse 本地調(diào)試宜岛,集群服務(wù)姜贡,虛擬機(jī)3個(gè)實(shí)例撩穿,master + 2 slaves
報(bào)錯(cuò)信息見(jiàn)標(biāo)題磷支,問(wèn)題的關(guān)鍵在于FileSystem的初始化方式導(dǎo)致的異常拋出。
FileSystem fs = FileSystem.get(conf); //會(huì)報(bào)錯(cuò)食寡,即使你把本地的coresite雾狈,
hdfssite等xml文件加入配置也沒(méi)有用,hadoop會(huì)認(rèn)為你的FS就是本機(jī)的操作系統(tǒng)FS抵皱。
即LocalFileSystem善榛。
FileSystem fs = FileSystem.get(URI.create(dst),conf);//正常,其中URI指定 hdfs://具體路徑