线程“main”中的异常 java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41851066/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
提问by sukumar konduru
trying to run MR program version(2.7) in windows 7 64 bit in eclipse while running the above exception occurring . I verified that using 64 bit 1.8 java version and observed that all the hadoop daemons are running.
尝试在 Eclipse 中的 Windows 7 64 位中运行 MR 程序版本(2.7),同时运行上述异常。我验证了使用 64 位 1.8 java 版本并观察到所有 hadoop 守护进程都在运行。
Any suggestions highly appreciated
任何建议高度赞赏
回答by Julio D
This issue occurred to me and the cause was I forgot to append %HADOOP_HOME%/bin
to PATH
in my environment variables.
这个问题发生在我身上,原因是我忘记附加%HADOOP_HOME%/bin
到PATH
我的环境变量中。
回答by Ben Watson
I already had %HADOOP_HOME%/bin
in my PATH
and my code had previously run without errors. Restarting my machine made it work again.
我已经%HADOOP_HOME%/bin
在我的PATH
并且我的代码之前运行过没有错误。重新启动我的机器使它再次工作。
回答by hemanth
In Intellij under Run/Debug Configurations, open the application you are trying to run, Under configurations tab, specify the exact working Directory.having the variable to represent the working directory also creates this problem. When I changed the Working Directory under configurations, it started working again.
在运行/调试配置下的 Intellij 中,打开您尝试运行的应用程序,在配置选项卡下,指定确切的工作目录。使用变量来表示工作目录也会产生此问题。当我在配置下更改工作目录时,它又开始工作了。
回答by Thirupathi Chavati
In addition to other solutions, Please download winutil.exeand hadoop.dlland add to $HADOOP_HOME/bin. It works for me.
除了其他解决方案,请下载winutil.exe和hadoop.dll并添加到 $HADOOP_HOME/bin。这个对我有用。
https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1/bin
https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1/bin
回答by Aman Tandon
For me this issue was resolved by downloading the winutils.exe & hadoop.dll from https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1/binand putting those in hadoop/bin folder
对我来说,这个问题是通过从https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1/bin下载 winutils.exe 和 hadoop.dll 并将它们放在 hadoop/bin 文件夹中解决的
回答by ravi
Yes this issues arose when I was using the PIGUNITS
for automation of PIGSCRIPTS
. Two things in sequence need to be done:
是的,这问题我用的时候出现PIGUNITS
了自动化PIGSCRIPTS
。需要依次做两件事:
Copy both the files as mentioned about in a location and add it to the environment variables under PATH.
To reflect the change what you have just done, you have to restart your machine to load the file.
将提到的两个文件复制到一个位置,并将其添加到 PATH 下的环境变量中。
为了反映您刚刚所做的更改,您必须重新启动机器以加载文件。
Under JUNIT I was getting this error which would help others as well:
在 JUNIT 下,我收到了这个错误,这对其他人也有帮助:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias XXXXX. Backend error : java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING at org.apache.pig.PigServer.openIterator(PigServer.java:925)
org.apache.pig.impl.logicalLayer.FrontendException:错误 1066:无法打开别名 XXXXX 的迭代器。后端错误:java.lang.IllegalStateException:在 org.apache.pig.PigServer.openIterator(PigServer.java:925) 处处于 DEFINE 而不是 RUNNING 状态的作业
回答by JasonWayne
After putting haddop.dll
and winutils
in hadoop/bin
folder and adding the folder of hadoop to PATH
, we also need to put hadoop.dll
into the C:\Windows\System32
folder
投入后haddop.dll
并winutils
在hadoop/bin
文件夹并添加的Hadoop的文件夹中PATH
,我们还需要投入hadoop.dll
到C:\Windows\System32
文件夹