HDFS-2856: simplify branching logic.