Class AZBlobFetcher
java.lang.Object
org.apache.tika.pipes.fetcher.AbstractFetcher
org.apache.tika.pipes.fetcher.azblob.AZBlobFetcher
- All Implemented Interfaces:
Initializable
,Fetcher
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInitialization
(InitializableProblemHandler problemHandler) fetch
(String fetchKey, Metadata metadata, ParseContext parseContext) void
initialize
(Map<String, Param> params) This initializes the az blob container clientvoid
setContainer
(String container) void
setEndpoint
(String endpoint) void
setExtractUserMetadata
(boolean extractUserMetadata) Whether or not to extract user metadata from the blob objectvoid
setSasToken
(String sasToken) void
setSpoolToTemp
(boolean spoolToTemp) Methods inherited from class org.apache.tika.pipes.fetcher.AbstractFetcher
getName, setName
-
Constructor Details
-
AZBlobFetcher
public AZBlobFetcher() -
AZBlobFetcher
-
-
Method Details
-
fetch
public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException - Specified by:
fetch
in interfaceFetcher
- Throws:
TikaException
IOException
-
setSpoolToTemp
-
setSasToken
-
setEndpoint
-
setContainer
-
setExtractUserMetadata
Whether or not to extract user metadata from the blob object- Parameters:
extractUserMetadata
-
-
initialize
This initializes the az blob container client- Specified by:
initialize
in interfaceInitializable
- Parameters:
params
- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitialization
in 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
-