Class 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 a BeamlineAbstractSource produces BEvent according to the rows contained in a CSV file.
    Author:
    Andrea Burattin
    See Also:
    Serialized Form
    • 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 file
        caseIdColumn - 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 file
        caseIdColumn - 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)
    • Method Detail

      • run

        public void run​(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<BEvent> ctx)
                 throws Exception
        Throws:
        Exception