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

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

上一篇:删除API详解


下一篇:使用C#从XML中批量删除指定节点