我正在尝试使用以下代码模拟hdfs但总是遇到此特定错误。
open
错误是以下
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)
}
我不确定错误,并说明错误的原因。