1. 程式人生 > >API brief(spark for scala )

API brief(spark for scala )

keys ati enc ted cati with link odi access

  • org.apache.hadoop.mapred.SequenceFileInputFormat<K,V>
  1. 獲得FileStatus{block size+group+lenth+accesstime+modificationtime+owner+path+permission+symlink+Acl+一些判斷是否目錄等+序列化到out+set函數}
  2. 通過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
  1. flat files 由01k-v對組成。Writer Reader和Sorter 三部分。
  2. 基於CompressionType有三種writers,並shared a common header。compress的block size, 使用的algorithm都configurable。
  3. 推薦使用static createWriter
  4. format: Header Record sync-marker. Header:version+calss of k,v +compression+blockcompression+compression codec+metadata+sync

API brief(spark for scala )