hadoop InputSplit
/**
* <code>InputSplit</code> represents the data to be processed by an
* individual {@link Mapper}.
* InputSplit 代表可以被Mapper处理的数据
* <p>Typically, it presents a byte-oriented view on the input and is the
* responsibility of {@link RecordReader} of the job to process this and present
* a record-oriented view.
*
* @see InputFormat
* @see RecordReader
*/
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class InputSplit {
/**
* Get the size of the split, so that the input splits can be sorted by size.
* @return the number of bytes in the split
* @throws IOException
* @throws InterruptedException
* split的长度用byte表示
*/
public abstract long getLength() throws IOException, InterruptedException; /**
* Get the list of nodes by name where the data for the split would be local.
* The locations do not need to be serialized.
* 获取split所在的节点
* @return a new array of the node nodes.
* @throws IOException
* @throws InterruptedException
*/
public abstract
String[] getLocations() throws IOException, InterruptedException; /**
* Gets info about which nodes the input split is stored on and how it is
* stored at each location.
* 返回split所在的节点信息以及在该节点上如何存储 memory
* @return list of <code>SplitLocationInfo</code>s describing how the split
* data is stored at each location. A null value indicates that all the
* locations have the data stored on disk.
* @throws IOException
*/
@Evolving
public SplitLocationInfo[] getLocationInfo() throws IOException {
return null;
}
}
hadoop InputSplit的更多相关文章
- es第十篇:Elasticsearch for Apache Hadoop
es for apache hadoop(elasticsearch-hadoop.jar)允许hadoop作业(mapreduce.hive.pig.cascading.spark)与es交互. A ...
- 工作采坑札记:4. Hadoop获取InputSplit文件信息
1. 场景 基于客户的数据处理需求,客户分发诸多小数据文件,文件每行代表一条记录信息,且每个文件以"类型_yyyyMMdd_批次号"命名.由于同一条记录可能存在于多个文件中,且处于 ...
- Hadoop源码分析之产生InputSplit文件过程
用户提交 MapReduce 作业后,JobClient 会调用 InputFormat 的 getSplit方法 生成 InputSplit 的信息. 一个 MapReduce 任务 ...
- Hadoop MapReduce执行过程详解(带hadoop例子)
https://my.oschina.net/itblog/blog/275294 摘要: 本文通过一个例子,详细介绍Hadoop 的 MapReduce过程. 分析MapReduce执行过程 Map ...
- Hadoop学习笔记—10.Shuffle过程那点事儿
一.回顾Reduce阶段三大步骤 在第四篇博文<初识MapReduce>中,我们认识了MapReduce的八大步骤,其中在Reduce阶段总共三个步骤,如下图所示: 其中,Step2.1就 ...
- hadoop分片分析
上一篇分析了split的生成,现在接着来说具体的split具体内容及其相关的文件和类.以FileSplit(mapred包下org/apache/hadoop/mapreduce/lib/input/ ...
- hadoop输入分片计算(Map Task个数的确定)
作业从JobClient端的submitJobInternal()方法提交作业的同时,调用InputFormat接口的getSplits()方法来创建split.默认是使用InputFormat的子类 ...
- hadoop运行原理之Job运行(五) 任务调度
接着上篇来说.hadoop首先调度辅助型task(job-cleanup task.task-cleanup task和job-setup task),这是由JobTracker来完成的:但对于计算型 ...
- Hadoop的数据输入的源码解析
我们知道,任何一个工程项目,最重要的是三个部分:输入,中间处理,输出.今天我们来深入的了解一下我们熟知的Hadoop系统中,输入是如何输入的? 在hadoop中,输入数据都是通过对应的InputFor ...
随机推荐
- javaScript中的this关键字解析
this是JavaScript中的关键字之一,在编写程序的时候经常会用到,正确的理解和使用关键字this尤为重要.接下来,笔者就从作用域的角度粗谈下自己对this关键字的理解,希望能给到大家一些启示, ...
- 计算n阶行列式的模板
之前在学习计数问题的时候也在网上找了很多关于行列式的资料 但是发现很多地方都只介绍2\3阶的情况 一些论文介绍的方法又看不懂 然后就一直耽搁着 今天恰好出到这样的题目 发现标算的代码简介明了 还挺开心 ...
- 【洛谷 P1896】[SCOI2005]互不侵犯(状压dp)
题目链接 题意:在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案.国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子. 这是道状压\(DP\)好题啊.. ...
- CF 200 div.1 A
2013-10-11 16:45 Rational Resistance time limit per test 1 second memory limit per test 256 megabyte ...
- Splunk笔记
学习Splunk Fundamentals Part 2 (IOD) 和 Splunk Fundamentals Part 1课程的笔记. Chart Over By Tips: ….|chart c ...
- python2.7字典转换成json时中文字符串变成unicode的问题:
参考:http://blog.csdn.net/u014431852/article/details/53058951 编码问题: python2.7字典转换成json时中文字符串变成unicode的 ...
- Linux 的源码安装工具 CheckInstall
Linux 的源码安装工具 CheckInstall Checkinstall 是一个能从 tar.gz 类的 https://www.ibm.com/developerworks/cn/linux/ ...
- 冒泡排序的思想 python 冒泡排序、递归排序
冒泡排序的时间复杂度是O(N^2) 冒泡排序的思想: 每次比较两个相邻的元素, 如果他们的顺序错误就把他们交换位置 比如有五个数: 12, 35, 99, 18, 76, 从大到小排序, 对相邻的两位 ...
- git error: unable to write file xxx,git fatal: unable to write new index file
执行git checkout -- . error: unable to write file mobile/manifest.jsonfatal: unable to write new index ...
- Pyhton-Requests之接口测试
非常感谢[百人计划]五娃的分享!下面是整理的笔记: 一.环境准备: Pyhton 2.x或者Pyhton 3.x.Requests库.(我安装的版本是Pyhton 3.4) 安装 Pyhton 3.x ...