Refactor the HDFS backends