小编use*_*629的帖子

为Hadoop MR创建序列文件格式

我正在和我一起工作Hadoop MapRedue,并有一个问题.目前,我的映射的input KV typeLongWritable, LongWritable typeoutput KV typeLongWritable, LongWritable type.InputFileFormat是SequenceFileInputFormat.基本上我想要做的是将一个txt文件更改为SequenceFileFormat,以便我可以将它用于我的mapper.

我想做的是

输入文件是这样的

1\t2 (key = 1, value = 2)

2\t3 (key = 2, value = 3)

等等...

我查看了这个线程如何将.txt文件转换为Hadoop的序列文件格式,TextInputFormat只重新支持Key = LongWritable and Value = Text

有没有办法获得txt并生成一个序列文件KV = LongWritable, LongWritable

hadoop mapreduce

0
推荐指数
1
解决办法
8710
查看次数

标签 统计

hadoop ×1

mapreduce ×1