Package org.apache.flink.runtime.blob
Class VoidBlobWriter
java.lang.Object
org.apache.flink.runtime.blob.VoidBlobWriter
- All Implemented Interfaces:
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.
-
Field Summary
Fields inherited from interface org.apache.flink.runtime.blob.BlobWriter
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeletePermanent(org.apache.flink.api.common.JobID jobId, PermanentBlobKey key) Delete the uploaded data with the givenJobIDandPermanentBlobKey.static VoidBlobWriterintReturns the min size before data will be offloaded to the BLOB store.putPermanent(org.apache.flink.api.common.JobID jobId, byte[] value) Uploads the data of the given byte array for the given job to the BLOB server and makes it a permanent BLOB.putPermanent(org.apache.flink.api.common.JobID jobId, InputStream inputStream) Uploads the data from the given input stream for the given job to the BLOB server and makes it a permanent BLOB.
-
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:BlobWriterUploads the data of the given byte array for the given job to the BLOB server and makes it a permanent BLOB.- Specified by:
putPermanentin interfaceBlobWriter- Parameters:
jobId- the ID of the job the BLOB belongs tovalue- 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:BlobWriterUploads the data from the given input stream for the given job to the BLOB server and makes it a permanent BLOB.- Specified by:
putPermanentin interfaceBlobWriter- Parameters:
jobId- ID of the job this blob belongs toinputStream- 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
Description copied from interface:BlobWriterDelete the uploaded data with the givenJobIDandPermanentBlobKey.- Specified by:
deletePermanentin interfaceBlobWriter- Parameters:
jobId- ID of the job this blob belongs tokey- the key of this blob
-
getMinOffloadingSize
public int getMinOffloadingSize()Description copied from interface:BlobWriterReturns the min size before data will be offloaded to the BLOB store.- Specified by:
getMinOffloadingSizein interfaceBlobWriter- Returns:
- minimum offloading size
-
getInstance
-