问题标签 [hadoop2]

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 回答
106 浏览

hadoop - 我们能否从 Hue 获得与“hadoop fsck”相同的指标?

有没有办法从 Hue 获取给定文件的以下详细信息?我主要需要给定文件的总块数和复制因子

0 投票
0 回答
148 浏览

java - File from a hadoop distributed cache is presented as directory

When using the DistributedCache in Hadoop, I manage to push the files from hdfs in the driver class like this:

Then, to read the file, in the setup() of Mapper I do:

The file is located in the cache, under a path /tmp/solr-map-reduce/yarn-local-dirs/usercache/user/appcache/application_1398146231614_0045/container_1398146231614_0045_01_000004/file.txt. But when I read it, I get IOException: file is a directory.

How can one go about solving this?

0 投票
3 回答
1245 浏览

hadoop - Write to a single file from multiple reducers in hadoop

I am trying to run Kmeans using Hadoop. I want to save the centroids of the clusters calculated in the cleanup method of the Reducer to some file say centroids.txt. Now, I would like to know what will happen if multiple reducers' cleanup method starts at the same time and all of them try to write to this file simultaneously. Will it be handled internally? If not is there a way to synchronize this task?

Note that this is not my output file of reducer. It is an additional file that I am maintaining to keep track of the centroids. I am using BufferedWriter from the reducer's cleanup method to do this.

0 投票
1 回答
34 浏览

hadoop - Hadoop 2.0 调度程序是否仅适用于多用户场景?

公平和容量调度程序是否仅在多个用户提交不同作业时才起作用?或者他们也在处理一位用户提交的工作?

谢谢

0 投票
0 回答
144 浏览

hadoop-yarn - 在 YARN 中归档 localResource :自定义位置

我想将一个 zip 文件部署为yarn. 因此我做了:

如果我的文件名为"abc.zip",Yarn 会将所有 zip 内容解压缩到一个名为 的文件夹"abc"中,而不是当前工作目录中。例如,它创建如下内容:

我可以自定义此行为吗?如何Yarn在当前工作目录中解压缩文件,而不是创建新目录?

用例是:如果我的应用程序有一些脚本,将所有脚本部署到当前目录会很有用,而不必更改代码以从 Yarn 创建的文件夹中引用它们。

0 投票
2 回答
13038 浏览

mapreduce - 在运行 MapReduce 作业时获取应用程序 ID

运行时有什么方法可以获取应用程序 ID - 例如 - 使用命令的wordcount示例yarn

我希望使用该yarn命令从另一个进程启动作业,并通过 YARN REST API 监视作业的状态。

(使用 Hadoop 2.4.0)

0 投票
3 回答
2968 浏览

java - 将 1GB 数据加载到 hbase 需要 1 小时

我想将 1GB(1000 万条记录)CSV 文件加载到 Hbase 中。我为它写了 Map-Reduce Program。我的代码运行良好,但需要 1 小时才能完成。最后一个减速器需要半个多小时的时间。有人可以帮我吗?

我的代码如下:

驱动程序.Java

HColumnEnum.java

HBaseKVMapper.java

请帮助我提高性能,或者如果您有任何带有示例代码的替代解决方案,请告诉我。

我的 mapred-site.xml

hbase-site.xml

请帮助我,这样我就可以提高我的表现。

0 投票
3 回答
9718 浏览

hadoop - Mapreduce 传递命令行参数

我正在尝试使用新的 API 进行 map reduce 并将常规表达式作为 -D 命令行参数传递,但它没有被拾取。结果是 Pattern.compile(pattern) 得到一个NullPointerException

我的映射器代码是;

我的控制器代码是;

}

最后,我正在进行的命令行调用是;

有什么建议为什么我无法获取配置参数 mapper.pattern?

0 投票
2 回答
535 浏览

hadoop - Hadoop 中自定义计数器的替代文本

我定义了以下计数器

它们显示如下

我想知道是否有一种机制可以为这些使用替代文本。例如,我希望将计数器组读取为坏记录计数器而不是 FQCN。

0 投票
2 回答
213 浏览

hadoop - MapReduce - 对于每个学生,该学生在几小时内发布的帖子最多

我在 Hadoop 上转储了 SO 记录。我想知道回答以下问题的好方法是什么

样本记录

我的第一次剪辑

键 = userid_hour

所以现在我会按小时知道每个用户发帖的数量。然后我需要发布处理这些数据以选择每个用户的最大计数,然后查看最活跃的时间。

问题

我们还有什么其他的选择来简化这个?