Class HelixInstanceDataManager
- java.lang.Object
-
- org.apache.pinot.server.starter.helix.HelixInstanceDataManager
-
- All Implemented Interfaces:
InstanceDataManager
@ThreadSafe public class HelixInstanceDataManager extends Object implements InstanceDataManager
The classHelixInstanceDataManageris the instance data manager based on Helix.
-
-
Constructor Summary
Constructors Constructor Description HelixInstanceDataManager()
-
Method Summary
Modifier and Type Method Description voidaddOfflineSegment(String offlineTableName, String segmentName, File indexDir)voidaddOrReplaceSegment(String tableNameWithType, String segmentName)voidaddRealtimeSegment(String realtimeTableName, String segmentName)voiddeleteSegment(String tableNameWithType, String segmentName)voiddeleteTable(String tableNameWithType)voidforceCommit(String tableNameWithType, Set<String> segmentNames)List<org.apache.pinot.segment.spi.SegmentMetadata>getAllSegmentsMetadata(String tableNameWithType)Set<String>getAllTables()StringgetInstanceId()intgetMaxParallelRefreshThreads()org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord>getPropertyStore()FilegetSegmentDataDirectory(String tableNameWithType, String segmentName)Assemble the path to segment dir directly, when table mgr object is not created for the given table yet.StringgetSegmentFileDirectory()org.apache.pinot.segment.spi.SegmentMetadatagetSegmentMetadata(String tableNameWithType, String segmentName)SegmentUploadergetSegmentUploader()org.apache.pinot.segment.local.data.manager.TableDataManagergetTableDataManager(String tableNameWithType)voidinit(PinotConfiguration config, org.apache.helix.HelixManager helixManager, ServerMetrics serverMetrics)voidoffloadSegment(String tableNameWithType, String segmentName)voidreloadAllSegments(String tableNameWithType, boolean forceDownload, SegmentRefreshSemaphore segmentRefreshSemaphore)voidreloadSegment(String tableNameWithType, String segmentName, boolean forceDownload)voidreloadSegments(String tableNameWithType, List<String> segmentNames, boolean forceDownload, SegmentRefreshSemaphore segmentRefreshSemaphore)voidshutDown()voidstart()
-
-
-
Method Detail
-
init
public void init(PinotConfiguration config, org.apache.helix.HelixManager helixManager, ServerMetrics serverMetrics) throws org.apache.commons.configuration.ConfigurationException
- Specified by:
initin interfaceInstanceDataManager- Throws:
org.apache.commons.configuration.ConfigurationException
-
getInstanceId
public String getInstanceId()
- Specified by:
getInstanceIdin interfaceInstanceDataManager
-
start
public void start()
- Specified by:
startin interfaceInstanceDataManager
-
shutDown
public void shutDown()
- Specified by:
shutDownin interfaceInstanceDataManager
-
addOfflineSegment
public void addOfflineSegment(String offlineTableName, String segmentName, File indexDir) throws Exception
- Specified by:
addOfflineSegmentin interfaceInstanceDataManager- Throws:
Exception
-
addRealtimeSegment
public void addRealtimeSegment(String realtimeTableName, String segmentName) throws Exception
- Specified by:
addRealtimeSegmentin interfaceInstanceDataManager- Throws:
Exception
-
deleteTable
public void deleteTable(String tableNameWithType) throws Exception
- Specified by:
deleteTablein interfaceInstanceDataManager- Throws:
Exception
-
offloadSegment
public void offloadSegment(String tableNameWithType, String segmentName)
- Specified by:
offloadSegmentin interfaceInstanceDataManager
-
deleteSegment
public void deleteSegment(String tableNameWithType, String segmentName) throws Exception
- Specified by:
deleteSegmentin interfaceInstanceDataManager- Throws:
Exception
-
reloadSegment
public void reloadSegment(String tableNameWithType, String segmentName, boolean forceDownload) throws Exception
- Specified by:
reloadSegmentin interfaceInstanceDataManager- Throws:
Exception
-
reloadAllSegments
public void reloadAllSegments(String tableNameWithType, boolean forceDownload, SegmentRefreshSemaphore segmentRefreshSemaphore) throws Exception
- Specified by:
reloadAllSegmentsin interfaceInstanceDataManager- Throws:
Exception
-
reloadSegments
public void reloadSegments(String tableNameWithType, List<String> segmentNames, boolean forceDownload, SegmentRefreshSemaphore segmentRefreshSemaphore) throws Exception
- Specified by:
reloadSegmentsin interfaceInstanceDataManager- Throws:
Exception
-
addOrReplaceSegment
public void addOrReplaceSegment(String tableNameWithType, String segmentName) throws Exception
- Specified by:
addOrReplaceSegmentin interfaceInstanceDataManager- Throws:
Exception
-
getAllTables
public Set<String> getAllTables()
- Specified by:
getAllTablesin interfaceInstanceDataManager
-
getTableDataManager
@Nullable public org.apache.pinot.segment.local.data.manager.TableDataManager getTableDataManager(String tableNameWithType)
- Specified by:
getTableDataManagerin interfaceInstanceDataManager
-
getSegmentMetadata
@Nullable public org.apache.pinot.segment.spi.SegmentMetadata getSegmentMetadata(String tableNameWithType, String segmentName)
- Specified by:
getSegmentMetadatain interfaceInstanceDataManager
-
getAllSegmentsMetadata
public List<org.apache.pinot.segment.spi.SegmentMetadata> getAllSegmentsMetadata(String tableNameWithType)
- Specified by:
getAllSegmentsMetadatain interfaceInstanceDataManager
-
getSegmentDataDirectory
public File getSegmentDataDirectory(String tableNameWithType, String segmentName)
Assemble the path to segment dir directly, when table mgr object is not created for the given table yet.- Specified by:
getSegmentDataDirectoryin interfaceInstanceDataManager
-
getSegmentFileDirectory
public String getSegmentFileDirectory()
- Specified by:
getSegmentFileDirectoryin interfaceInstanceDataManager
-
getMaxParallelRefreshThreads
public int getMaxParallelRefreshThreads()
- Specified by:
getMaxParallelRefreshThreadsin interfaceInstanceDataManager
-
getPropertyStore
public org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> getPropertyStore()
- Specified by:
getPropertyStorein interfaceInstanceDataManager
-
getSegmentUploader
public SegmentUploader getSegmentUploader()
- Specified by:
getSegmentUploaderin interfaceInstanceDataManager
-
forceCommit
public void forceCommit(String tableNameWithType, Set<String> segmentNames)
- Specified by:
forceCommitin interfaceInstanceDataManager
-
-