首页> 开发问题 >其它问题 其它问题
Mapreduce报错:java.lang.ClassNotFoundException: Class Mapper not found
作者:小萝卜 2019-12-11 【 其它 】 浏览 2114
简介Mapreduce报错:java.lang.ClassNotFoundException: Class Mapper not found
mapreduce找不到mapper类
解决方法:
开始自己用的是mapreduce自己打包的一种方法:
job.setJarByClass(StandardJob.class);
但这样一直在报错:找不到打包的jar
WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
上网查这个错误时,网上的大多数方法都是在教使用setJar,自己打包以后运行,但这样无论是加入绝对路径还是相对路径都报错找不到jar包,而且也一直不知道相对路径应该放在哪里。
之后学长告诉:(放在conf的定义下面)
conf.set("mapreduce.job.jar", "C:/Users/xym48/Desktop/preprocess.jar");
问题解决。
很赞哦! (0)
相关文章
- scp 文件 : /目录: Permission denied
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- 解决:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile
- Python运行语法错误:IndentationError: unindent does not match any outer indentation level
- 无法定位程序输入点到xxx.dll
- clion ctrl+鼠标左键不能调到函数实现
- GitHub 上传文件过大报错:remote: error: GH001: Large files detected.
- ImportError: cannot import name 'BaseDataset' from 'src.dataset'
- Python“Non-ASCII character 'xe5' in file”报错问题
- TypeError: 'newline' is an invalid keyword argument for this function 错误解决