public class RealtimePlumber extends Object implements Plumber
Constructor and Description |
---|
RealtimePlumber(DataSchema schema,
RealtimeTuningConfig config,
FireDepartmentMetrics metrics,
com.metamx.emitter.service.ServiceEmitter emitter,
QueryRunnerFactoryConglomerate conglomerate,
DataSegmentAnnouncer segmentAnnouncer,
ExecutorService queryExecutorService,
DataSegmentPusher dataSegmentPusher,
SegmentPublisher segmentPublisher,
SegmentHandoffNotifier handoffNotifier,
IndexMerger indexMerger,
IndexIO indexIO,
Cache cache,
CacheConfig cacheConfig,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
protected void |
abandonSegment(long truncatedTime,
Sink sink)
Unannounces a given sink and removes all local references to it.
|
int |
add(InputRow row,
com.google.common.base.Supplier<Committer> committerSupplier) |
protected Object |
bootstrapSinksFromDisk() |
protected File |
computeBaseDir(DataSchema schema) |
protected File |
computeCorruptedFileDumpDir(File persistDir,
DataSchema schema) |
protected File |
computePersistDir(DataSchema schema,
org.joda.time.Interval interval) |
void |
finishJob()
Perform any final processing and clean up after ourselves.
|
RealtimeTuningConfig |
getConfig() |
<T> QueryRunner<T> |
getQueryRunner(Query<T> query) |
RejectionPolicy |
getRejectionPolicy() |
DataSchema |
getSchema() |
Map<Long,Sink> |
getSinks() |
protected void |
initializeExecutors() |
void |
persist(Committer committer)
Persist any in-memory indexed data to durable storage.
|
protected int |
persistHydrant(FireHydrant indexToPersist,
DataSchema schema,
org.joda.time.Interval interval,
Map<String,Object> metadataElems)
Persists the given hydrant and returns the number of rows persisted
|
protected void |
shutdownExecutors() |
Object |
startJob()
Perform any initial setup.
|
protected void |
startPersistThread() |
public RealtimePlumber(DataSchema schema, RealtimeTuningConfig config, FireDepartmentMetrics metrics, com.metamx.emitter.service.ServiceEmitter emitter, QueryRunnerFactoryConglomerate conglomerate, DataSegmentAnnouncer segmentAnnouncer, ExecutorService queryExecutorService, DataSegmentPusher dataSegmentPusher, SegmentPublisher segmentPublisher, SegmentHandoffNotifier handoffNotifier, IndexMerger indexMerger, IndexIO indexIO, Cache cache, CacheConfig cacheConfig, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public DataSchema getSchema()
public RealtimeTuningConfig getConfig()
public RejectionPolicy getRejectionPolicy()
public Object startJob()
Plumber
Plumber.finishJob()
.public int add(InputRow row, com.google.common.base.Supplier<Committer> committerSupplier) throws IndexSizeExceededException
add
in interface Plumber
row
- the row to insertcommitterSupplier
- supplier of a committer associated with all data that has been added, including this rowIndexSizeExceededException
public <T> QueryRunner<T> getQueryRunner(Query<T> query)
getQueryRunner
in interface Plumber
public void persist(Committer committer)
Plumber
public void finishJob()
Plumber
protected void initializeExecutors()
protected void shutdownExecutors()
protected Object bootstrapSinksFromDisk()
protected void startPersistThread()
protected void abandonSegment(long truncatedTime, Sink sink)
truncatedTime
- sink keysink
- sink to unannounceprotected File computeBaseDir(DataSchema schema)
protected File computeCorruptedFileDumpDir(File persistDir, DataSchema schema)
protected File computePersistDir(DataSchema schema, org.joda.time.Interval interval)
protected int persistHydrant(FireHydrant indexToPersist, DataSchema schema, org.joda.time.Interval interval, Map<String,Object> metadataElems)
indexToPersist
- hydrant to persistschema
- datasource schemainterval
- interval to persistCopyright © 2011–2017. All rights reserved.