Class FileSystemBlobStore

    • Method Detail

      • put

        public boolean put​(File localFile,
                           JobID jobId,
                           BlobKey blobKey)
                    throws IOException
        Description copied from interface: BlobStore
        Copies the local file to the blob store.
        Specified by:
        put in interface BlobStore
        Parameters:
        localFile - The file to copy
        jobId - ID of the job this blob belongs to (or null if job-unrelated)
        blobKey - The ID for the file in the blob store
        Returns:
        whether the file was copied (true) or not (false)
        Throws:
        IOException - If the copy fails
      • get

        public boolean get​(JobID jobId,
                           BlobKey blobKey,
                           File localFile)
                    throws IOException
        Description copied from interface: BlobView
        Copies a blob to a local file.
        Specified by:
        get in interface BlobView
        Parameters:
        jobId - ID of the job this blob belongs to (or null if job-unrelated)
        blobKey - The blob ID
        localFile - The local file to copy to
        Returns:
        whether the file was copied (true) or not (false)
        Throws:
        IOException - If the copy fails
      • delete

        public boolean delete​(JobID jobId,
                              BlobKey blobKey)
        Description copied from interface: BlobStore
        Tries to delete a blob from storage.

        NOTE: This also tries to delete any created directories if empty.

        Specified by:
        delete in interface BlobStore
        Parameters:
        jobId - ID of the job this blob belongs to (or null if job-unrelated)
        blobKey - The blob ID
        Returns:
        true if the given blob is successfully deleted or non-existing; false otherwise
      • deleteAll

        public boolean deleteAll​(JobID jobId)
        Description copied from interface: BlobStore
        Tries to delete all blobs for the given job from storage.

        NOTE: This also tries to delete any created directories if empty.

        Specified by:
        deleteAll in interface BlobStore
        Parameters:
        jobId - The JobID part of all blobs to delete
        Returns:
        true if the job directory is successfully deleted or non-existing; false otherwise