Client不设置cachingStrategy相关的配置时,在DataNode日志里出现大量的如下日志:
2022-12-26 16:16:34,166 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Slow manageWriterOsCache took 306ms (threshold=300ms), volume=file:/data6/hadoop/hdfs/datanode/, blockId=1214890778
2022-12-26 16:16:34,847 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Slow manageWriterOsCache took 980ms (threshold=300ms), volume=file:/data6/hadoop/hdfs/datanode/, blockId=1267281592
2022-12-26 16:16:37,292 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Slow manageWriterOsCache took 380ms (threshold=300ms), volume=file:/data6/hadoop/hdfs/datanode/, blockId=1214890778
2022-12-26 16:16:39,446 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Slow manageWriterOsCache took 534ms (threshold=300ms), volume=file:/data6/hadoop/hdfs/datanode/, blockId=1214890778
定位到源码BlockReceiver#manageWriterOsCache里: