Java.io.IOException:Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

Source: Internet
Author: User
Tags file copy zookeeper

1: This problem is all played rotten, here I also record, convenient after the brain repair:

1 slf4j:class path contains multiple slf4j bindings.2Slf4j:found bindinginch[jar:file:/e:/360downloads/hadoop-2.4.1/share/hadoop/common/lib/slf4j-log4j12-1.7.5. Jar!/org/slf4j/impl/staticloggerbinder.class]3Slf4j:found bindinginch[jar:file:/e:/360downloads/hbase-0.99.2/lib/slf4j-log4j12-1.7.7. Jar!/org/slf4j/impl/staticloggerbinder.class]4Slf4j:see http://www.slf4j.org/codes.html#multiple_bindings for an explanation.5Slf4j:actual binding isof type [org.slf4j.impl.Log4jLoggerFactory]6  .- A- -  -: .: -,778WARN [main] util. Nativecodeloader (Nativecodeloader.java:<clinit> ( +)-Unable to load Native-hadoop library forYour platform ...usingBuiltin-java classeswhereapplicable7  .- A- -  -: .: -,786ERROR [main] util. Shell (Shell.java:getWinUtilsPath (336)-Failed to locate the winutils binaryinchThe Hadoop binary path8Java.io.IOException:Could not locate executableNULL\bin\winutils.exeinchThe Hadoop binaries.9At Org.apache.hadoop.util.Shell.getQualifiedBinPath (Shell.java:318)TenAt Org.apache.hadoop.util.Shell.getWinUtilsPath (Shell.java:333) OneAt Org.apache.hadoop.util.shell.<clinit> (Shell.java:326) AAt Org.apache.hadoop.util.stringutils.<clinit> (Stringutils.java: the) -At Org.apache.hadoop.security.Groups.parseStaticMapping (Groups.java: the) -At Org.apache.hadoop.security.groups.<init> (Groups.java: the) theAt Org.apache.hadoop.security.Groups.getUserToGroupsMappingService (Groups.java: -) -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.<init> (User.java: the) AAt Org.apache.hadoop.hbase.security.user$securehadoopuser.<init> (User.java:252) atAt Org.apache.hadoop.hbase.security.User.getCurrent (User.java:156) -At Org.apache.hadoop.hbase.security.UserProvider.getCurrent (Userprovider.java: the) -At Org.apache.hadoop.hbase.client.ConnectionFactory.createConnection (Connectionfactory.java:215) -At Org.apache.hadoop.hbase.client.ConnectionFactory.createConnection (Connectionfactory.java:119) -At Com.hbaseTest.HbaseTest.init (Hbasetest.java: $) - At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) inAt Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: $) -At Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) toAt Java.lang.reflect.Method.invoke (Method.java:606) +At org.junit.runners.model.frameworkmethod$1. Runreflectivecall (Frameworkmethod.java: -) -At Org.junit.Internal. Runners.model.ReflectiveCallable.run (Reflectivecallable.java: the) theAt org.junit.runners.model.FrameworkMethod.invokeExplosively (Frameworkmethod.java: A) *At Org.junit.Internal. Runners.statements.RunBefores.evaluate (Runbefores.java: -) $At Org.junit.Internal. Runners.statements.RunAfters.evaluate (Runafters.java: to)Panax NotoginsengAt Org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored (Blockjunit4classrunner.java: -) -At Org.junit.runners.BlockJUnit4ClassRunner.runChild (Blockjunit4classrunner.java: in) theAt Org.junit.runners.BlockJUnit4ClassRunner.runChild (Blockjunit4classrunner.java: the) +At org.junit.runners.parentrunner$3. Run (Parentrunner.java:193) AAt org.junit.runners.parentrunner$1. Schedule (Parentrunner.java: the) theAt Org.junit.runners.ParentRunner.runChildren (Parentrunner.java:191) +At org.junit.runners.parentrunner.access$ the(Parentrunner.java: the) -At org.junit.runners.parentrunner$2. Evaluate (Parentrunner.java:184) $At Org.junit.runners.ParentRunner.run (Parentrunner.java:236) $At ORG.ECLIPSE.JDT.Internal. Junit4.runner.JUnit4TestReference.run (Junit4testreference.java: the) -At ORG.ECLIPSE.JDT.Internal. Junit.runner.TestExecution.run (Testexecution.java: -) -At ORG.ECLIPSE.JDT.Internal. junit.runner.RemoteTestRunner.runTests (Remotetestrunner.java:459) theAt ORG.ECLIPSE.JDT.Internal. junit.runner.RemoteTestRunner.runTests (Remotetestrunner.java:675) -At ORG.ECLIPSE.JDT.Internal. Junit.runner.RemoteTestRunner.run (Remotetestrunner.java:382)WuyiAt ORG.ECLIPSE.JDT.Internal. Junit.runner.RemoteTestRunner.main (Remotetestrunner.java:192)

I am testing hbase for this problem when creating a data table, in short, window operation Hadoop will encounter this problem:

1 The first step: Configure the window's environment variables yourself (obviously it should be a hadoop_home problem.) If Hadoop_home is empty, it must be fullexename to Null\bin\winutils.exe. The workaround is simple, configure the environment variable,). 2 The second step: do not want to restart the computer can be added in the program:3System.setproperty ("Hadoop.home.dir","c:\\users\\administrator\\desktop\\hadoop-2.7.3\\hadoop-2.7.3");4 For example I added here:5 @Before6      Public voidinit () throws Exception {7System.setproperty ("Hadoop.home.dir","e:\\hadoop-2.6.4");8         //Configuration9Config =hbaseconfiguration.create ();Ten         //Zookeeper Address OneConfig.Set("Hbase.zookeeper.quorum","Master,slaver1,slaver2"); A         //Zookeeper Port -Config.Set("Hbase.zookeeper.property.clientPort","2181"); -         //Create a connection with Factory mode theConnection =connectionfactory.createconnection (config); -         //getting table connections via connection -Table = connection.gettable (Tablename.valueof ("User")); - } +Step three: Go to https://Github.com/srccodes/hadoop-common-2.2.0-bin/tree/master/bin -Download winutils.exe file copy to your E:\hadoop-2.6.4\ Bin directory inside.  + Fourth Step: Re-run the program is OK, problem solving. 

Stop more ...

Java.io.IOException:Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.