Class BlobUtils


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

      • createBlobStoreFromConfig

        public static BlobStoreService createBlobStoreFromConfig​(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​(Configuration configuration,
                                                  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​(Configuration configuration,
                                                              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