报错org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit
报错
java.lang.Exception: java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit
at InvertedIndex$Map.map(InvertedIndex.java:34)
at InvertedIndex$Map.map(InvertedIndex.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-03-15 22:10:51,418 INFO [org.apache.hadoop.mapreduce.Job] - Job job_local1575636680_0001 running in uber mode : false
2017-03-15 22:10:51,419 INFO [org.apache.hadoop.mapreduce.Job] - map 0% reduce 0%
2017-03-15 22:10:51,421 INFO [org.apache.hadoop.mapreduce.Job] - Job job_local1575636680_0001 failed with state FAILED due to: NA
2017-03-15 22:10:51,427 INFO [org.apache.hadoop.mapreduce.Job] - Counters: 0
import java.io.IOException;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapred.FileSplit;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
将颜色部分改为 import org.apache.hadoop.mapreduce.lib.input.FileSplit;
报错org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit的更多相关文章
- wordcount报错:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: In ...
- org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/input
原我是这样写的 //输入数据所在的文件目录 FileInputFormat.addInputPath(job, new Path("/input/")); //mapreduce执 ...
- SpringBoot整合Swagger2案例,以及报错:java.lang.NumberFormatException: For input string: ""原因和解决办法
原文链接:https://blog.csdn.net/weixin_43724369/article/details/89341949 SpringBoot整合Swagger2案例 先说SpringB ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- Spark报错java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
Spark 读取 JSON 文件时运行报错 java.io.IOException: Could not locate executable null\bin\winutils.exe in the ...
- 报错:java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.xxx.entity.PersonEntity
报错:java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.xxx.entity.PersonEntity 代 ...
- react-native create-react-app创建项目报错SyntaxError: Unexpected end of JSON input while parsing near '...ttachment":false,"tar' npm代理
SyntaxError: Unexpected end of JSON input while parsing near '...ttachment":false,"tar' 错误 ...
- create-react-app创建项目报错SyntaxError: Unexpected end of JSON input while parsing near '...ttachment":false,"tar' npm代理
SyntaxError: Unexpected end of JSON input while parsing near '...ttachment":false,"tar' 错误 ...
- 日常报错记录2: MyBatis:DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.------------ Cause: java.lang.NoSuchMethodException: com.offcn.dao.ShopDao.<init>()
直接上干货: 报错归纳1: DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4 ...
随机推荐
- 10 Tensorflow模型保存与读取
我们的模型训练出来想给别人用,或者是我今天训练不完,明天想接着训练,怎么办?这就需要模型的保存与读取.看代码: import tensorflow as tf import numpy as np i ...
- 在Mac下连接阿里云服务器
1.登录 ssh root@IP地址 eg:00.00.00.00 2.新建用户 useradd -d /home/用户名 -m 根目录名 (这条命令,就是创建一个新用户,并给该用户在home目录下创 ...
- web进修之—Hibernate 类型(4)
本片包含Hibernate的两种类型的简单介绍和集合类型的映射. Hibernate中的两种类型: Entity 自己掌控自己的生命周期,比如Person有addrss属性(关联到另外一张表).age ...
- PHP中的__call和__callStatic方法
如何防止调用不存在的方法而出错,使用__call魔术重载方法. __call方法原型如下: mixed __call(string $name,array $arguments) 当调用一个不可访问的 ...
- python属性管理(1):基础
管理属性的几种方式 在python中访问.设置.删除对象属性的时候,有以下几种方式: 使用内置函数getattr().setattr()和delattr() 自己编写getter().setter() ...
- VRF在区块链中的应用
最近区块链领域流行了一种"怪病",许多区块链项目或者设计方案都加入了一个叫做VRFs的算法.那么, (1) 什么是VRFs? (2) VRFs在区块链中解决了什么问题? 本文旨在介 ...
- JDK源码分析(一)—— String
dir 参考文档 JDK源码分析(1)之 String 相关
- ASP.NET MVC3 在_ViewStart设置Layout使用RenderAction的注意事項
来源:https://dotblogs.com.tw/lastsecret/archive/2012/03/26/71052.aspx ASP.NET MVC3 在_ViewStart設定Layout ...
- [android] android下文件访问的权限
/**************2016年5月4日 更新**************************/ 知乎:android编程中写文件(例如a.txt)后存在手机哪个位置啊? 用FileOut ...
- [android] 安卓进程优先级&为什么使用服务
应用程序:一组组件(activity service provider receiver)的集合 一般情况下,一个应用程序对应一个进程 一般情况下,关闭掉应用,关闭掉所有界面,应用程序的进程还在后台运 ...