Class ConcurrentMapPartitionUpsertMetadataManager
- java.lang.Object
-
- org.apache.pinot.segment.local.upsert.BasePartitionUpsertMetadataManager
-
- org.apache.pinot.segment.local.upsert.ConcurrentMapPartitionUpsertMetadataManager
-
- All Implemented Interfaces:
Closeable,AutoCloseable,PartitionUpsertMetadataManager
@ThreadSafe public class ConcurrentMapPartitionUpsertMetadataManager extends BasePartitionUpsertMetadataManager
Implementation ofPartitionUpsertMetadataManagerthat is backed by aConcurrentHashMap.
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.segment.local.upsert.BasePartitionUpsertMetadataManager
_closed, _comparisonColumn, _enableSnapshot, _hashFunction, _lastOutOfOrderEventReportTimeNs, _logger, _numOutOfOrderEvents, _partialUpsertHandler, _partitionId, _primaryKeyColumns, _replacedSegments, _serverMetrics, _tableNameWithType, OUT_OF_ORDER_EVENT_MIN_REPORT_INTERVAL_NS
-
-
Constructor Summary
Constructors Constructor Description ConcurrentMapPartitionUpsertMetadataManager(String tableNameWithType, int partitionId, List<String> primaryKeyColumns, String comparisonColumn, HashFunction hashFunction, PartialUpsertHandler partialUpsertHandler, boolean enableSnapshot, ServerMetrics serverMetrics)
-
Method Summary
Modifier and Type Method Description protected voidaddOrReplaceSegment(ImmutableSegmentImpl segment, ThreadSafeMutableRoaringBitmap validDocIds, Iterator<RecordInfo> recordInfoIterator, IndexSegment oldSegment, org.roaringbitmap.buffer.MutableRoaringBitmap validDocIdsForOldSegment)voidaddRecord(MutableSegment segment, RecordInfo recordInfo)Updates the upsert metadata for a new consumed record in the given consuming segment.protected longgetNumPrimaryKeys()protected voidremoveSegment(IndexSegment segment, org.roaringbitmap.buffer.MutableRoaringBitmap validDocIds)GenericRowupdateRecord(GenericRow record, RecordInfo recordInfo)Returns the merged record when partial-upsert is enabled.-
Methods inherited from class org.apache.pinot.segment.local.upsert.BasePartitionUpsertMetadataManager
addSegment, addSegment, close, getPrimaryKeyColumns, handleOutOfOrderEvent, removeSegment, replaceSegment, replaceSegment
-
-
-
-
Constructor Detail
-
ConcurrentMapPartitionUpsertMetadataManager
public ConcurrentMapPartitionUpsertMetadataManager(String tableNameWithType, int partitionId, List<String> primaryKeyColumns, String comparisonColumn, HashFunction hashFunction, @Nullable PartialUpsertHandler partialUpsertHandler, boolean enableSnapshot, ServerMetrics serverMetrics)
-
-
Method Detail
-
getNumPrimaryKeys
protected long getNumPrimaryKeys()
- Specified by:
getNumPrimaryKeysin classBasePartitionUpsertMetadataManager
-
addOrReplaceSegment
protected void addOrReplaceSegment(ImmutableSegmentImpl segment, ThreadSafeMutableRoaringBitmap validDocIds, Iterator<RecordInfo> recordInfoIterator, @Nullable IndexSegment oldSegment, @Nullable org.roaringbitmap.buffer.MutableRoaringBitmap validDocIdsForOldSegment)
- Specified by:
addOrReplaceSegmentin classBasePartitionUpsertMetadataManager
-
removeSegment
protected void removeSegment(IndexSegment segment, org.roaringbitmap.buffer.MutableRoaringBitmap validDocIds)
- Specified by:
removeSegmentin classBasePartitionUpsertMetadataManager
-
addRecord
public void addRecord(MutableSegment segment, RecordInfo recordInfo)
Description copied from interface:PartitionUpsertMetadataManagerUpdates the upsert metadata for a new consumed record in the given consuming segment.
-
updateRecord
public GenericRow updateRecord(GenericRow record, RecordInfo recordInfo)
Description copied from interface:PartitionUpsertMetadataManagerReturns the merged record when partial-upsert is enabled.
-
-