2017-09-21 1 views
0

MapReduce HadoopのRecordの定義をText以外のデータ型について理解したいと思います。Hadoopのさまざまなタイプのデータセットに対するMapReduceのレコード定義ですか?

通常、Textの場合、レコードは新しい行でフルラインで終了します。

XMLデータを処理したい場合、このデータはどのように処理されますか、つまりRecordの定義にはどのようにしてmapperが機能しますか?

私はInputFormatRecordReaderのコンセプトがあると読んだが、うまくいきませんでした。

は、誰も私が(テキスト以外)のデータ・セットの様々なタイプのInputFormatRecordReaderとの関係が何であるかを理解するのに役立ちますし、どのようにデータがmapper作品時にどのRecordsに変換されるのでしょうか?詳細は

答えて

0
Lets start with some basic concept. 

    From perspective of a file. 
    1. File -> collection of rows. 
    2. Row -> Collection of one or more columns , separated by delimiter. 
    2. File can be of any format=> text file, parquet file, ORC file. 

    Different file format, store Rows(columns) in different way , and the choice of delimiter is also different. 


From Perspective of HDFS, 
    1. File is sequennce of bytes. 
    2. It has no idea of the logical structuring of file. ie Rows and columns. 
    3. HDFS do-sent guarantee, that a row will be contained within oe hdfs block, a row can span across two blocks. 


    Input Format : The code which knows how to read the file chunks from splits , and at the same time ensure if a row extends to other split, it should be considered part of the first split. 

    Record Reader : As you read a Split , some code(Record Reader) should be able to understand how to interpret a row from the bytes read from HDFS. 


http://bytepadding.com/big-data/map-reduce/understanding-map-reduce-the-missing-guide/

関連する問題