Package org.apache.druid.segment.loading
Interface URIDataPuller
public interface URIDataPuller
A URIDataPuller has handlings for URI based data
-
Method Summary
Modifier and TypeMethodDescriptiongetInputStream(URI uri) Create a new InputStream based on the URIgetVersion(URI uri) Returns an abstract "version" for the URI.com.google.common.base.Predicate<Throwable>Evaluates a Throwable to see if it is recoverable.
-
Method Details
-
getInputStream
Create a new InputStream based on the URI- Parameters:
uri- The URI to open an Input Stream to- Returns:
- A new InputStream which streams the URI in question
- Throws:
IOException
-
getVersion
Returns an abstract "version" for the URI. The exact meaning of the version is left up to the implementation.- Parameters:
uri- The URI to check- Returns:
- A "version" as interpreted by the URIDataPuller implementation
- Throws:
IOException- on error
-
shouldRetryPredicate
com.google.common.base.Predicate<Throwable> shouldRetryPredicate()Evaluates a Throwable to see if it is recoverable. This is expected to be used in conjunction with the other methods to determine if anything thrown from the method should be retried.- Returns:
- Predicate function indicating if the Throwable is recoverable
-