FsDatasetSpi接口里定义adjustCrcChannelPosition方法。
应用场景在:append,block recovery等场景。
方法的作用是设置checksum 流(datanode上meta文件)的文件指针,来让最后一个checksum被覆写。
/**
* Sets the file pointer of the checksum stream so that the last checksum
* will be overwritten
* @param b block
* @param outs The streams for the data file and checksum file
* @param checksumSize number of bytes each checksum has
* @throws IOException
*/
void adjustCrcChannelPosition(ExtendedBlock b,
ReplicaOutputStreams outs, int checksumSize)