在window下调试Hadoop,查询hbase表数据时。报错
Could not locate executable null\bin\winutils.exe
解决办法为在程序开始加入以下代码:
File workaround = new File(".");
System.getProperties().put("hadoop.home.dir", workaround.getAbsolutePath());
new File("./bin").mkdirs(); new File("./bin/winutils.exe").createNewFile();
刷新工程,再次运行程序,此问题完美解决。