diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ContentGenerator.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ContentGenerator.java index da16026210f..66bc7943676 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ContentGenerator.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ContentGenerator.java @@ -23,9 +23,7 @@ import com.google.common.annotations.VisibleForTesting; import org.apache.commons.lang3.RandomStringUtils; -import org.apache.hadoop.fs.StreamCapabilities; import org.apache.hadoop.fs.Syncable; -import org.apache.hadoop.fs.impl.StoreImplementationUtils; import org.apache.hadoop.ozone.client.io.OzoneDataStreamOutput; /** @@ -109,20 +107,17 @@ private void doFlushOrSync(OutputStream outputStream) throws IOException { // noop break; case HFLUSH: - if (StoreImplementationUtils.hasCapability( - outputStream, StreamCapabilities.HSYNC)) { - ((Syncable)outputStream).hflush(); + if (outputStream instanceof Syncable) { + ((Syncable) outputStream).hflush(); } break; case HSYNC: - if (StoreImplementationUtils.hasCapability( - outputStream, StreamCapabilities.HSYNC)) { - ((Syncable)outputStream).hsync(); + if (outputStream instanceof Syncable) { + ((Syncable) outputStream).hsync(); } break; default: - throw new IllegalArgumentException("Unsupported sync option" - + flushOrSync); + throw new IllegalArgumentException("Unsupported sync option" + flushOrSync); } }