Class AppenderatorPlumber
- java.lang.Object
-
- org.apache.druid.segment.realtime.appenderator.AppenderatorPlumber
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.realtime.plumber.Plumber
DUPLICATE, NOT_WRITABLE, THROWAWAY
-
-
Constructor Summary
Constructors Constructor Description AppenderatorPlumber(DataSchema schema, RealtimeTuningConfig config, FireDepartmentMetrics metrics, DataSegmentAnnouncer segmentAnnouncer, SegmentPublisher segmentPublisher, SegmentHandoffNotifier handoffNotifier, Appenderator appenderator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.druid.segment.incremental.IncrementalIndexAddResultadd(org.apache.druid.data.input.InputRow row, com.google.common.base.Supplier<org.apache.druid.data.input.Committer> committerSupplier)voiddropSegment(SegmentIdWithShardSpec identifier)voidfinishJob()Perform any final processing and clean up after ourselves.RealtimeTuningConfiggetConfig()<T> org.apache.druid.query.QueryRunner<T>getQueryRunner(org.apache.druid.query.Query<T> query)RejectionPolicygetRejectionPolicy()DataSchemagetSchema()Map<Long,SegmentIdWithShardSpec>getSegmentsView()protected voidinitializeExecutors()voidpersist(org.apache.druid.data.input.Committer committer)Persist any in-memory indexed data to durable storage.protected voidshutdownExecutors()ObjectstartJob()Perform any initial setup.
-
-
-
Constructor Detail
-
AppenderatorPlumber
public AppenderatorPlumber(DataSchema schema, RealtimeTuningConfig config, FireDepartmentMetrics metrics, DataSegmentAnnouncer segmentAnnouncer, SegmentPublisher segmentPublisher, SegmentHandoffNotifier handoffNotifier, Appenderator appenderator)
-
-
Method Detail
-
getSegmentsView
public Map<Long,SegmentIdWithShardSpec> getSegmentsView()
-
getSchema
public DataSchema getSchema()
-
getConfig
public RealtimeTuningConfig getConfig()
-
getRejectionPolicy
public RejectionPolicy getRejectionPolicy()
-
startJob
public Object startJob()
Description copied from interface:PlumberPerform any initial setup. Should be called before using any other methods, and should be paired with a corresponding call toPlumber.finishJob().
-
add
public org.apache.druid.segment.incremental.IncrementalIndexAddResult add(org.apache.druid.data.input.InputRow row, com.google.common.base.Supplier<org.apache.druid.data.input.Committer> committerSupplier) throws org.apache.druid.segment.incremental.IndexSizeExceededException- Specified by:
addin interfacePlumber- Parameters:
row- the row to insertcommitterSupplier- supplier of a committer associated with all data that has been added, including this row- Returns:
- IncrementalIndexAddResult whose rowCount - positive numbers indicate how many summarized rows exist in the index for that timestamp, -1 means a row was thrown away because it was too late -2 means a row was thrown away because it is duplicate
- Throws:
org.apache.druid.segment.incremental.IndexSizeExceededException
-
getQueryRunner
public <T> org.apache.druid.query.QueryRunner<T> getQueryRunner(org.apache.druid.query.Query<T> query)
- Specified by:
getQueryRunnerin interfacePlumber
-
persist
public void persist(org.apache.druid.data.input.Committer committer)
Description copied from interface:PlumberPersist any in-memory indexed data to durable storage. This may be only somewhat durable, e.g. the machine's local disk.
-
finishJob
public void finishJob()
Description copied from interface:PlumberPerform any final processing and clean up after ourselves. Should be called after all data has been fed into sinks and persisted.
-
initializeExecutors
protected void initializeExecutors()
-
shutdownExecutors
protected void shutdownExecutors()
-
dropSegment
public void dropSegment(SegmentIdWithShardSpec identifier)
-
-