Class BlobUtils

java.lang.Object
org.apache.flink.runtime.blob.BlobUtils

public class BlobUtils extends Object
Utility class to work with blob data.
  • Method Details

    • createBlobStoreFromConfig

      public static BlobStoreService createBlobStoreFromConfig(org.apache.flink.configuration.Configuration config) throws IOException
      Creates a BlobStore based on the parameters set in the configuration.
      Parameters:
      config - configuration to use
      Returns:
      a (distributed) blob store for high availability
      Throws:
      IOException - thrown if the (distributed) file storage cannot be created
    • createBlobServer

      public static BlobServer createBlobServer(org.apache.flink.configuration.Configuration configuration, org.apache.flink.util.Reference<File> fallbackStorageDirectory, BlobStore blobStore) throws IOException
      Creates the BlobServer from the given configuration, fallback storage directory and blob store.
      Parameters:
      configuration - for the BlobServer
      fallbackStorageDirectory - fallback storage directory that is used if no other directory has been explicitly configured
      blobStore - blob store to use for this blob server
      Returns:
      new blob server instance
      Throws:
      IOException - if we could not create the blob storage directory
    • createBlobCacheService

      public static BlobCacheService createBlobCacheService(org.apache.flink.configuration.Configuration configuration, org.apache.flink.util.Reference<File> fallbackStorageDirectory, BlobView blobView, @Nullable InetSocketAddress serverAddress) throws IOException
      Creates the BlobCacheService from the given configuration, fallback storage directory, blob view and blob server address.
      Parameters:
      configuration - for the BlobCacheService
      fallbackStorageDirectory - fallback storage directory
      blobView - blob view
      serverAddress - blob server address
      Returns:
      new blob cache service instance
      Throws:
      IOException - if we could not create the blob storage directory
    • calculateMessageDigest

      public static byte[] calculateMessageDigest(File file) throws IOException
      Throws:
      IOException