如果出现如下的错误
java.io.IOException: Could not locate executable null/bin/winutils.exe in theHadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:318)
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:333)
at org.apache.hadoop.util.Shell.(Shell.java:326)
at org.apache.hadoop.util.StringUtils.(StringUtils.java:76)
at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:93)
at org.apache.hadoop.security.Groups.(Groups.java:77)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:240)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:255)
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:232)
at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:718)
at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:703)
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:605)
at org.apache.hadoop.hbase.security.User$SecureHadoopUser.(User.java:262)
at org.apache.hadoop.hbase.security.User$SecureHadoopUser.(User.java:258)
at org.apache.hadoop.hbase.security.User.getCurrent(User.java:160)
at org.apache.hadoop.hbase.security.UserProvider.getCurrent(UserProvider.java:89)
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:330)
at com.tracker.common.db.simplehbase.connection.HbaseUtils.createHConnection(HbaseUtils.java:33)
at com.tracker.common.db.simplehbase.connection.HConnectionPool.initHConnectionPool(HConnectionPool.java:54)
at com.tracker.common.db.simplehbase.connection.HConnectionPool.initHConnectionPool(HConnectionPool.java:38)
at com.tracker.data.api.handler.TestWebStatsService.main(TestWebStatsService.java:44)
之类的错误,则需要添加 HADOOP_HOME的环境变量,具体如下:
如果还是连接Hadoop卡死,则配置C:/Windows/System32/drivers/etc/hosts文件,添加代理
10.100.2.92 dev-hadoop1
10.100.2.93 dev-hadoop2
10.100.2.94 dev-hadoop3
则可以顺利连接上Hadoop。
更多Hadoop相关信息见 Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13
本文永久更新链接地址 : http://www.linuxidc.com/Linux/2015-10/124413.htm