我有一个Scala测试,该测试可以在Intellij中使用,但不能在使用命令行的终端中使用。代码+错误:
[error] ... object Configuration is not a member of package org.apache.hadoop.conf
[error] ... object FileSystem is not a member of package org.apache.hadoop.fs
[error] import org.apache.hadoop.fs.{FileSystem, FileUtil, Path}
[error] ^
[error] ... Class org.apache.hadoop.ha.ServiceFailedException not found - continuing with a stub.
[error] val hdfsCluster = new MiniDFSCluster.Builder(conf).build()
[error] ^
[error] ... not found: type Configuration
[error] val conf = new Configuration()
[error] ^
[error] ... not found: value FileUtil
[error] FileUtil.fullyDelete(baseDir)
[error] ^
[error] ... not found: value FileSystem
[error] val hdfs = FileSystem.get(conf);
[error] ^
[error] ... not found: value FileUtil
[error] FileUtil.fullyDelete(baseDir);
[error] ^
[error] ... not found: type Configuration
[error] val conf = new Configuration();
[error] ^
[error] ... not found: value FileUtil
Sbt依赖项:
"org.apache.hadoop" % "hadoop-hdfs" % "2.6.5" % Test classifier "tests",
"org.apache.hadoop" % "hadoop-common" % "2.6.5" % Test classifier "tests"