public class NimbusBlobStore extends ClientBlobStore implements AutoCloseable
For local blob store it is also the client facing API for supervisor in order to download blobs from nimbus.
Modifier and Type | Class and Description |
---|---|
class |
NimbusBlobStore.NimbusDownloadInputStream |
class |
NimbusBlobStore.NimbusKeyIterator |
class |
NimbusBlobStore.NimbusUploadAtomicOutputStream |
ClientBlobStore.WithBlobstore
Constructor and Description |
---|
NimbusBlobStore() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected 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.
|
protected void |
finalize() |
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.
|
long |
getRemoteBlobstoreUpdateTime()
Client facing API to get the last update time of existing blobs in a blobstore.
|
boolean |
isRemoteBlobExists(String blobKey)
Decide if the blob is deleted from cluster.
|
Iterator<String> |
listKeys()
List keys.
|
void |
prepare(Map<String,Object> conf)
Sets up the client API by parsing the configs.
|
protected void |
setBlobMetaToExtend(String key,
SettableBlobMeta meta)
Client facing API to set the metadata for a blob.
|
boolean |
setClient(Map<String,Object> 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, setBlobMeta, withConfiguredClient
public void prepare(Map<String,Object> conf)
ClientBlobStore
prepare
in class ClientBlobStore
conf
- The storm conf containing the config detailsprotected AtomicOutputStream createBlobToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException
ClientBlobStore
createBlobToExtend
in class ClientBlobStore
key
- blob key namemeta
- contains ACL informationAuthorizationException
KeyAlreadyExistsException
public AtomicOutputStream updateBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
updateBlob
in class ClientBlobStore
key
- blob key nameAuthorizationException
KeyNotFoundException
public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
getBlobMeta
in class ClientBlobStore
key
- blob key nameAuthorizationException
KeyNotFoundException
public boolean isRemoteBlobExists(String blobKey) throws AuthorizationException
ClientBlobStore
isRemoteBlobExists
in class ClientBlobStore
blobKey
- blob keyAuthorizationException
protected void setBlobMetaToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
setBlobMetaToExtend
in class ClientBlobStore
key
- blob key namemeta
- contains ACL informationAuthorizationException
KeyNotFoundException
public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
deleteBlob
in class ClientBlobStore
key
- blob key nameAuthorizationException
KeyNotFoundException
public void createStateInZookeeper(String key)
ClientBlobStore
createStateInZookeeper
in class ClientBlobStore
public InputStreamWithMeta getBlob(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
getBlob
in class ClientBlobStore
key
- blob key nameAuthorizationException
KeyNotFoundException
public Iterator<String> listKeys()
ClientBlobStore
listKeys
in class ClientBlobStore
public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
getBlobReplication
in class ClientBlobStore
key
- blob key nameAuthorizationException
KeyNotFoundException
public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException
ClientBlobStore
updateBlobReplication
in class ClientBlobStore
key
- blob key namereplication
- int indicates the replication factor a blob has to be setAuthorizationException
KeyNotFoundException
public boolean setClient(Map<String,Object> conf, NimbusClient client)
ClientBlobStore
setClient
in class ClientBlobStore
conf
- storm confclient
- NimbusClientpublic void shutdown()
shutdown
in interface Shutdownable
public void close()
close
in interface AutoCloseable
close
in class ClientBlobStore
public long getRemoteBlobstoreUpdateTime() throws IOException
ClientBlobStore
getRemoteBlobstoreUpdateTime
in class ClientBlobStore
IOException
Copyright © 2023 The Apache Software Foundation. All rights reserved.