public class HdfsBlobStoreImpl extends Object
HDFS blob store impl.
Modifier and Type | Class and Description |
---|---|
class |
HdfsBlobStoreImpl.KeyInHashDirIterator |
Modifier and Type | Field and Description |
---|---|
static org.apache.hadoop.fs.permission.FsPermission |
BLOBSTORE_DIR_PERMISSION |
Constructor and Description |
---|
HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path,
Map<String,Object> conf) |
HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path,
Map<String,Object> conf,
org.apache.hadoop.conf.Configuration hconf) |
Modifier and Type | Method and Description |
---|---|
protected void |
delete(org.apache.hadoop.fs.Path path) |
void |
deleteKey(String key)
Delete a key from the blob store.
|
boolean |
exists(String key)
Check if the key exists in the blob store.
|
void |
fullCleanup(long age) |
protected int |
getBlobReplication(String key) |
protected org.apache.hadoop.fs.Path |
getKeyDir(String key) |
long |
getLastBlobUpdateTime()
Get the last update time of any blob.
|
protected Iterator<BlobStoreFile> |
listBlobStoreFiles(org.apache.hadoop.fs.Path path) |
Iterator<String> |
listKeys()
List relevant keys.
|
protected Iterator<String> |
listKeys(org.apache.hadoop.fs.Path path) |
BlobStoreFile |
read(String key)
Get an input stream for reading a part.
|
void |
shutdown() |
protected int |
updateBlobReplication(String key,
int replication) |
void |
updateLastBlobUpdateTime()
Updates the last updated time of existing blobstores to the current time.
|
void |
validateBlobUpdateTime()
Validates that the last updated blob time of the blobstore is up to date with the current existing blobs.
|
BlobStoreFile |
write(String key,
boolean create)
Get an object tied to writing the data.
|
public static final org.apache.hadoop.fs.permission.FsPermission BLOBSTORE_DIR_PERMISSION
public HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path, Map<String,Object> conf) throws IOException
IOException
public HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path, Map<String,Object> conf, org.apache.hadoop.conf.Configuration hconf) throws IOException
IOException
public Iterator<String> listKeys() throws IOException
List relevant keys.
IOException
- on any errorprotected Iterator<String> listKeys(org.apache.hadoop.fs.Path path) throws IOException
IOException
public BlobStoreFile read(String key) throws IOException
Get an input stream for reading a part.
key
- the key of the part to readIOException
- on any errorpublic BlobStoreFile write(String key, boolean create) throws IOException
Get an object tied to writing the data.
key
- the key of the part to write to.create
- whether the file needs to be new or not.IOException
- on any errorpublic boolean exists(String key)
Check if the key exists in the blob store.
key
- the key to check forpublic void deleteKey(String key) throws IOException
Delete a key from the blob store.
key
- the key to deleteIOException
- on any errorprotected org.apache.hadoop.fs.Path getKeyDir(String key)
public void fullCleanup(long age) throws IOException
IOException
protected Iterator<BlobStoreFile> listBlobStoreFiles(org.apache.hadoop.fs.Path path) throws IOException
IOException
protected int getBlobReplication(String key) throws IOException
IOException
protected int updateBlobReplication(String key, int replication) throws IOException
IOException
protected void delete(org.apache.hadoop.fs.Path path) throws IOException
IOException
public void shutdown()
public long getLastBlobUpdateTime() throws IOException
Get the last update time of any blob.
IOException
- on any errorpublic void updateLastBlobUpdateTime() throws IOException
Updates the last updated time of existing blobstores to the current time.
IOException
- on any errorpublic void validateBlobUpdateTime() throws IOException
Validates that the last updated blob time of the blobstore is up to date with the current existing blobs.
IOException
- on any errorCopyright © 2022 The Apache Software Foundation. All rights reserved.