Class TierBasedSegmentDirectoryLoader
- java.lang.Object
-
- org.apache.pinot.segment.local.loader.TierBasedSegmentDirectoryLoader
-
- All Implemented Interfaces:
SegmentDirectoryLoader
public class TierBasedSegmentDirectoryLoader extends Object implements SegmentDirectoryLoader
Implementation ofSegmentDirectoryLoaderthat can move segments across data dirs configured as storage tiers.
-
-
Constructor Summary
Constructors Constructor Description TierBasedSegmentDirectoryLoader()
-
Method Summary
Modifier and Type Method Description voiddelete(SegmentDirectoryLoaderContext segmentLoaderContext)Delete segment data on the last known tier as tracked in the tier track file.SegmentDirectoryload(URI indexDir, SegmentDirectoryLoaderContext segmentLoaderContext)Creates and loads theSegmentLocalFSDirectorywhich is the default implementation ofSegmentDirectory
-
-
-
Method Detail
-
load
public SegmentDirectory load(URI indexDir, SegmentDirectoryLoaderContext segmentLoaderContext) throws Exception
Creates and loads theSegmentLocalFSDirectorywhich is the default implementation ofSegmentDirectory- Specified by:
loadin interfaceSegmentDirectoryLoader- Parameters:
indexDir- the current segment index directorysegmentLoaderContext- context for instantiation of the SegmentDirectory. The target tier set in context is used to decide which data directory to keep the segment data.- Returns:
- instance of
SegmentLocalFSDirectory - Throws:
Exception
-
delete
public void delete(SegmentDirectoryLoaderContext segmentLoaderContext) throws Exception
Delete segment data on the last known tier as tracked in the tier track file.- Specified by:
deletein interfaceSegmentDirectoryLoader- Throws:
Exception
-
-