HDFS-7129. Metrics to track usage of memory for writes. (Contributed by Xiaoyu Yao)