monitor opencsv {
action onload() {
com.apama.file.OpenFileForReading openCSVFileRead :=
new com.apama.file.OpenFileForReading;
// matches transport in IAF config
openCSVFileRead.transportName := “JMultiFileTransport”;
// the request id to use
openCSVFileRead.requestId := 1;
// read using JCSVCodec
openCSVFileRead.codec := “JCSVCodec”;
// file to read
openCSVFileRead.filename := “C:/Users/Raj Vasa/Downloads/access log_timestamp_new.csv”;
// separator char is a “,”
openCSVFileRead.payload[“separator”] := “,”;
openCSVFileRead.payload[“excelCompatible”]:=“true” ;
// emit event to channel in config.
on com.apama.file.OpenFileForReading():openCSVFileRead
{
emit openCSVFileRead to “FILE”;
}
com.apama.file.OpenFileForReading openFileWeWantToRead :=
new com.apama.file.OpenFileForReading;
on com.apama.file.OpenFileForReading():openFileWeWantToRead
{
// populate the openFileWeWantToRead event
// …
// …
emit openFileWeWantToRead to “FILE”;
}
com.apama.file.FileError readError := new com.apama.file.FileError;
readError.transportName := "JMultiFileTransport";
readError.requestId := 1;
on com.apama.file.FileError():readError
{
emit readError to "FILE";
}
com.apama.file.FileHandle readHandle := new com.apama.file.FileHandle;
readHandle.transportName := "JMultiFileTransport";
readHandle.requestId := 1;
readHandle.sessionId := 3;
on com.apama.file.FileHandle():readHandle
{
emit readHandle to "FILE";
}
com.apama.file.ReadLines readLines := new com.apama.file.ReadLines;
readLines.transportName := "JMultiFileTransport";
readLines.numberOfLines := 1;
readLines.requestId := 1;
readLines.sessionId := 3;
on com.apama.file.ReadLines():readLines
{
emit readLines to "FILE";
}
com.apama.file.FileLine fileLine := new com.apama.file.FileLine;
fileLine.transportName := "JMultiFileTransport";
fileLine.requestId := 1;
fileLine.sessionId := 3;
string aid:= fileLine.data[0];
on com.apama.file.FileLine():fileLine
{
emit fileLine to "FILE";
}
5 query definitions with 5 instances of each, 50 query partitions, non-reliable JMS connections,
2018-07-26 10:20:24.871 CRIT [15268] - * no distributed memory store, and no Correlator Deployment Packages.
no distributed memory store, and no Correlator Deployment Packages.
2018-07-26 10:20:24.871 CRIT [15268] - * Refer to the Apama license agreement and user documentation topic "Running Apama without
Refer to the Apama license agreement and2018-07-26 10:20:24.872 CRIT [15268] - * a license file" for further information on the restrictions.
2018-07-26 10:20:24.872 CRIT [15268] - * The correlator may stop without warning if the memory limit is breached.
2018-07-26 10:20:24.873 CRIT [15268] - * If using Java features, you may need to use -J-Xmx256M to limit the JVM’s memory usage.
2018-07-26 10:20:24.873 CRIT [15268] - *************************************************************************
2018-07-26 10:20:24.873 ##### [15268] - Input value - pidfile =
2018-07-26 10:20:24.873 ##### [15268] - Input value - per receiver queue size = 10 s
2018-07-26 10:20:24.873 ##### [15268] - Input value - per receiver queue size = 10240 kb
2018-07-26 10:20:24.874 ##### [15268] - Input value - input queue size = 20000
2018-07-26 10:20:24.874 ##### [15268] - External clocking = disabled
2018-07-26 10:20:24.874 ##### [15268] - Input value - logfile = stdout
2018-07-26 10:20:24.874 ##### [15268] - Input value - loglevel = INFO
2018-07-26 10:20:24.874 ##### [15268] - Input value - inputLog = logs/defaultCorrelator_${START_TIME}_${ID}.input.log
2018-07-26 10:20:24.874 ##### [15268] - Compiler optimizations = enabled - the debugger cannot be used; specify command line option “-g” to use it.
2018-07-26 10:20:24.874 ##### [15268] - Using EPL runtime = interpreted
user documentation topic "Running Apama without
a license file" for further information on the restrictions.
The correlator may stop without warning if the memory limit is breached.
If using Java features, you may need to use -J-Xmx256M to limit the JVM’s memory usage.
2018-07-26 10:20:24.887 ##### [15268] - Java support = enabled
2018-07-26 10:20:24.887 INFO [15268] - Starting JVM with options:
2018-07-26 10:20:24.887 INFO [15268] - -Djava.class.path=C:\SoftwareAG\Apama/lib/ap-correlator-extension-API.jar;C:\SoftwareAG\Apama/lib/ap-util.jar
2018-07-26 10:20:24.887 INFO [15268] - -DAPAMA_LOG_LEVEL=INFO
2018-07-26 10:20:24.887 INFO [15268] - -Xrs
2018-07-26 10:20:24.887 INFO [15268] - -DAPAMA_CORRELATOR_NAME=Apama Designer Correlator for opencsv(opencsv:defaultCorrelator)
2018-07-26 10:20:25.207 ##### [15268] - Java virtual machine created - Java HotSpot™ 64-Bit Server VM 1.8.0_141-b15.
2018-07-26 10:20:25.420 INFO [15268:java] - Logging started
2018-07-26 10:20:25.426 INFO [15268:init] - Log4JLogger.initLoggingSystem() - Configured logging based on APAMA_LOG system properties.
2018-07-26 10:20:25.427 INFO [15268:init] - Log4JLogger.initLoggingSystem() - Default log level will be: INFO
2018-07-26 10:20:25.427 INFO [15268:init] -
2018-07-26 10:20:25.428 INFO [15268:init] - ================================================================================
2018-07-26 10:20:25.428 INFO [15268:init] - Java logging begins at: Jul 26, 2018 10:20:25 AM
2018-07-26 10:20:25.428 INFO [15268:init] - Apama Platform Version: 10.1.0.5.325550 (rel/10.1.0.x@325550)
2018-07-26 10:20:25.428 INFO [15268:init] - ================================================================================
2018-07-26 10:20:25.428 INFO [15268:init] -
2018-07-26 10:20:25.471 INFO [15268:init] - Java maximum heap size = 3618MB
2018-07-26 10:20:25.531 CRIT [15268] - JMon framework ready
2018-07-26 10:20:25.548 CRIT [15268] - Opening new input log: logs/defaultCorrelator_2018-07-26_10.20.24_001.input.log
2018-07-26 10:20:25.552 INFO [15268] - Will log queue size every 5.000000 seconds
2018-07-26 10:20:25.553 INFO [15268] - Starting scheduler with 4 threads (Without a license file the correlator is restricted)
2018-07-26 10:20:25.559 INFO [15268] - Server socket opened listening on 0.0.0.0:15903
2018-07-26 10:20:25.560 ##### [15268] - Component ID: Apama Designer Correlator for opencsv(opencsv:defaultCorrelator) (correlator/6582530547208190982/6582530547208190982)
2018-07-26 10:20:25.560 ##### [15268] - Correlator, version 10.1.0.5.325550, running
2018-07-26 10:20:26.174 INFO [21612] - Sender Apama Designer (runtime views) (0000029DD89E1310) (component ID 14767658753572405248/15489663277988773888) connected from 127.0.0.1:65260
2018-07-26 10:20:26.322 INFO [21612] - Sender Apama Designer (0000029DD89DE9D0) (component ID 14767658753572405248/15489663561456680960) connected from 127.0.0.1:65259
2018-07-26 10:20:26.375 INFO [21612] - Sender ADBC DataService (0000029DD89DF000) (component ID 14767658753572405248/15489663720370601984) connected from 127.0.0.1:65265
2018-07-26 10:20:26.386 INFO [21612] - Sender Apama Designer (runtime views) (0000029DD89E1730) (component ID 14767658753572405248/15489663905054326784) connected from 127.0.0.1:65267
2018-07-26 10:20:26.396 INFO [13572] - Sender Apama Designer (runtime views) (0000029DD89E1730) (component ID 14767658753572405248/15489663905054326784) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:26.411 INFO [21612] - Sender Dashboard Builder: Raj (0000029DD89E0EF0) (component ID 15211357213279911936/15489664158457462784) connected from 127.0.0.1:65262
2018-07-26 10:20:26.427 INFO [21612] - Receiver ADBC DataService (0000029DD92D2040) (component ID 14767658753572405248/15489663720370601984) connected from 127.0.0.1:65265
2018-07-26 10:20:26.427 INFO [21612] - Receiver ADBC DataService (0000029DD92D2040) initially subscribed to
2018-07-26 10:20:26.427 INFO [21612] - Blocking receiver ADBC DataService (0000029DD92D2040) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-26 10:20:26.432 INFO [9264] - Receiver ADBC DataService (0000029DD92D2040) unsubscribed from all channels
2018-07-26 10:20:26.432 INFO [13572] - Receiver ADBC DataService (0000029DD92D2040) added subscriptions to []
2018-07-26 10:20:26.439 INFO [13572] - Receiver ADBC DataService (0000029DD92D2040) added subscriptions to [com.apama.adbc.service]
2018-07-26 10:20:26.443 INFO [21612] - Receiver Dashboard Builder: Raj (0000029DD92D3B60) (component ID 15211357213279911936/15489664158457462784) connected from 127.0.0.1:65262
2018-07-26 10:20:26.443 INFO [21612] - Receiver Dashboard Builder: Raj (0000029DD92D3B60) initially subscribed to
2018-07-26 10:20:26.443 INFO [21612] - Blocking receiver Dashboard Builder: Raj (0000029DD92D3B60) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-26 10:20:26.444 INFO [13572] - Receiver ADBC DataService (0000029DD92D2040) removed subscriptions to []
2018-07-26 10:20:26.445 INFO [13572] - Receiver Dashboard Builder: Raj (0000029DD92D3B60) unsubscribed from all channels
2018-07-26 10:20:26.446 INFO [13572] - Receiver ADBC DataService (0000029DD92D2040) removed subscriptions to [com.apama.adbc.service]
2018-07-26 10:20:26.446 INFO [13572] - Receiver Dashboard Builder: Raj (0000029DD92D3B60) added subscriptions to [com.apama.scenario]
2018-07-26 10:20:26.449 INFO [13572] - Receiver ADBC DataService (0000029DD92D2040) (component ID 14767658753572405248/15489663720370601984) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:26.450 INFO [9264] - Receiver Dashboard Builder: Raj (0000029DD92D3B60) added subscriptions to [com.apama.scenario.private_3235382260519272468_1532614826447]
2018-07-26 10:20:26.453 INFO [13572] - Sender ADBC DataService (0000029DD89DF000) (component ID 14767658753572405248/15489663720370601984) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:26.800 INFO [17248] - Added monitor com.apama.file.ParallelFileAdapterSupport
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.OpenFileForWritingToContext
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.OpenFileForReadingToContext
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.ServiceMonitorOnline
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.ServiceMonitorUnloaded
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.LineWritten
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.FileError
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.FileClosed
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.CloseFile
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.EndOfFile
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.NewFileOpened
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.ReadLines
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.FileLine
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.FileHandle
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.OpenFileForWriting
2018-07-26 10:20:26.800 INFO [17248] - Added type com.apama.file.OpenFileForReading
2018-07-26 10:20:26.800 INFO [17248] - Injected MonitorScript from file C:\SoftwareAG\Apama\adapters\monitors\FileEvents.mon (40d750b131efa577b22168320a8d52fb), size 21019 bytes, compile time 0.03 seconds
2018-07-26 10:20:26.904 INFO [17248] - Added monitor com.apama.adapters.IAFStatusManager
2018-07-26 10:20:26.904 INFO [17248] - Added type com.apama.adapters.AdapterConnectionOpened
2018-07-26 10:20:26.904 INFO [17248] - Added type com.apama.adapters.AdapterConnectionClosed
2018-07-26 10:20:26.904 INFO [17248] - Added type com.apama.adapters.IAFStatusResponse_1
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.IAFStatusRequest_1
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.ConnectionOpened
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.ConnectionClosed
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.AdapterError
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.AdapterUp
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.AdapterStatusDeregister
2018-07-26 10:20:26.905 INFO [17248] - Added type com.apama.adapters.AdapterStatusRegister
2018-07-26 10:20:26.905 INFO [17248] - Injected MonitorScript from file C:\SoftwareAG\Apama\adapters\monitors\IAFStatusManager.mon (b5cb6809fd85eaf78e3ade7ad765e458), size 35018 bytes, compile time 0.10 seconds
2018-07-26 10:20:26.953 INFO [17248] - Added monitor com.apama.statusreport.ParallelStatusSupport
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.UnsubscribeStatusToContext
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.SubscribeStatusToContext
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.StatusError
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.Status
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.UnsubscribeStatus
2018-07-26 10:20:26.953 INFO [17248] - Added type com.apama.statusreport.SubscribeStatus
2018-07-26 10:20:26.954 INFO [17248] - Injected MonitorScript from file C:\SoftwareAG\Apama\monitors\StatusSupport.mon (e9d784f959fd7ff88986835364cfe349), size 12253 bytes, compile time 0.04 seconds
2018-07-26 10:20:26.989 INFO [17248] - Added monitor com.apama.file.FileStatusManager
2018-07-26 10:20:26.989 INFO [17248] - Injected MonitorScript from file C:\SoftwareAG\Apama\adapters\monitors\FileStatusManager.mon (006ba11e8b49dd98a2ae6dca28980040), size 14233 bytes, compile time 0.03 seconds
2018-07-26 10:20:26.990 INFO [15756] - com.apama.file.FileStatusManager [4] Loaded FileStatusManager
2018-07-26 10:20:26.998 INFO [17248] - Added type FileLine
2018-07-26 10:20:26.998 INFO [17248] - Added type ReadLines
2018-07-26 10:20:26.998 INFO [17248] - Added type FileError
2018-07-26 10:20:26.998 INFO [17248] - Added type FileHandle
2018-07-26 10:20:26.998 INFO [17248] - Added type OpenFileForReading
2018-07-26 10:20:26.999 INFO [17248] - Injected MonitorScript from file C:\Users\Raj Vasa\workspace102\opencsv\eventdefinitions\OpenFileForReading.mon (add802e3cf6df0fdb1d8e9377bf42bf5), size 2245 bytes, compile time 0.01 seconds
2018-07-26 10:20:27.013 INFO [17248] - Added monitor opencsv
2018-07-26 10:20:27.013 INFO [17248] - Injected MonitorScript from file C:\Users\Raj Vasa\workspace102\opencsv\monitors\opencsv.mon (96685331d815956fce0af36217337cd1), size 2271 bytes, compile time 0.01 seconds
2018-07-26 10:20:27.013 CRIT [15756] - opencsv [6] com.apama.file.FileLine(“JMultiFileTransport”,1,3,)
2018-07-26 10:20:27.014 ERROR [15756] - Error on line 71 of monitor opencsv: IndexOutOfBoundsException - Out of bounds index passed to sequence operator - C:\Users\Raj Vasa\workspace102\opencsv\monitors\opencsv.mon
2018-07-26 10:20:27.014 ERROR [15756] - opencsv [6] Stack dump:
2018-07-26 10:20:27.014 ERROR [15756] - opencsv.onload() C:\Users\Raj Vasa\workspace102\opencsv\monitors\opencsv.mon:71
2018-07-26 10:20:27.014 ERROR [15756] - opencsv.::startupAction::() C:\Users\Raj Vasa\workspace102\opencsv\monitors\opencsv.mon:3
2018-07-26 10:20:27.019 INFO [9264] - Sender Apama Designer (0000029DD89DE9D0) (component ID 14767658753572405248/15489663561456680960) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:27.080 INFO [21612] - Sender iaf for opencsv(opencsv:FileAdapter1) (iaf -p 16903 FileAdapter1.xml) (0000029DD992AAA0) (component ID 6582530560709393414/6582249085732682758) connected from 127.0.0.1:65281
2018-07-26 10:20:27.107 INFO [21612] - Receiver iaf for opencsv(opencsv:FileAdapter1) (iaf -p 16903 FileAdapter1.xml) (0000029DD8D4E450) (component ID 6582530560709393414/6583093510662814726) connected from 127.0.0.1:65283
2018-07-26 10:20:27.107 INFO [21612] - Receiver iaf for opencsv(opencsv:FileAdapter1) (iaf -p 16903 FileAdapter1.xml) (0000029DD8D4E450) initially subscribed to [FILE]
2018-07-26 10:20:27.107 INFO [21612] - Blocking receiver iaf for opencsv(opencsv:FileAdapter1) (iaf -p 16903 FileAdapter1.xml) (0000029DD8D4E450) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-26 10:20:27.468 INFO [21612] - Sender Apama Designer (0000029DD992CBA0) (component ID 14767658753572405248/15489669247994429440) connected from 127.0.0.1:65279
2018-07-26 10:20:27.488 INFO [13572] - Sender Apama Designer (0000029DD992CBA0) (component ID 14767658753572405248/15489669247994429440) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:27.577 INFO [21612] - Sender ADBC DataService (0000029DD992CBA0) (component ID 14767658753572405248/15489669793455669248) connected from 127.0.0.1:65285
2018-07-26 10:20:27.613 INFO [21612] - Receiver ADBC DataService (0000029DD9554590) (component ID 14767658753572405248/15489669793455669248) connected from 127.0.0.1:65285
2018-07-26 10:20:27.613 INFO [21612] - Receiver ADBC DataService (0000029DD9554590) initially subscribed to
2018-07-26 10:20:27.613 INFO [21612] - Blocking receiver ADBC DataService (0000029DD9554590) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-26 10:20:27.615 INFO [13572] - Receiver ADBC DataService (0000029DD9554590) unsubscribed from all channels
2018-07-26 10:20:27.616 INFO [9264] - Receiver ADBC DataService (0000029DD9554590) added subscriptions to []
2018-07-26 10:20:27.622 INFO [9264] - Receiver ADBC DataService (0000029DD9554590) added subscriptions to [com.apama.adbc.service]
2018-07-26 10:20:30.553 INFO [21640] - Correlator Status: sm=5 nctx=1 ls=19 rq=0 eq=0 iq=0 oq=0 icq=0 lcn=“” lcq=0 lct=0.0 rx=0 tx=0 rt=1 nc=3 vm=518656 pm=68160 runq=0 si=10.3 so=0.0 srn=“” srq=0 (no license file)
2018-07-26 10:20:35.552 INFO [21640] - Correlator Status: sm=5 nctx=1 ls=19 rq=0 eq=0 iq=0 oq=0 icq=0 lcn=“” lcq=0 lct=0.0 rx=1 tx=2 rt=2 nc=3 vm=521924 pm=71584 runq=0 si=8.8 so=0.0 srn=“” srq=0 (no license file)
2018-07-26 10:20:40.553 INFO [21640] - Correlator Status: sm=5 nctx=1 ls=19 rq=0 eq=0 iq=0 oq=0 icq=0 lcn=“” lcq=0 lct=0.0 rx=2 tx=4 rt=3 nc=3 vm=534384 pm=79024 runq=0 si=7.0 so=0.0 srn=“” srq=0 (no license file)
2018-07-26 10:20:45.552 INFO [21640] - Correlator Status: sm=5 nctx=1 ls=19 rq=0 eq=0 iq=0 oq=0 icq=0 lcn=“” lcq=0 lct=0.0 rx=3 tx=6 rt=4 nc=3 vm=538492 pm=80564 runq=0 si=9.8 so=0.0 srn=“” srq=0 (no license file)
2018-07-26 10:20:50.553 INFO [21640] - Correlator Status: sm=5 nctx=1 ls=19 rq=0 eq=0 iq=0 oq=0 icq=0 lcn=“” lcq=0 lct=0.0 rx=4 tx=8 rt=5 nc=3 vm=538776 pm=80620 runq=0 si=11.4 so=0.0 srn=“” srq=0 (no license file)
2018-07-26 10:20:54.257 ##### [20048] - Shutting down correlator in response to client (127.0.0.1:65261) request: Shutdown initiated by Software AG Designer (Raj Vasa)
2018-07-26 10:20:54.312 INFO [22076] - Sender iaf for opencsv(opencsv:FileAdapter1) (iaf -p 16903 FileAdapter1.xml) (0000029DD992AAA0) (component ID 6582530560709393414/6582249085732682758) disconnected uncleanly: Connection closed
2018-07-26 10:20:54.319 INFO [15268] - Shutting down Java virtual machine
2018-07-26 10:20:54.322 INFO [15268] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 6582530560709393414:6583093510662814726
2018-07-26 10:20:54.323 INFO [15268] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 14767658753572405248:15489669793455669248
2018-07-26 10:20:54.329 INFO [15268] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 15211357213279911936:15489664158457462784
2018-07-26 10:20:54.330 INFO [13572] - Sender ADBC DataService (0000029DD992CBA0) (component ID 14767658753572405248/15489669793455669248) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:54.333 INFO [15268] - MessageReceiverImpl.Shutdown() - Disconnecting remote sender 14767658753572405248:15489663277988773888
2018-07-26 10:20:54.334 INFO [13572] - Sender Dashboard Builder: Raj (0000029DD89E0EF0) (component ID 15211357213279911936/15489664158457462784) disconnected cleanly: Other party requested disconnection
2018-07-26 10:20:54.356 INFO [15268] - Correlator shutdown is complete
you need to assign proper data to sequence data field. Since data sequence is empty , it is giving you out of bound exception when you are trying to get the data value.