public abstract class ClientBlobStore extends Object implements Shutdownable
The ClientBlobStore has two concrete implementations 1. NimbusBlobStore 2. HdfsClientBlobStore
Create, update, read and delete are some of the basic operations defined by this interface. Each operation is validated for permissions against an user. We currently have NIMBUS_ADMINS and SUPERVISOR_ADMINS configuration. NIMBUS_ADMINS are given READ, WRITE and ADMIN access whereas the SUPERVISOR_ADMINS are given READ access in order to read and download the blobs form the nimbus.
The ACLs for the blob store are validated against whether the subject is a NIMBUS_ADMIN, SUPERVISOR_ADMIN or USER who has read, write or admin privileges in order to perform respective operations on the blob.
For more detailed implementation
NimbusBlobStore,
LocalFsBlobStore,
HdfsClientBlobStore,
HdfsBlobStore| Constructor and Description |
|---|
ClientBlobStore() |
| Modifier and Type | Method and Description |
|---|---|
AtomicOutputStream |
createBlob(String key,
SettableBlobMeta meta)
Client facing API to create a blob.
|
protected abstract AtomicOutputStream |
createBlobToExtend(String key,
SettableBlobMeta meta)
Client facing API to create a blob.
|
abstract void |
createStateInZookeeper(String key)
Creates state inside a zookeeper.
|
abstract void |
deleteBlob(String key)
Client facing API to delete a blob.
|
abstract InputStreamWithMeta |
getBlob(String key)
Client facing API to read a blob.
|
abstract ReadableBlobMeta |
getBlobMeta(String key)
Client facing API to read the metadata information.
|
abstract int |
getBlobReplication(String key)
Client facing API to read the replication of a blob.
|
abstract Iterator<String> |
listKeys() |
abstract void |
prepare(Map conf)
Sets up the client API by parsing the configs.
|
void |
setBlobMeta(String key,
SettableBlobMeta meta)
Client facing API to set the metadata for a blob.
|
protected abstract void |
setBlobMetaToExtend(String key,
SettableBlobMeta meta)
Client facing API to set the metadata for a blob.
|
abstract boolean |
setClient(Map conf,
NimbusClient client)
Client facing API to set a nimbus client.
|
abstract AtomicOutputStream |
updateBlob(String key)
Client facing API to update a blob.
|
abstract int |
updateBlobReplication(String key,
int replication)
Client facing API to update the replication of a blob.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshutdownprotected Map conf
public abstract void prepare(Map conf)
Sets up the client API by parsing the configs.
conf - The storm conf containing the config details.protected abstract AtomicOutputStream createBlobToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException
Client facing API to create a blob.
key - blob key name.meta - contains ACL information.AuthorizationExceptionKeyAlreadyExistsExceptionpublic abstract AtomicOutputStream updateBlob(String key) throws AuthorizationException, KeyNotFoundException
Client facing API to update a blob.
key - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic abstract ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException
Client facing API to read the metadata information.
key - blob key name.AuthorizationExceptionKeyNotFoundExceptionprotected abstract void setBlobMetaToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException
Client facing API to set the metadata for a blob.
key - blob key name.meta - contains ACL information.AuthorizationExceptionKeyNotFoundExceptionpublic abstract void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException
Client facing API to delete a blob.
key - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic abstract InputStreamWithMeta getBlob(String key) throws AuthorizationException, KeyNotFoundException
Client facing API to read a blob.
key - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic abstract Iterator<String> listKeys()
public abstract int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException
Client facing API to read the replication of a blob.
key - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic abstract int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException
Client facing API to update the replication of a blob.
key - blob key name.replication - int indicates the replication factor a blob has to be set.AuthorizationExceptionKeyNotFoundExceptionpublic abstract boolean setClient(Map conf, NimbusClient client)
Client facing API to set a nimbus client.
conf - storm confclient - NimbusClientpublic abstract void createStateInZookeeper(String key)
Creates state inside a zookeeper. Required for blobstore to write to zookeeper when Nimbus HA is turned on in order to maintain state consistency
key - public final AtomicOutputStream createBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException
Client facing API to create a blob.
key - blob key name.meta - contains ACL information.AuthorizationExceptionKeyAlreadyExistsExceptionpublic final void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException
Client facing API to set the metadata for a blob.
key - blob key name.meta - contains ACL information.AuthorizationExceptionKeyNotFoundExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.