Package kieker.analysis.generic.source
Class CsvRowReaderProducerStage<T>
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractProducerStage<T>
kieker.analysis.generic.source.CsvRowReaderProducerStage<T>
- Type Parameters:
T
- ICsvRecord datatype
public class CsvRowReaderProducerStage<T>
extends teetime.framework.AbstractProducerStage<T>
Reader for a single CSV file. Every row is outputed as one event.
- Since:
- 2.0.0
- Author:
- Reiner Jung
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CsvRowReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz)
Read a single CSV file. -
Method Summary
Modifier and Type Method Description protected void
execute()
Methods inherited from class teetime.framework.AbstractProducerStage
getOutputPort, getTerminationStrategy
Methods inherited from class teetime.framework.AbstractStage
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Constructor Details
-
CsvRowReaderProducerStage
public CsvRowReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz) throws java.io.IOExceptionRead a single CSV file.- Parameters:
path
- file pathseparator
- string containing the separator symbol for cellsquoteSymbol
- quote symbol used for cellsescapeSymbol
- escape characterheader
- indicate how to interpret the first line in the CSV file, set to true to indicate that the first line contains the header informationclazz
- bean class- Throws:
java.io.IOException
- when a stream could not be opened.
-
-
Method Details
-
execute
protected void execute() throws java.lang.Exception- Specified by:
execute
in classteetime.framework.AbstractStage
- Throws:
java.lang.Exception
-