diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java index d1e72f7..84061b0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java @@ -26,6 +26,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.ChecksumFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.yetus.audience.InterfaceAudience; @@ -91,9 +92,11 @@ public class ProtobufLogWriter extends AbstractProtobufLogWriter short replication, long blockSize) throws IOException, StreamLacksCapabilityException { this.output = fs.createNonRecursive(path, overwritable, bufferSize, replication, blockSize, null); - // TODO Be sure to add a check for hsync if this branch includes HBASE-19024 - if (!(CommonFSUtils.hasCapability(output, "hflush"))) { - throw new StreamLacksCapabilityException("hflush"); + if (!(fs instanceof ChecksumFileSystem)) { + // TODO Be sure to add a check for hsync if this branch includes HBASE-19024 + if (!(CommonFSUtils.hasCapability(output, "hflush"))) { + throw new StreamLacksCapabilityException("hflush"); + } } }