SequenceFile & SequenceFileInputFormat - satyrs
SequenceFile & SequenceFileInputFormat<K,V>
- org.apache.hadoop.mapred.SequenceFileInputFormat<K,V>
- 获得FileStatus{block size+group+lenth+accesstime+modificationtime+owner+path+permission+symlink+Acl+一些判断是否目录等+序列化到out+set函数}
- 通过input获得RecordReader。将byte转为record-oriented,为下一步的MR准备。processing record boundaries and presenting the tasks with keys and values.。可{关闭InputSplit+创建key+创建value+返回目前input位置+从input中读取下一个k-v对}
- org.apache.hadoop.io.SequenceFile
- flat files 由01k-v对组成。Writer Reader和Sorter 三部分。
- 基于CompressionType有三种writers,并shared a common header。compress的block size, 使用的algorithm都configurable。
- 推荐使用static createWriter
- format: Header Record sync-marker. Header:version+calss of k,v +compression+blockcompression+compression codec+metadata+sync