HDFS-5616: refactor
HDFS-5616: refactor