public class AZBlobEmitter extends AbstractEmitter implements Initializable, StreamEmitter
Constructor and Description |
---|
AZBlobEmitter() |
Modifier and Type | Method and Description |
---|---|
void |
checkInitialization(InitializableProblemHandler problemHandler) |
void |
emit(String path,
InputStream is,
Metadata userMetadata) |
void |
emit(String emitKey,
List<Metadata> metadataList)
Requires the src-bucket/path/to/my/file.txt in the
TikaCoreProperties.SOURCE_PATH . |
void |
initialize(Map<String,Param> params)
This initializes the az blob container client
|
void |
setContainer(String container) |
void |
setEndpoint(String endpoint) |
void |
setFileExtension(String fileExtension)
If you want to customize the output file's file extension.
|
void |
setOverwriteExisting(boolean overwriteExisting) |
void |
setPrefix(String prefix) |
void |
setSasToken(String sasToken) |
emit, getName, setName
public void emit(String emitKey, List<Metadata> metadataList) throws IOException, TikaEmitterException
TikaCoreProperties.SOURCE_PATH
.emit
in interface Emitter
metadataList
- IOException
TikaException
TikaEmitterException
public void emit(String path, InputStream is, Metadata userMetadata) throws IOException, TikaEmitterException
emit
in interface StreamEmitter
path
- object path; prefix will be prependedis
- inputStream to copy, if a TikaInputStream contains an underlying file,
the client will upload the file; if a content-length is included in the
metadata, the client will upload the stream with the content-length;
otherwise, the client will copy the stream to a byte array and then
upload.userMetadata
- this will be written to the az blob's properties.metadataTikaEmitterException
- or IOexception if there is a Runtime client exceptionIOException
@Field public void setOverwriteExisting(boolean overwriteExisting)
@Field public void setFileExtension(String fileExtension)
fileExtension
- public void initialize(Map<String,Param> params) throws TikaConfigException
initialize
in interface Initializable
params
- params to use for initializationTikaConfigException
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization
in interface Initializable
problemHandler
- if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigException
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.