Package beamline.sources
Class CSVLogSource
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.source.RichSourceFunction<BEvent>
-
- beamline.sources.BeamlineAbstractSource
-
- beamline.sources.CSVLogSource
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,org.apache.flink.streaming.api.functions.source.SourceFunction<BEvent>
public class CSVLogSource extends BeamlineAbstractSource
This implementation of aBeamlineAbstractSourceproducesBEventaccording to the rows contained in a CSV file.- Author:
- Andrea Burattin
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCSVLogSource.ParserConfigurationThis class is used to configure the parser of the CSV-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.source.SourceFunction
org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description CSVLogSource(String filename, int caseIdColumn, int activityNameColumn)Constructs the sourceCSVLogSource(String filename, int caseIdColumn, int activityNameColumn, CSVLogSource.ParserConfiguration parserConfiguration)Constructs the source by providing a CSV parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<BEvent> ctx)-
Methods inherited from class beamline.sources.BeamlineAbstractSource
cancel, isRunning
-
-
-
-
Constructor Detail
-
CSVLogSource
public CSVLogSource(String filename, int caseIdColumn, int activityNameColumn, CSVLogSource.ParserConfiguration parserConfiguration)
Constructs the source by providing a CSV parser.- Parameters:
filename- the absolute path of the CSV filecaseIdColumn- the id of the column containing the case id (counting starts from 0)activityNameColumn- the id of the column containing the activity name (counting starts from 0)parserConfiguration- the parser configuration to be used for parsing the CSV file
-
CSVLogSource
public CSVLogSource(String filename, int caseIdColumn, int activityNameColumn)
Constructs the source- Parameters:
filename- the absolute path of the CSV filecaseIdColumn- the id of the column containing the case id (counting starts from 0)activityNameColumn- the id of the column containing the activity name (counting starts from 0)
-
-