Class AZBlobEmitter
- java.lang.Object
- 
- org.apache.tika.pipes.emitter.AbstractEmitter
- 
- org.apache.tika.pipes.emitter.azblob.AZBlobEmitter
 
 
- 
- All Implemented Interfaces:
- Initializable,- Emitter,- StreamEmitter
 
 public class AZBlobEmitter extends AbstractEmitter implements Initializable, StreamEmitter Emit files to Azure blob storage. Must set endpoint, sasToken and container via config.
- 
- 
Constructor SummaryConstructors Constructor Description AZBlobEmitter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)voidemit(String path, InputStream is, Metadata userMetadata)voidemit(String emitKey, List<Metadata> metadataList)Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH.voidinitialize(Map<String,Param> params)This initializes the az blob container clientvoidsetContainer(String container)voidsetEndpoint(String endpoint)voidsetFileExtension(String fileExtension)If you want to customize the output file's file extension.voidsetOverwriteExisting(boolean overwriteExisting)voidsetPrefix(String prefix)voidsetSasToken(String sasToken)- 
Methods inherited from class org.apache.tika.pipes.emitter.AbstractEmitteremit, getName, setName
 
- 
 
- 
- 
- 
Method Detail- 
emitpublic void emit(String emitKey, List<Metadata> metadataList) throws IOException, TikaEmitterException Requires the src-bucket/path/to/my/file.txt in theTikaCoreProperties.SOURCE_PATH.- Specified by:
- emitin interface- Emitter
- Parameters:
- metadataList-
- Throws:
- IOException
- TikaException
- TikaEmitterException
 
 - 
emitpublic void emit(String path, InputStream is, Metadata userMetadata) throws IOException, TikaEmitterException - Specified by:
- emitin interface- StreamEmitter
- Parameters:
- path- object path; prefix will be prepended
- is- 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.metadata
- Throws:
- TikaEmitterException- or IOexception if there is a Runtime client exception
- IOException
 
 - 
setOverwriteExisting@Field public void setOverwriteExisting(boolean overwriteExisting) 
 - 
setFileExtension@Field public void setFileExtension(String fileExtension) If you want to customize the output file's file extension. Do not include the "."- Parameters:
- fileExtension-
 
 - 
initializepublic void initialize(Map<String,Param> params) throws TikaConfigException This initializes the az blob container client- Specified by:
- initializein interface- Initializable
- Parameters:
- params- params to use for initialization
- Throws:
- TikaConfigException
 
 - 
checkInitializationpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
- checkInitializationin interface- Initializable
- Parameters:
- problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.
- Throws:
- TikaConfigException
 
 
- 
 
-