问题标签 [hadoop-partitioning]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
226 浏览

hadoop - 在 hadoop -1.2.1 中运行 hadoop 管道时出现问题

在像上面这样几次失败尝试后,它终止:

注意:我已经在我的电脑上安装了 libssl.so ......但它仍然抛出错误......

我需要在哪里更改配置文件才能使其正常工作?

有人能帮助我吗?

0 投票
2 回答
1437 浏览

python - Input split for Map function in Hadoop

This is my first implementation in Hadoop. I am trying to implement my algorithm for probabilistic dataset in Map Reduce. In my dataset, last column will have some id(number of unique id's in the dataset is equal to the number of nodes in my cluster). I have to divide my dataset based on this column value and each set of records should be processed by each nodes in my cluster.

For example, if i have three nodes in my cluster, for the below dataset, one node should process all the records with id=1, another one with id=2, another one with id=3

My map function should take each split as an input and process it in parallel in each node.

I am just trying to understand, which approach is possible to do in Hadoop. Either to input this dataset as a input for my map function and pass an additional argument with map to split the data based on id value. Or split the data beforehand to "n"(number of nodes) subsets and load it in to the nodes, if this is the correct approach, how it is possible to split the data based on value and load in different nodes. Because, what i understood from my readings is that hadoop split the data in to blocks based on the specified size. How can we specify a particular condition while loading. Just to add up, I am writing my program in python.

Someone please advise. Thanks

0 投票
1 回答
202 浏览

c++ - Hadoop mapreduce 使用 2 个 mapper 和 1 个 reducer 使用 c++

按照此链接上的说明,我使用单个映射器和单个化简器在 C++ 中实现了一个字数统计程序。现在我需要使用两个映射器和一个减速器来解决同样的问题。

有人可以在这方面帮助我吗?

0 投票
0 回答
59 浏览

hadoop - 我们可以为单个任务读取 Hadoop 中的内置计数器吗

  1. 我们能否以周期性的方式(比如每 500 毫秒或 1 秒)读取 Hadoop 中的内置计数器以用于单个任务并记录在文件中。如果我们能做到这一点,那么如何做到这一点?

  2. 如何获取单个任务 pid?

0 投票
1 回答
92 浏览

hadoop - 启动减少任务和减少函数调用次数之间的区别?

我刚刚开始学习 hadoop,并使用自定义分区器和比较器运行 hadoop map-reduce 程序(首先在单节点环境中尝试,稍后将在集群上部署),奇怪的行为(因为我不知道实际发生了什么)我观察到的是,根据我的分区器和比较器,调用了五次 reduce 方法,因为我也从日志中对其进行了检查。但是在控制台上,启动的 reduce 任务的计数仍然是“1”。我非常怀疑这五个函数调用是否并行运行?如果不是,那么我将如何为这些reduce函数调用实现分布式计算的优势,因为这些reduce函数调用收集的数据将很大。请澄清一下,我缺少什么概念?

0 投票
1 回答
812 浏览

java - 复合键发生变化,Hadoop Map-Reduce?

我刚刚开始学习 hadoop,并使用自定义分区器和比较器运行 hadoop map-reduce 程序。我面临的问题是主要和次要排序没有在复合键上完成,而且在一个复合键的部分正在与其他 compsite-key 部分一起改变。

例如,我在映射器中创建以下键

和partitioner和combiner如下

在 reducer 中,这些键根据标签正确分组,但未正确排序。reducer中key的顺序和内容如下:

尝试了很长时间来解决它,但还没有成功,有什么帮助吗?

0 投票
0 回答
768 浏览

hadoop - reducer 总是失败,map 成功

我在 1GB 的文本文件上运行简单的 wordcount 作业。我的集群有 8 个 Datanode 和 1 个 namenode,每个都有 3GB 的存储容量。

当我运行 wordcount 时,我可以看到 map 总是成功,而 reducer 抛出错误并失败。请在下面找到错误消息。

你能告诉我如何解决这个问题吗?

谢谢纳瓦兹

0 投票
1 回答
1099 浏览

hadoop - Hadoop Datanode 配置核心和 RAM

我正在使用具有 9 个节点的 Hadoop 集群。我想知道 Hadoop 集群中的基本数据节点配置是什么。

我在 Namenode 和 Datanode 上使用以下配置。

运行示例排序和字数统计作业以检查 hadoop 网络性能。

我选择的配置是否正确?

感谢和问候,

阿卜杜勒·纳瓦兹

0 投票
1 回答
340 浏览

sorting - hadoop 分区程序不工作

那是我的分区代码,密钥格式为:

"str1||str2" ,我想将所有具有相同值的键发送str1到同一个减速器。

我的 GroupComparator 和 KeyComparator 如下:

我目前收到的错误是:

但据我所知,我已经覆盖了 getPartition() 方法,这是 Partitioner 接口中唯一的方法?任何帮助确定我做错了什么以及如何解决它都将不胜感激。

提前致谢!

0 投票
1 回答
394 浏览

hadoop - 自定义分区器将单个键发送到多个减速器?

如果我只有一把钥匙。我可以避免将其仅发送到一个减速器(并将其分配到多个减速器)吗?

我知道那我可能需要第二个 map reduce 程序来组合 reducer 输出?这是一个好方法吗?或者请告诉我是否有更好的方法?