@Override
        public void append(Entry entry) throws IOException {
          if (throwAppendException) {
            throw new IOException("FAKE! Failed to replace a bad datanode...");
          }
          w.append(entry);
        }
Testing sync/append failures. Copied from TestHRegion.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFailedAppendAndSync.java