Class StoreImplementationUtils

java.lang.Object
org.apache.hadoop.fs.impl.StoreImplementationUtils

@Private @Unstable public final class StoreImplementationUtils extends Object
Utility classes to help implementing filesystems and streams.
  • Method Details

    • isProbeForSyncable

      public static boolean isProbeForSyncable(String capability)
      Check the probe capability being for StreamCapabilities.HSYNC or StreamCapabilities.HFLUSH Syncable.hsync() and Syncable.hflush() functionality.
      Parameters:
      capability - capability string.
      Returns:
      true if either refers to one of the Syncable operations.
    • hasCapability

      public static boolean hasCapability(OutputStream out, String capability)
      Probe for an output stream having a capability; returns true if the stream implements StreamCapabilities and its hasCapabilities() method returns true for the capability.
      Parameters:
      out - output stream
      capability - capability to probe for
      Returns:
      true if the stream declares that it supports the capability.
    • hasCapability

      public static boolean hasCapability(InputStream in, String capability)
      Probe for an input stream having a capability; returns true if the stream implements StreamCapabilities and its hasCapabilities() method returns true for the capability.
      Parameters:
      in - input stream
      capability - capability to probe for
      Returns:
      true if the stream declares that it supports the capability.