spring-hbase应用程序中的IOException

时间:2015-11-05 10:31:28

标签: java eclipse hadoop hbase hortonworks-data-platform

在运行spring-hbase应用程序时,我得到了:

  

.IOException:找不到可执行文件null \ bin \ winutils.exe

@RestController
@EnableAutoConfiguration(exclude={VelocityAutoConfiguration.class})
public class App {
       public static void main(final String[] args) {
            SpringApplication.run(App.class, args);

            Configuration configuration = HBaseConfiguration.create();
            configuration.set("hbase.zookeeper.property.clientPort", "2181");
            configuration.set("hbase.zookeeper.quorum", "hortonworks.hbase.vm");
            configuration.set("zookeeper.znode.parent", "/hbase-unsecure");
            configuration.set(" fs.defaultFS","hdfs://sandbox.hortonworks.com:8020");
        }
}

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
 at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:356)
 at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:371)
 at org.apache.hadoop.util.Shell.<clinit>(Shell.java:364)
 at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:80)
 at org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1437)
 at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:67)
 at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:81)
 at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:96)
 at org.resilinc.app.App.main(App.java:25)

我是从运行在Windows上的eclipse运行的,我需要连接到在vbox上运行的hortonworks。

1 个答案:

答案 0 :(得分:1)

在Windows计算机中,从Internet下载winutil.exe并复制到文件夹中:

hadoop.home.dir = "copied folder of winutils"