hdfs中Exception in createBlockOutputStream以及MapReduce中I/O error constructing remote block reader
生活随笔
收集整理的這篇文章主要介紹了
hdfs中Exception in createBlockOutputStream以及MapReduce中I/O error constructing remote block reader
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題描述
(1) windows電腦向aliyun進行hdfs api文件追加操作時出現下方錯誤:
(2) windows電腦向aliyun進行mapreduce api操作時出現下方錯誤:
WARN [LocalJobRunner Map Task Executor #0] (BlockReaderFactory.java:716) - I/O error constructing remote block reader.問題原因
客戶端創建文件先訪問NameNode服務器進行創建文件Meta信息,以及文件樹,此時訪問NameNode的IP,NameNode服務器創建文件成功后,會返回對應dataNode的服務器節點,但此時的節點信息中的ip是與NameNode在同一網絡下的內網IP,客戶端是無法訪問,也就無法寫入。
問題解決
(1) 在hdfs-site.xml中添加配置
(2) 或者在idea代碼中添加
configuration.set("dfs.client.use.datanode.hostname", "true");總結
以上是生活随笔為你收集整理的hdfs中Exception in createBlockOutputStream以及MapReduce中I/O error constructing remote block reader的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 安卓rpg绅士游戏资源_海贼无双3(动作
- 下一篇: flex java oracle_Fle