报错解决:Java代码访问hdfs权限问题

报错解决:Java代码访问hdfs权限问题_System


解决方案:在代码中加入

System,setProperty("HADOOP_USER_NAME", "root")