Error when trying to write to hdfs: Server IPC version 9 cannot communicate with client version 4

前端 未结 3 1613
日久生厌
日久生厌 2020-12-19 02:44

I am trying a write a file to hdfs using scala and I keep getting the following error

Caused by: org.apache.hadoop.ipc.RemoteException: Server IPC version 9         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 03:18

    I had the same problem using Hadoop 2.3 and I've solved it adding the following lines to my build.sbt file :

    libraryDependencies += "org.apache.hadoop" % "hadoop-client" % "2.3.0"
    
    libraryDependencies += "org.apache.hadoop" % "hadoop-hdfs" % "2.3.0"
    

    So I think in your case you case use the 2.4.0 version.

    PS: It also worked on your code sample. I hope it will help

提交回复
热议问题