Class AZBlobFetcher
- java.lang.Object
-
- org.apache.tika.pipes.fetcher.AbstractFetcher
-
- org.apache.tika.pipes.fetcher.azblob.AZBlobFetcher
-
- All Implemented Interfaces:
Initializable,Fetcher
public class AZBlobFetcher extends AbstractFetcher implements Initializable
Fetches files from Azure blob storage.There are two modes: 1) If you are only using one endpoint and one sas token and one container, configure those in the config file. In this case, your fetchKey will be the path in the container to the blob. 2) If you have different endpoints or sas tokens or containers across your requests, your fetchKey will be the complete SAS url pointing to the blob.
-
-
Constructor Summary
Constructors Constructor Description AZBlobFetcher()AZBlobFetcher(AZBlobFetcherConfig azBlobFetcherConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)InputStreamfetch(String fetchKey, Metadata metadata, ParseContext parseContext)voidinitialize(Map<String,Param> params)This initializes the az blob container clientvoidsetContainer(String container)voidsetEndpoint(String endpoint)voidsetExtractUserMetadata(boolean extractUserMetadata)Whether or not to extract user metadata from the blob objectvoidsetSasToken(String sasToken)voidsetSpoolToTemp(boolean spoolToTemp)-
Methods inherited from class org.apache.tika.pipes.fetcher.AbstractFetcher
getName, setName
-
-
-
-
Constructor Detail
-
AZBlobFetcher
public AZBlobFetcher()
-
AZBlobFetcher
public AZBlobFetcher(AZBlobFetcherConfig azBlobFetcherConfig)
-
-
Method Detail
-
fetch
public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException
- Specified by:
fetchin interfaceFetcher- Throws:
TikaExceptionIOException
-
setSpoolToTemp
@Field public void setSpoolToTemp(boolean spoolToTemp)
-
setExtractUserMetadata
@Field public void setExtractUserMetadata(boolean extractUserMetadata)
Whether or not to extract user metadata from the blob object- Parameters:
extractUserMetadata-
-
initialize
public void initialize(Map<String,Param> params) throws TikaConfigException
This initializes the az blob container client- Specified by:
initializein interfaceInitializable- Parameters:
params- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
- Specified by:
checkInitializationin interfaceInitializable- Parameters:
problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-
-