MapReduce之问题
来源:互联网 发布:开源网络监控工具 编辑:程序博客网 时间:2024/06/04 19:49
13/03/18 15:26:20 INFO mapred.LocalJobRunner: hdfs://192.168.18.167:9000/vas/result/output/tms_DH0014-r-00000:0+191
13/03/18 15:26:20 INFO mapred.Task: Task 'attempt_local_0001_m_000004_0' done.
13/03/18 15:26:20 INFO mapred.Task: Using ResourceCalculatorPlugin : null
13/03/18 15:26:20 INFO mapred.MapTask: numReduceTasks: 1
13/03/18 15:26:20 INFO mapred.MapTask: io.sort.mb = 100
13/03/18 15:26:20 INFO mapred.MapTask: data buffer = 79691776/99614720
13/03/18 15:26:20 INFO mapred.MapTask: record buffer = 262144/327680
13/03/18 15:26:20 INFO mapred.MapTask: Starting flush of map output
13/03/18 15:26:20 INFO mapred.MapTask: Finished spill 0
13/03/18 15:26:20 INFO mapred.Task: Task:attempt_local_0001_m_000005_0 is done. And is in the process of commiting
13/03/18 15:26:20 INFO mapred.LocalJobRunner: hdfs://192.168.18.167:9000/vas/result/output/tms_CA0014-r-00000:0+21
13/03/18 15:26:20 INFO mapred.Task: Task 'attempt_local_0001_m_000005_0' done.
13/03/18 15:26:20 INFO mapred.Task: Using ResourceCalculatorPlugin : null
13/03/18 15:26:20 INFO mapred.LocalJobRunner:
13/03/18 15:26:20 INFO mapred.Merger: Merging 6 sorted segments
13/03/18 15:26:20 INFO mapred.Merger: Down to the last merge-pass, with 6 segments left of total size: 1140458 bytes
13/03/18 15:26:20 INFO mapred.LocalJobRunner:
13/03/18 15:26:26 INFO mapred.LocalJobRunner: reduce > reduce
13/03/18 15:26:26 INFO mapred.JobClient: map 100% reduce 67%
执行到这个地方不动了,请问什么原因?
public void map(LongWritable key, Text value,
OutputCollector<Text, Text> output, Reporter reporter)
throws IOException {
// 将输入的纯文本文件的数据转化成String
String line = value.toString();
StringTokenizer tokenizerLine = new StringTokenizer(line, ",");
tokenizerLine.nextToken();
String timeStr = tokenizerLine.nextToken().trim(); // 交易时间部分
String transTypeStr = tokenizerLine.nextToken().trim();// 交易类型部分
String timeString = timeStr.substring(0, 2) + timeStr.substring(3, 5);
int transTime = Integer.parseInt(timeString);
Text transType = new Text(transTypeStr);
for (int t = 0000; t <= 2400; t = t + TIME_SPACE) {
Text time = new Text(t+"");
if (transTime >= t && transTime <= t + TIME_SPACE) {
// 输出交易时间和交易类型
output.collect(time, transType);
continue;
}
String s = t + "";
if (t != 0 && s.substring(s.length()-2).equals("50")) {
t += 40;
}
}
static class TmReducer extends MapReduceBase implements
Reducer<Text, Text, Text, IntWritable> {
public void reduce(Text key, Iterator<Text> values,
OutputCollector<Text, IntWritable> output,
Reporter reporter) throws IOException {
int count = 0;
while(values.hasNext()){
count ++;
}
output.collect(key, new IntWritable(count));
}
}
问题解决了:
while(values.hasNext()){
count ++;
}
自己写了一个死循环,真2.......
- MapReduce之问题
- hadoop之MapReduce编程的权限问题
- Hadoop问题之mapreduce运行时异常
- Hadoop之Mapreduce------>Mapreduce原理
- MapReduce之求一组数据中最大值问题
- mapreduce全局变量的问题
- mapreduce问题一
- mapreduce的问题
- MapReduce TopN问题
- Google利器之MapReduce
- hadoop之mapreduce
- Hadoop之MapReduce
- MapReduce之Join实现
- MapReduce之输入输出类型
- Hadoop 之 mapreduce
- MapReduce学习之二
- google三宝之MapReduce
- MapReduce之Join操作
- Ril分析一 rild进程
- 斐波那契数列的两种实现形式
- vs2010中使用slqite及出现的问题
- java 多线程实现任务分发
- spring 项目中集成 Protocol Buffers 示例
- MapReduce之问题
- 正则表达式验证URL
- CvRNG基本随机数
- mysql中文件排序中单双路排序
- Android使用xutils图片上传和服务器接收
- python 分析网页链接 连通性
- Android学习之 基础(一)
- 最基本的单向链表操作 C语言
- Android之AlarmManager-用于定时请求服务器