por Haifan Zhu hace 11 años
450
根据region数量setNumReduceTasks
setReducerClass 根据配置选择KeyValueSortReducer或PutSortReducer
setOutputFormatClass(HFileOutputFormat.class)
wl.writer.append(kv)
如果一行写完且HFile达到阈值rollWriters()
返回RecordWriter
setOutputValueClass(KeyValue.class)
setOutputKeyClass(ImmutableBytesWritable.class)
setPartitionerClass(getTotalOrderPartitionerClass())
返回重试列表
把没有成功的文件移回原位
bulkLoadHFiles()
region.bulkLoadHFiles()
关闭锁closeBulkRegionOperation()
store.bulkLoadHFile(finalPath)
notifyChangedReadersObservers()
sortAndClone()
将新StoreFile加入列表中
建立新的StoreFile
验证HFile的正确性assertBulkLoadHFileOk()
getStore(familyName)
获得锁startBulkRegionOperation()
getRegion(regionName)