Package org.apache.storm.hdfs.blobstore
Class HdfsBlobStoreImpl
java.lang.Object
org.apache.storm.hdfs.blobstore.HdfsBlobStoreImpl
HDFS blob store impl.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final org.apache.hadoop.fs.permission.FsPermission
- 
Constructor SummaryConstructorsConstructorDescriptionHdfsBlobStoreImpl(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) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddelete(org.apache.hadoop.fs.Path path) voidDelete a key from the blob store.booleanCheck if the key exists in the blob store.voidfullCleanup(long age) protected intgetBlobReplication(String key) protected org.apache.hadoop.fs.PathlongGet the last update time of any blob.protected Iterator<BlobStoreFile>listBlobStoreFiles(org.apache.hadoop.fs.Path path) listKeys()List relevant keys.listKeys(org.apache.hadoop.fs.Path path) Get an input stream for reading a part.voidshutdown()protected intupdateBlobReplication(String key, int replication) voidUpdates the last updated time of existing blobstores to the current time.voidValidates that the last updated blob time of the blobstore is up to date with the current existing blobs.Get an object tied to writing the data.
- 
Field Details- 
BLOBSTORE_DIR_PERMISSIONpublic static final org.apache.hadoop.fs.permission.FsPermission BLOBSTORE_DIR_PERMISSION
 
- 
- 
Constructor Details- 
HdfsBlobStoreImplpublic HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path, Map<String, Object> conf) throws IOException- Throws:
- IOException
 
- 
HdfsBlobStoreImplpublic HdfsBlobStoreImpl(org.apache.hadoop.fs.Path path, Map<String, Object> conf, org.apache.hadoop.conf.Configuration hconf) throws IOException- Throws:
- IOException
 
 
- 
- 
Method Details- 
listKeysList relevant keys.- Returns:
- all keys that are available for reading
- Throws:
- IOException- on any error
 
- 
listKeys- Throws:
- IOException
 
- 
readGet an input stream for reading a part.- Parameters:
- key- the key of the part to read
- Returns:
- the where to read the data from
- Throws:
- IOException- on any error
 
- 
writeGet an object tied to writing the data.- Parameters:
- key- the key of the part to write to.
- create- whether the file needs to be new or not.
- Returns:
- an object that can be used to both write to, but also commit/cancel the operation.
- Throws:
- IOException- on any error
 
- 
existsCheck if the key exists in the blob store.- Parameters:
- key- the key to check for
- Returns:
- true if it exists else false.
 
- 
deleteKeyDelete a key from the blob store.- Parameters:
- key- the key to delete
- Throws:
- IOException- on any error
 
- 
getKeyDir
- 
fullCleanup- Throws:
- IOException
 
- 
listBlobStoreFilesprotected Iterator<BlobStoreFile> listBlobStoreFiles(org.apache.hadoop.fs.Path path) throws IOException - Throws:
- IOException
 
- 
getBlobReplication- Throws:
- IOException
 
- 
updateBlobReplication- Throws:
- IOException
 
- 
delete- Throws:
- IOException
 
- 
shutdownpublic void shutdown()
- 
getLastBlobUpdateTimeGet the last update time of any blob.- Returns:
- the last updated time of blobs within the blobstore.
- Throws:
- IOException- on any error
 
- 
updateLastBlobUpdateTimeUpdates the last updated time of existing blobstores to the current time.- Throws:
- IOException- on any error
 
- 
validateBlobUpdateTimeValidates that the last updated blob time of the blobstore is up to date with the current existing blobs.- Throws:
- IOException- on any error
 
 
-