为什么我收到UnsatisfiedLinkError

时间:2018-07-19 14:45:18

标签: java apache-spark hadoop

我正在尝试运行Spark maven Scala project

mvn install未成功( java.lang.UnsatisfiedLinkError ):

   *** RUN ABORTED ***
  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.canWrite(FileUtil.java:996)
 at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyzeStorage(Storage.java:490)
 at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:321)
 at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:215)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:976)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:681)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:584)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:643)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:810)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:794)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1487)

由于设置了Hadoop路径并包含 winutils.exe ,所以我不了解错误的原因,并且我已经成功运行了另一个java-spark项目?

1 个答案:

答案 0 :(得分:0)

我刚刚在hadoop路径中添加了 hadoop.dll ,错误消失了。