scala - 为什么命令行出现“不是包的成员”和“找不到类”错误,而不是 Intellij?
问题描述
我有一个 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"
解决方案
推荐阅读
- clojure - 在 Clojure 中将序列懒惰地划分为不同大小的块
- math - 在 GNU Scientific Library 多根查找器中选择起点
- php - 通过匹配 PHP 中的对象字段将对象值组合到单个数组中
- python - 如何在python的电子邮件正文中打印一个多行字符串变量
- google-cloud-platform - 如何在 GCloud App Engine Standard 上访问网站
- ansible - Ansible如何根据条件设置条件或变量
- webpack - 从 bundle.js 中删除 webpack 4 添加的代码
- c++ - 按下空间时如何获得更平滑的旋转
- php - php错误preg_match未知修饰符'2'
- tensorflow - 我需要将 tensorflow 1.x 上保存的权重上传到 tensroflow 2.x 中的相同模型