@VisibleForTesting public class VoidBlobWriter extends Object implements BlobWriter
LOG
Constructor and Description |
---|
VoidBlobWriter() |
Modifier and Type | Method and Description |
---|---|
static VoidBlobWriter |
getInstance() |
int |
getMinOffloadingSize()
Returns the min size before data will be offloaded to the BLOB store.
|
PermanentBlobKey |
putPermanent(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.
|
PermanentBlobKey |
putPermanent(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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serializeAndTryOffload
public PermanentBlobKey putPermanent(JobID jobId, byte[] value) throws IOException
BlobWriter
putPermanent
in interface BlobWriter
jobId
- the ID of the job the BLOB belongs tovalue
- the buffer to uploadIOException
- thrown if an I/O error occurs while writing it to a local file, or uploading it to the HA
storepublic PermanentBlobKey putPermanent(JobID jobId, InputStream inputStream) throws IOException
BlobWriter
putPermanent
in interface BlobWriter
jobId
- ID of the job this blob belongs toinputStream
- the input stream to read the data fromIOException
- 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 storepublic int getMinOffloadingSize()
BlobWriter
getMinOffloadingSize
in interface BlobWriter
public static VoidBlobWriter getInstance()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.