总结之前工作中遇到的一个问题。
背景:
运维用scribe从apache服务器推送过来的日志有重复记录,所以这边的ETL处理要去重,还有个需求是要按业务类型多目录输出,方便挂分区,后面的使用。
这两个需求单独处理都没有问题,但要在一个mapreduce里完成,需要一点技巧。
1、map输入数据,经过一系列处理,输出时:
if(ttype.equals("other"))...
分类:
其他好文 时间:
2014-07-11 00:20:13
阅读次数:
226
/**
* 功能:使用标准库:文本查询程序
* 时间:2014年7月10日09:10:15
* 作者:cutter_point
*/
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using line_no=vector::size_type;
/**...
分类:
编程语言 时间:
2014-07-11 00:16:17
阅读次数:
305
在执行MR将HDFS转换为HFile的时候,出现了如下异常:
14/07/09 18:02:59 INFO mapred.JobClient: map 83% reduce 0%
14/07/09 18:02:59 INFO mapred.JobClient: Task Id : attempt_201401091245_59030413_m_000001_0, Status : FAILE...
分类:
其他好文 时间:
2014-07-10 23:32:44
阅读次数:
323
最近研究了一个开源工具包org.codehaus.groovy,处理VO对象和XML文件的映射方便。简言之:将VO对象中的属性(包括Collection, Map),通过groovy模板文件,映射XML文件。...
分类:
其他好文 时间:
2014-07-10 22:48:20
阅读次数:
391
javabean转map类型 实体类转map类型...
分类:
编程语言 时间:
2014-07-10 22:20:34
阅读次数:
346
题意:求最大的三角形
思路:先初始化从左到右和从右到左的最大连续的‘-’,然后就是当奇数列的时候找头向下的三角形,偶数的时候相反找
#include
#include
#include
#include
using namespace std;
const int MAXN = 200;
char map[MAXN][MAXN];
int Left[MAXN][MAXN], Rig...
分类:
其他好文 时间:
2014-07-10 22:09:52
阅读次数:
272
1 package cn.itcast.shopping; 2 3 import java.io.IOException; 4 import java.io.PrintWriter; 5 import java.util.Map; 6 7 import javax.servlet.Servle...
分类:
其他好文 时间:
2014-07-10 17:08:45
阅读次数:
243
Map Reduce – the Free Lunch is not over?
分类:
其他好文 时间:
2014-07-10 15:43:59
阅读次数:
147
Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo...
分类:
移动开发 时间:
2014-07-10 15:00:57
阅读次数:
267