Prepare Hadoop Streaming Hadoop streaming allows you to create and run Map/Reduce jobs with any executable or script as the mapper and/or the reducer....
分类:
其他好文 时间:
2014-08-05 13:47:29
阅读次数:
426
看了下MapReduce的例子。再看了下Mapper和Reducer源码,理清了参数的意义,就o了。public class Mapperpublic class Reducer Map是打散过程,把输入的数据,拆分成若干的键值对。Reduce是重组的,根据前面的键值对,重组数据。 自己写M...
分类:
其他好文 时间:
2014-08-01 15:34:21
阅读次数:
205
centos启动时,提示错误: 1 /dev/mapper/VolGroup-lv_root contains a file system with errors,check forced. 2 /dev/mapper/VolGroup-lv_root: 3 Inodes that were par...
分类:
其他好文 时间:
2014-07-31 23:29:00
阅读次数:
3182
调整硬盘分区大小 ========== 想增加root空间,减少home空间。 ##1.查看硬盘使用情况。 [root@npm ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 48G 45G 17M 100% / tmp...
分类:
其他好文 时间:
2014-07-31 13:42:36
阅读次数:
248
mapreduce中我们自定义的mapper和reducer程序在执行后有可能遇上出错退出的情况,mapreduce中jobtracker会全程追踪任务的执行情况,对于出错的任务mapreduce也定义了一套自己的处理方式。...
分类:
其他好文 时间:
2014-07-30 12:21:22
阅读次数:
209
所需环境:Hadoop相关jar包(下载官网发行版即可);下载junit包(最新为好);下载mockito包;下载mrunit包;下载powermock-mockito包;相关包截图如下:应用场景:在进行Hadoop的一般MR编程时,需要验证我们的业务逻辑,或者说是验证数据流的时候可以使用此环境,这个环境不要求真实的云平台,只是针对算法或者代码逻辑进行验证,方便调试代码。实例:Mapper:pac...
分类:
其他好文 时间:
2014-07-29 15:15:00
阅读次数:
373
首先要推荐一下:http://www.alidata.org/archives/1470阿里的大牛在上面的文章中比较详细的介绍了shuffle过程中mapper和reduce的每个过程,强烈推荐先读一下。不过,上文没有写明一些实现的细节,比如:spill的过程,mapper生成文件的 partiti...
分类:
其他好文 时间:
2014-07-29 13:43:18
阅读次数:
298
// 清除thin pool
1.1 func (d *Driver) Cleanup() error {
// 停止thin pool
err := d.DeviceSet.Shutdown()
return err
}
// 当加载新镜像时,添加一个新thin device
// id为containerid或imageid
1.2 func (d *Driver) Create(i...
分类:
移动开发 时间:
2014-07-26 02:59:46
阅读次数:
302
// 在thin pool中创建一个新thin device
// 调用路径:driver.Create()
1.1 func (devices *DeviceSet) AddDevice(hash, baseHash string) error {
//查找父device
baseInfo, err := devices.lookupDevice(baseHash)
if err != n...
分类:
移动开发 时间:
2014-07-26 02:53:26
阅读次数:
347
// 创建thin pool
// 调用路径:NewDeviceSet->initDevmapper->createPool
1.1 func createPool(poolName string, dataFile, metadataFile *os.File, poolBlockSize uint32) error {
//通过task封装与libdevmapper的交互
task, er...
分类:
移动开发 时间:
2014-07-26 02:45:06
阅读次数:
297