首页 > Windows开发 > 详细

sprongboot 解决spark报错:Failed to locate the winutils binary in the hadoop binary path

时间:2020-05-07 22:29:58      阅读:77      评论:0      收藏:0      [点我收藏+]

1.下载hadoop-common-2.2.0-bin并解压到某个目录

 https://github.com/srccodes/hadoop-common-2.2.0-bin

 

2.设置hadoop.home.dir

 

System.setProperty("hadoop.home.dir", "D:\\hadoop-common-2.2.0-bin-master")

 

 

@SpringBootApplication
public class Application {

@PostConstruct
void started() 
{
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
//TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
//TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
System.setProperty("hadoop.home.dir", "/opt/software/hadoop-common-2.2.0-bin-master")

} public static void main(String[] args) { SpringApplication.run(Application.class, args); } }

 

sprongboot 解决spark报错:Failed to locate the winutils binary in the hadoop binary path

原文:https://www.cnblogs.com/lshan/p/12845751.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!