@Override
        public void reorderBlocks(Configuration c, LocatedBlocks lbs, String src) {
          for (LocatedBlock lb : lbs.getLocatedBlocks()) {
            if (getLocatedBlockLocations(lb).length > 1) {
              DatanodeInfo[] infos = getLocatedBlockLocations(lb);
              if (infos[0].getHostName().equals(lookup)) {
                LOG.info("HFileSystem bad host, inverting");
                DatanodeInfo tmp = infos[0];
                infos[0] = infos[1];
                infos[1] = tmp;
              }
            }
          }
        }
Test that we're can add a hook, and that this hook works when we try to read the file in HDFS.
hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java