Class VoidBlobWriter

java.lang.Object
org.apache.flink.runtime.blob.VoidBlobWriter
All Implemented Interfaces:
BlobWriter

@VisibleForTesting public class VoidBlobWriter extends Object implements BlobWriter
BlobWriter which does not support writing BLOBs to a store. This class is mainly used for testing purposes where we don't want to store data in the BLOB store.
  • Constructor Details

    • VoidBlobWriter

      public VoidBlobWriter()
  • Method Details

    • putPermanent

      public PermanentBlobKey putPermanent(org.apache.flink.api.common.JobID jobId, byte[] value) throws IOException
      Description copied from interface: BlobWriter
      Uploads the data of the given byte array for the given job to the BLOB server and makes it a permanent BLOB.
      Specified by:
      putPermanent in interface BlobWriter
      Parameters:
      jobId - the ID of the job the BLOB belongs to
      value - the buffer to upload
      Returns:
      the computed BLOB key identifying the BLOB on the server
      Throws:
      IOException - thrown if an I/O error occurs while writing it to a local file, or uploading it to the HA store
    • putPermanent

      public PermanentBlobKey putPermanent(org.apache.flink.api.common.JobID jobId, InputStream inputStream) throws IOException
      Description copied from interface: BlobWriter
      Uploads the data from the given input stream for the given job to the BLOB server and makes it a permanent BLOB.
      Specified by:
      putPermanent in interface BlobWriter
      Parameters:
      jobId - ID of the job this blob belongs to
      inputStream - the input stream to read the data from
      Returns:
      the computed BLOB key identifying the BLOB on the server
      Throws:
      IOException - thrown if an I/O error occurs while reading the data from the input stream, writing it to a local file, or uploading it to the HA store
    • deletePermanent

      public boolean deletePermanent(org.apache.flink.api.common.JobID jobId, PermanentBlobKey key)
      Description copied from interface: BlobWriter
      Delete the uploaded data with the given JobID and PermanentBlobKey.
      Specified by:
      deletePermanent in interface BlobWriter
      Parameters:
      jobId - ID of the job this blob belongs to
      key - the key of this blob
    • getMinOffloadingSize

      public int getMinOffloadingSize()
      Description copied from interface: BlobWriter
      Returns the min size before data will be offloaded to the BLOB store.
      Specified by:
      getMinOffloadingSize in interface BlobWriter
      Returns:
      minimum offloading size
    • getInstance

      public static VoidBlobWriter getInstance()