public class HdfsClientBlobStore extends ClientBlobStore
Client to access the HDFS blobStore. At this point, this is meant to only be used by the supervisor. Don’t trust who the client says they are so pass null for all Subjects.
The HdfsBlobStore implementation takes care of the null Subjects. It assigns Subjects based on what hadoop says who the users are. These users must be configured accordingly in the SUPERVISOR_ADMINS for ACL validation and for the supervisors to download the blobs. This API is only used by the supervisor in order to talk directly to HDFS.
conf| Constructor and Description |
|---|
HdfsClientBlobStore() |
| Modifier and Type | Method and Description |
|---|---|
AtomicOutputStream |
createBlobToExtend(String key,
SettableBlobMeta meta)
Client facing API to create a blob.
|
void |
createStateInZookeeper(String key)
Creates state inside a zookeeper.
|
void |
deleteBlob(String key)
Client facing API to delete a blob.
|
InputStreamWithMeta |
getBlob(String key)
Client facing API to read a blob.
|
ReadableBlobMeta |
getBlobMeta(String key)
Client facing API to read the metadata information.
|
int |
getBlobReplication(String key)
Client facing API to read the replication of a blob.
|
Iterator<String> |
listKeys() |
void |
prepare(Map conf)
Sets up the client API by parsing the configs.
|
void |
setBlobMetaToExtend(String key,
SettableBlobMeta meta)
Client facing API to set the metadata for a blob.
|
boolean |
setClient(Map conf,
NimbusClient client)
Client facing API to set a nimbus client.
|
void |
shutdown() |
AtomicOutputStream |
updateBlob(String key)
Client facing API to update a blob.
|
int |
updateBlobReplication(String key,
int replication)
Client facing API to update the replication of a blob.
|
createBlob, setBlobMetapublic void prepare(Map conf)
ClientBlobStoreSets up the client API by parsing the configs.
prepare in class ClientBlobStoreconf - The storm conf containing the config details.public AtomicOutputStream createBlobToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException
ClientBlobStoreClient facing API to create a blob.
createBlobToExtend in class ClientBlobStorekey - blob key name.meta - contains ACL information.AuthorizationExceptionKeyAlreadyExistsExceptionpublic AtomicOutputStream updateBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to update a blob.
updateBlob in class ClientBlobStorekey - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to read the metadata information.
getBlobMeta in class ClientBlobStorekey - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic void setBlobMetaToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to set the metadata for a blob.
setBlobMetaToExtend in class ClientBlobStorekey - blob key name.meta - contains ACL information.AuthorizationExceptionKeyNotFoundExceptionpublic void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to delete a blob.
deleteBlob in class ClientBlobStorekey - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic InputStreamWithMeta getBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to read a blob.
getBlob in class ClientBlobStorekey - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic Iterator<String> listKeys()
listKeys in class ClientBlobStorepublic int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to read the replication of a blob.
getBlobReplication in class ClientBlobStorekey - blob key name.AuthorizationExceptionKeyNotFoundExceptionpublic int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException
ClientBlobStoreClient facing API to update the replication of a blob.
updateBlobReplication in class ClientBlobStorekey - blob key name.replication - int indicates the replication factor a blob has to be set.AuthorizationExceptionKeyNotFoundExceptionpublic boolean setClient(Map conf, NimbusClient client)
ClientBlobStoreClient facing API to set a nimbus client.
setClient in class ClientBlobStoreconf - storm confclient - NimbusClientpublic void createStateInZookeeper(String key)
ClientBlobStoreCreates state inside a zookeeper. Required for blobstore to write to zookeeper when Nimbus HA is turned on in order to maintain state consistency
createStateInZookeeper in class ClientBlobStorepublic void shutdown()
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.