gpt4 book ai didi

java - 无法为您的平台加载 native-hadoop 库...未加载 Snappy native 库

转载 作者:行者123 更新时间:2023-12-02 22:09:16 25 4
gpt4 key购买 nike

当我通过 cygwin 在 hadoop 上运行此命令时:
$bin/hadoop jar hadoop-examples-*.jar grep input output 'dfs[a-z.]+'
我收到以下错误:

13/09/06 17:06:04 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13/09/06 17:06:04 WARN snappy.LoadSnappy: Snappy native library not loaded
13/09/06 17:06:05 INFO mapred.FileInputFormat: Total input paths to process : 18
13/09/06 17:06:05 INFO mapred.JobClient: Cleaning up the staging area hdfs://localhost:9000/tmp/hadoop-cyg_server/mapred/staging/cyg_server/.staging/job_201309061646_0003
13/09/06 17:06:05 ERROR security.UserGroupInformation: PriviledgedActionException as:cyg_server cause:java.io.IOException: Not a file: hdfs://localhost:9000/user/cyg_server/input/conf
java.io.IOException: Not a file: hdfs://localhost:9000/user/cyg_server/input/conf
at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:215)
at org.apache.hadoop.mapred.JobClient.writeOldSplits(JobClient.java:1081)
at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:1073)
at org.apache.hadoop.mapred.JobClient.access$700(JobClient.java:179)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:983)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:936)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:936)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:910)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1353)
at org.apache.hadoop.examples.Grep.run(Grep.java:69)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.examples.Grep.main(Grep.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

请告诉我“无法为您的平台加载 native-hadoop 库......未加载 Snappy native 库”的解决方案

最佳答案

http://hadoop.apache.org/docs/stable/native_libraries.html

“ native hadoop 库仅在 *nix 平台上受支持。该库不适用于 Cygwin 或 Mac OS X 平台。”

关于java - 无法为您的平台加载 native-hadoop 库...未加载 Snappy native 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18656983/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com