hadoop概念

ibrsph3r  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(350)

我正在使用hadoop来处理一个使用hvpi的视频,hvpi是一个开源接口。然而inputspilt的实现,更确切地说是在 isSplitableobContext (context, Path file) 方法返回 false . 默认情况下,此方法返回 true 但在当前的实现中,返回一个 false . 如果此方法返回 false 我将只有一个Map任务。如果我没记错的话,hadoop会为每个输入split分配一个容器,该容器对应于执行map任务的网络中某个节点的计算资源,这个节点最好包含将要处理的数据。如果我有 false 我将只有一个输入分割,因此只有一个map任务,而这个map任务将只在集群节点上运行。  最大的问题是,only map任务如何利用集群的所有cpu资源,而不仅仅是单个节点上的单个容器?

xwbd5t1u

xwbd5t1u1#

请通过:
http://bytepadding.com/big-data/map-reduce/understanding-map-reduce-the-missing-guide/

Lets try to understand what is the problem . 
1. One takes a file and divides it into fileSplits. 
2. Each split is consumed by one mapper. 
3. How do you make sure a record in the file is not split across two file splits. 
4. A record cant be ignored nor read partially. 
5. A InputFormat takes care of carefully splitting the file and handling situations when a record is split at the boundary of file splits. 
6. Hadoop has varios inpuit formats like TextInputFormat, KeyValueTextInputFormat

试着找到一个输入格式,可以用于您的视频文件或自己写一个。fileinputformat是所有文件的基类。

相关问题