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) |
void |
createStateInZookeeper(String key) |
void |
deleteBlob(String key) |
InputStreamWithMeta |
getBlob(String key) |
ReadableBlobMeta |
getBlobMeta(String key) |
int |
getBlobReplication(String key) |
Iterator<String> |
listKeys() |
void |
prepare(Map conf) |
void |
setBlobMetaToExtend(String key,
SettableBlobMeta meta) |
boolean |
setClient(Map conf,
NimbusClient client) |
void |
shutdown() |
AtomicOutputStream |
updateBlob(String key) |
int |
updateBlobReplication(String key,
int replication) |
createBlob, setBlobMeta
public void prepare(Map conf)
prepare
in class ClientBlobStore
public AtomicOutputStream createBlobToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException
createBlobToExtend
in class ClientBlobStore
AuthorizationException
KeyAlreadyExistsException
public AtomicOutputStream updateBlob(String key) throws AuthorizationException, KeyNotFoundException
updateBlob
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException
getBlobMeta
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public void setBlobMetaToExtend(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException
setBlobMetaToExtend
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException
deleteBlob
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public InputStreamWithMeta getBlob(String key) throws AuthorizationException, KeyNotFoundException
getBlob
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public Iterator<String> listKeys()
listKeys
in class ClientBlobStore
public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException
getBlobReplication
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException
updateBlobReplication
in class ClientBlobStore
AuthorizationException
KeyNotFoundException
public boolean setClient(Map conf, NimbusClient client)
setClient
in class ClientBlobStore
public void createStateInZookeeper(String key)
createStateInZookeeper
in class ClientBlobStore
public void shutdown()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.