我正在和我一起工作Hadoop MapRedue,并有一个问题.目前,我的映射的input KV type是LongWritable, LongWritable type和
output KV type也LongWritable, 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?