public class BlobUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
calculateMessageDigest(File file) |
static BlobCacheService |
createBlobCacheService(Configuration configuration,
Reference<File> fallbackStorageDirectory,
BlobView blobView,
InetSocketAddress serverAddress)
Creates the
BlobCacheService from the given configuration, fallback storage
directory, blob view and blob server address. |
static BlobServer |
createBlobServer(Configuration configuration,
Reference<File> fallbackStorageDirectory,
BlobStore blobStore)
Creates the
BlobServer from the given configuration, fallback storage directory and
blob store. |
static BlobStoreService |
createBlobStoreFromConfig(Configuration config)
Creates a BlobStore based on the parameters set in the configuration.
|
public static BlobStoreService createBlobStoreFromConfig(Configuration config) throws IOException
config
- configuration to useIOException
- thrown if the (distributed) file storage cannot be createdpublic static BlobServer createBlobServer(Configuration configuration, Reference<File> fallbackStorageDirectory, BlobStore blobStore) throws IOException
BlobServer
from the given configuration, fallback storage directory and
blob store.configuration
- for the BlobServerfallbackStorageDirectory
- fallback storage directory that is used if no other directory
has been explicitly configuredblobStore
- blob store to use for this blob serverIOException
- if we could not create the blob storage directorypublic static BlobCacheService createBlobCacheService(Configuration configuration, Reference<File> fallbackStorageDirectory, BlobView blobView, @Nullable InetSocketAddress serverAddress) throws IOException
BlobCacheService
from the given configuration, fallback storage
directory, blob view and blob server address.configuration
- for the BlobCacheServicefallbackStorageDirectory
- fallback storage directoryblobView
- blob viewserverAddress
- blob server addressIOException
- if we could not create the blob storage directorypublic static byte[] calculateMessageDigest(File file) throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.