2017-09-21 17 views
0

텍스트 이외의 데이터 형식 인 MapReduce Hadoop에서 Record의 정의를 이해하고 싶습니다.Hadoop의 다양한 유형의 데이터 세트에 대한 MapReduce의 레코드 정의?

일반적으로 Text 데이터의 경우 레코드는 줄 바꿈으로 전체 라인 종료됩니다.

XML 데이터를 처리하려면이 데이터가 어떻게 처리되어야합니까? 즉, 정의에서 mapper이 작동하는 방식은 무엇입니까?

나는 InputFormatRecordReader이라는 개념이 있지만 잘 읽지 못했다고 읽었습니다.

사람이 나를 어떻게 데이터가있는에 mapper 작품에 Records로 변환됩니다 않습니다 (텍스트 제외) 및 데이터 세트의 여러 유형에 대한 InputFormat, RecordReader 사이의 관계를 이해 도와 드릴까요? 추가 정보를

답변

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/