wordcount 无法运行,换电脑没问题~不知道问题出在哪?

问答 BabylonSun ⋅ 于 2020-06-30 23:17:27 ⋅ 最后回复由 BabylonSun 2020-07-01 10:27:02 ⋅ 172 阅读
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/dataspace/hn23_hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/maven_repositories/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
20/06/30 23:08:09 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
20/06/30 23:08:09 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
20/06/30 23:08:09 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
20/06/30 23:08:10 WARN mapreduce.JobResourceUploader: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
20/06/30 23:08:11 WARN mapreduce.JobResourceUploader: No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
20/06/30 23:08:11 INFO input.FileInputFormat: Total input paths to process : 3
20/06/30 23:08:11 INFO mapreduce.JobSubmitter: number of splits:3
20/06/30 23:08:11 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local1646025821_0001
20/06/30 23:08:11 INFO mapreduce.JobSubmitter: Cleaning up the staging area file:/tmp/hadoop-BabylonSun/mapred/staging/BabylonSun1646025821/.staging/job_local1646025821_0001
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:609)
    at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:977)
    at org.apache.hadoop.util.DiskChecker.checkAccessByFileMethods(DiskChecker.java:187)
    at org.apache.hadoop.util.DiskChecker.checkDirAccess(DiskChecker.java:174)
    at org.apache.hadoop.util.DiskChecker.checkDir(DiskChecker.java:108)
    at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:285)
    at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:344)
    at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:150)
    at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:131)
    at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:115)
    at org.apache.hadoop.mapred.LocalDistributedCacheManager.setup(LocalDistributedCacheManager.java:125)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:163)
    at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:731)
    at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)
    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Unknown Source)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
    at com.hnxy.mr.MyMR.main(MyMR.java:107)
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

eclipse出现io报错,百度查的就没解决问题,包括放hadoop.dll和更新环境变量等。
报错:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z

成为第一个点赞的人吧 :bowtie:
回复数量: 6
  • 青牛 国内首批大数据从业者,就职于金山,担任大数据团队核心研发工程师
    2020-06-30 23:19:14

    windows伪集群哪里没整对,也就是说winutil没装好。

  • 豆豆
    2020-06-30 23:33:05

    伪集群问题,刚好遇到同款问题答案献上
    一:拷贝hadoop.dll 到hadoop/bin/目录下
    二:C:\Windows\System32下缺少hadoop.dll,把这个文件拷贝到C:\Windows\System32下面即可

  • 苏牛
    2020-07-01 08:55:06

    由于系统权限问题导致eclipse无法正常运行程序 建议以管理员身份运行

  • BabylonSun
    2020-07-01 10:16:15

    @青牛 谢谢老师,问题暂时解决了:+1:

  • BabylonSun
    2020-07-01 10:17:05

    @豆豆 感谢,但早就复制到system32了~

  • BabylonSun
    2020-07-01 10:27:02

    @苏牛 心情复制啊老师,问题一出一堆,求明天面授:bow:

暂无评论~~
  • 请注意单词拼写,以及中英文排版,参考此页
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
  • 支持表情,可用Emoji的自动补全, 在输入的时候只需要 ":" 就可以自动提示了 :metal: :point_right: 表情列表 :star: :sparkles:
  • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif,教程
  • 发布框支持本地存储功能,会在内容变更时保存,「提交」按钮点击时清空
Ctrl+Enter