Package org.apache.storm.blobstore

# Class FileBlobStoreImpl

java.lang.Object
org.apache.storm.blobstore.FileBlobStoreImpl

public class FileBlobStoreImpl extends Object
Very basic blob store impl with no ACL handling.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `FileBlobStoreImpl.KeyInHashDirIterator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileBlobStoreImpl(File path, Map<String,Object> conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `delete(File 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 Iterator<LocalFsBlobStoreFile>`
  `listBlobStoreFiles(File path)`
  `Iterator<String>`
  `listKeys()`
  List keys.
  `protected Iterator<String>`
  `listKeys(File path)`
  `LocalFsBlobStoreFile`
  `read(String key)`
  Get an input stream for reading a part.
  `void`
  `shutdown()`
  `LocalFsBlobStoreFile`
  `write(String key, boolean create)`
  Get an object tied to writing the data.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FileBlobStoreImpl

    public FileBlobStoreImpl(File path, Map<String,Object> conf) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### listKeys

    public Iterator<String> listKeys() throws IOException
    List keys.
    Returns:
      all keys that are available for reading
    Throws:
      `IOException` - on any error

  - ### listKeys

    protected Iterator<String> listKeys(File path) throws IOException
    Throws:
      `IOException`

  - ### read

    public LocalFsBlobStoreFile read(String key) throws IOException
    Get 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

  - ### write

    public LocalFsBlobStoreFile write(String key, boolean create) throws IOException
    Get an object tied to writing the data.
    Parameters:
      `key` - the key of the part to write to.
    Returns:
      an object that can be used to both write to, but also commit/cancel the operation.
    Throws:
      `IOException` - on any error

  - ### exists

    public boolean exists(String key)
    Check if the key exists in the blob store.
    Parameters:
      `key` - the key to check for
    Returns:
      true if it exists else false.

  - ### deleteKey

    public void deleteKey(String key) throws IOException
    Delete a key from the blob store.
    Parameters:
      `key` - the key to delete
    Throws:
      `IOException` - on any error

  - ### fullCleanup

    public void fullCleanup(long age) throws IOException
    Throws:
      `IOException`

  - ### listBlobStoreFiles

    protected Iterator<LocalFsBlobStoreFile> listBlobStoreFiles(File path) throws IOException
    Throws:
      `IOException`

  - ### delete

    protected void delete(File path) throws IOException
    Throws:
      `IOException`

  - ### shutdown

    public void shutdown()