Windows 机器上的 HDFS MiniCluster 错误

lon*_*tar 5 testing hadoop scala hdfs apache-spark

我尝试使用以下代码模拟 hdfs,但总是收到此特定错误。

test("some test") {

  val testDataPath = new File(PathUtils.getTestDir(getClass()), "miniclusters")

  //Configuration conf;

  //MiniDFSCluster cluster;

  //testDataPath = new File(PathUtils.getTestDir(getClass()), miniclusters");

  System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA)
  val confMini = new HdfsConfiguration()

  val testDataCluster1 = new File(testDataPath, "CLUSTER_1")
  println(testDataCluster1)

  val c1Path = testDataCluster1.getAbsolutePath()
  println(c1Path)
  confMini.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, c1Path)

  val cluster = new MiniDFSCluster.Builder(confMini).build()


  val fs = FileSystem.get(confMini);

  println(fs)

  assert(true)
}
Run Code Online (Sandbox Code Playgroud)

错误如下

An exception or error caused a run to abort: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z 
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)
Run Code Online (Sandbox Code Playgroud)

我不确定该错误以及错误的原因是什么。