HDFS-2856: rework configuration handling