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) |
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) |
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
IOExceptionpublic HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path,
Map<String,Object> conf,
org.apache.hadoop.conf.Configuration hconf)
throws IOException
IOExceptionpublic Iterator<String> listKeys() throws IOException
List relevant keys.
IOException - on any errorprotected Iterator<String> listKeys(org.apache.hadoop.fs.Path path) throws IOException
IOExceptionpublic 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
IOExceptionprotected Iterator<BlobStoreFile> listBlobStoreFiles(org.apache.hadoop.fs.Path path) throws IOException
IOExceptionprotected int getBlobReplication(String key) throws IOException
IOExceptionprotected int updateBlobReplication(String key, int replication) throws IOException
IOExceptionprotected void delete(org.apache.hadoop.fs.Path path)
throws IOException
IOExceptionpublic void shutdown()
Copyright © 2020 The Apache Software Foundation. All rights reserved.