单机版使用的是FileSystem类的静态函数:

FileSystem hdfs = FileSystem.get(conf) 

伪分布式下需要使用Path来获得

Path path = new Path("hdfs://mlj:9000/dir");  
FileSystem hdfs = path.getFileSystem(jobConf);  

  

相关文章:

  • 2021-10-08
  • 2021-12-25
  • 2021-08-09
  • 2021-10-17
  • 2022-01-01
  • 2021-07-22
  • 2021-12-08
  • 2021-10-17
猜你喜欢
  • 2021-04-26
  • 2021-12-12
  • 2021-08-23
  • 2021-10-15
  • 2021-12-26
  • 2021-09-16
  • 2021-06-19
相关资源
相似解决方案