Class SegmentFetcherFactory
- java.lang.Object
-
- org.apache.pinot.common.utils.fetcher.SegmentFetcherFactory
-
public class SegmentFetcherFactory extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfetchAndDecryptSegmentToLocal(String uri, File dest, String crypterName)Fetches a segment from a URI location to a local file and decrypts it if neededstatic voidfetchSegmentToLocal(String uri, File dest)Fetches a segment from URI location to local.static voidfetchSegmentToLocal(URI uri, File dest)Fetches a segment from URI location to local.static SegmentFetcherFactorygetInstance()static SegmentFetchergetSegmentFetcher(String protocol)Returns the segment fetcher associated with the given protocol, or the default segment fetcher (HttpSegmentFetcherfor "http" and "https",PinotFSSegmentFetcherfor other protocols).static voidinit(PinotConfiguration config)Initializes the segment fetcher factory.
-
-
-
Method Detail
-
getInstance
public static SegmentFetcherFactory getInstance()
-
init
public static void init(PinotConfiguration config) throws Exception
Initializes the segment fetcher factory. This method should only be called once.- Throws:
Exception
-
getSegmentFetcher
public static SegmentFetcher getSegmentFetcher(String protocol)
Returns the segment fetcher associated with the given protocol, or the default segment fetcher (HttpSegmentFetcherfor "http" and "https",PinotFSSegmentFetcherfor other protocols).
-
fetchSegmentToLocal
public static void fetchSegmentToLocal(URI uri, File dest) throws Exception
Fetches a segment from URI location to local.- Throws:
Exception
-
fetchSegmentToLocal
public static void fetchSegmentToLocal(String uri, File dest) throws Exception
Fetches a segment from URI location to local.- Throws:
Exception
-
-