Class HdfsBlobStoreImpl


  • public class HdfsBlobStoreImpl
    extends Object
    HDFS blob store impl.
    • Field Detail

      • BLOBSTORE_DIR_PERMISSION

        public static final org.apache.hadoop.fs.permission.FsPermission BLOBSTORE_DIR_PERMISSION
    • Method Detail

      • read

        public BlobStoreFile 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 BlobStoreFile 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.
        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
      • 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
      • getKeyDir

        protected org.apache.hadoop.fs.Path getKeyDir​(String key)
      • shutdown

        public void shutdown()
      • getLastBlobUpdateTime

        public long getLastBlobUpdateTime()
                                   throws IOException
        Get the last update time of any blob.
        Returns:
        the last updated time of blobs within the blobstore.
        Throws:
        IOException - on any error
      • updateLastBlobUpdateTime

        public void updateLastBlobUpdateTime()
                                      throws IOException
        Updates the last updated time of existing blobstores to the current time.
        Throws:
        IOException - on any error
      • validateBlobUpdateTime

        public void validateBlobUpdateTime()
                                    throws IOException
        Validates that the last updated blob time of the blobstore is up to date with the current existing blobs.
        Throws:
        IOException - on any error