3

はいの場合、HDFS は入力ファイルを N 行に分割してマッパーごとに読み取る方法を教えてください。

私はそれが不可能だと信じています!

スプリッターが分割するためにオフセットまたはバイトを必要とする場合、入力ファイル全体を処理せずに分割することができます。

ただし、'\n' や改行文字の数が重要な場合は、分割する前に入力ファイル全体を処理する (改行文字をカウントする) 必要があります。

4

2 に答える 2

0

Yes.

It's possible!

Reason :

The mechanism is still the same and works on the raw data. The N in NLineInputFormat represents refers to the number of lines of input that each mapper receives. Number of records, to be precise. Since, NLineInputFormat uses LineRecordReader, each line is one Record. It doesn't change the way splits are created, which is normally based on the size of an HDFS block(remember NLineInputFormat is a member of FileInputFormat family).

于 2013-09-26T23:14:00.190 に答える