public class LogStreamProcessor extends Object implements StreamProcessor
| Modifier and Type | Field and Description | 
|---|---|
protected LogManager | 
manager  | 
protected List<ComputationPool> | 
pools  | 
protected Settings | 
settings  | 
protected Topology | 
topology  | 
| Constructor and Description | 
|---|
LogStreamProcessor(LogManager manager)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
drainAndStop(Duration timeout)
Stop computations when input streams are empty. 
 | 
protected Codec<Record> | 
getCodecForStreams(String name,
                  Set<String> streams)  | 
protected List<List<LogPartition>> | 
getDefaultAssignments(ComputationMetadataMapping meta)  | 
Latency | 
getLatency(String computationName)
Returns the latency for a computation. 
 | 
long | 
getLowWatermark()
Returns the low watermark for all the computations of the topology. 
 | 
long | 
getLowWatermark(String computationName)
Returns the low watermark for the computation. 
 | 
StreamProcessor | 
init(Topology topology,
    Settings settings)
Initialize streams, but don't run the computations 
 | 
protected List<ComputationPool> | 
initPools()  | 
protected void | 
initSourceAppenders()  | 
protected void | 
initStreams()  | 
boolean | 
isDone(long timestamp)
Returns true if all messages with a lower timestamp has been processed by the topology. 
 | 
boolean | 
isTerminated()
True if there is no active processing threads. 
 | 
void | 
shutdown()
Shutdown immediately. 
 | 
void | 
start()
Run the initialized computations. 
 | 
boolean | 
stop(Duration timeout)
Try to stop computations gracefully after processing a record or a timer within the timeout duration. 
 | 
boolean | 
waitForAssignments(Duration timeout)
Wait for the computations to have assigned partitions ready to process records. 
 | 
protected final LogManager manager
protected List<ComputationPool> pools
public LogStreamProcessor(LogManager manager)
public StreamProcessor init(Topology topology, Settings settings)
StreamProcessorinit in interface StreamProcessorpublic void start()
StreamProcessorstart in interface StreamProcessorpublic boolean waitForAssignments(Duration timeout) throws InterruptedException
StreamProcessortrue if all computations have assigned partitions during the timeout delay.waitForAssignments in interface StreamProcessorInterruptedExceptionpublic boolean isTerminated()
StreamProcessorisTerminated in interface StreamProcessorpublic boolean stop(Duration timeout)
StreamProcessorstop in interface StreamProcessorpublic boolean drainAndStop(Duration timeout)
StreamProcessortrue if computations are stopped during the timeout delay.drainAndStop in interface StreamProcessorpublic void shutdown()
StreamProcessorshutdown in interface StreamProcessorpublic long getLowWatermark()
StreamProcessorgetLowWatermark in interface StreamProcessorpublic Latency getLatency(String computationName)
StreamProcessorgetLatency in interface StreamProcessorpublic long getLowWatermark(String computationName)
StreamProcessorgetLowWatermark in interface StreamProcessorpublic boolean isDone(long timestamp)
StreamProcessorisDone in interface StreamProcessorprotected List<ComputationPool> initPools()
protected List<List<LogPartition>> getDefaultAssignments(ComputationMetadataMapping meta)
protected void initStreams()
protected void initSourceAppenders()
Copyright © 2019 Nuxeo. All rights reserved.