Changeset 4fd2f1f5cb3d57993fc34dc8d6e742d38454609f
- Timestamp:
- 06/07/09 19:40:49
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1244403649 +0000
- git-parent:
[4f39b4d05385ed2a6a1620e2e3a578b2de6a937a]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1244403649 +0000
- Message:
This appears to work... now we need to make sure it works well. refs #142
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0f51614 |
r4fd2f1f |
|
| 30 | 30 | com/omniti/reconnoiter/event/StratconQueryStop.java \ |
|---|
| 31 | 31 | com/omniti/reconnoiter/IEPEngine.java \ |
|---|
| | 32 | com/omniti/reconnoiter/StratconConfig.java \ |
|---|
| 32 | 33 | com/omniti/reconnoiter/StratconMessage.java |
|---|
| 33 | 34 | |
|---|
| 34 | 35 | SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar lib/esper-3.0.0.jar \ |
|---|
| 35 | 36 | lib/log4j-1.2.15.jar lib/spring-beans-2.5.5.jar lib/spring-context-2.5.5.jar \ |
|---|
| 36 | | lib/cglib-nodep-2.2.jar |
|---|
| | 37 | lib/cglib-nodep-2.2.jar lib/commons-pool-1.4.jar lib/commons-dbcp-1.2.2.jar \ |
|---|
| | 38 | lib/postgresql-8.3-604.jdbc3.jar |
|---|
| 37 | 39 | |
|---|
| 38 | 40 | all: reconnoiter.jar |
|---|
| r0f51614 |
r4fd2f1f |
|
| 15 | 15 | import com.omniti.reconnoiter.event.NoitEvent; |
|---|
| 16 | 16 | import com.omniti.reconnoiter.event.NoitMetricNumeric; |
|---|
| | 17 | import com.omniti.reconnoiter.StratconConfig; |
|---|
| 17 | 18 | import com.espertech.esper.client.*; |
|---|
| 18 | 19 | import com.espertech.esper.client.soda.*; |
|---|
| … | … | |
| 23 | 24 | static public void main(String[] args) { |
|---|
| 24 | 25 | BasicConfigurator.configure(); |
|---|
| | 26 | if(args.length != 1) { |
|---|
| | 27 | System.err.println("Requires exactly one argument"); |
|---|
| | 28 | return; |
|---|
| | 29 | } |
|---|
| | 30 | StratconConfig sconf = new StratconConfig(args[0]); |
|---|
| 25 | 31 | |
|---|
| 26 | 32 | Configuration config = new Configuration(); |
|---|
| | 33 | config.addDatabaseReference("recondb", sconf.getDBConfig()); |
|---|
| 27 | 34 | config.addEventTypeAutoName("com.omniti.reconnoiter.event"); |
|---|
| 28 | 35 | EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config); |
|---|
| r2220278 |
r4fd2f1f |
|
| 6 | 6 | esper-3.0.0.jar log4j-1.2.15.jar \ |
|---|
| 7 | 7 | spring-beans-2.5.5.jar spring-context-2.5.5.jar \ |
|---|
| 8 | | cglib-nodep-2.2.jar" |
|---|
| | 8 | cglib-nodep-2.2.jar commons-pool-1.4.jar commons-dbcp-1.2.2.jar \ |
|---|
| | 9 | postgresql-8.3-604.jdbc3.jar" |
|---|
| 9 | 10 | |
|---|
| 10 | 11 | DIRS=". lib @prefix@/java" |
|---|
| … | … | |
| 27 | 28 | fi |
|---|
| 28 | 29 | done |
|---|
| 29 | | exec $JAVA $JPARAMS -cp $CP com.omniti.reconnoiter.IEPEngine |
|---|
| | 30 | exec $JAVA $JPARAMS -cp $CP com.omniti.reconnoiter.IEPEngine $* |
|---|
| r88a7178 |
r4fd2f1f |
|
| 185 | 185 | return -1; |
|---|
| 186 | 186 | } |
|---|
| | 187 | |
|---|
| | 188 | char *noit_conf_config_filename() { |
|---|
| | 189 | return strdup(master_config_file); |
|---|
| | 190 | } |
|---|
| | 191 | |
|---|
| 187 | 192 | int noit_conf_xml_xpath(xmlDocPtr *mc, xmlXPathContextPtr *xp) { |
|---|
| 188 | 193 | if(mc) *mc = master_config; |
|---|
| r88a7178 |
r4fd2f1f |
|
| 63 | 63 | API_EXPORT(int) noit_conf_load(const char *path); |
|---|
| 64 | 64 | API_EXPORT(int) noit_conf_save(const char *path); |
|---|
| | 65 | API_EXPORT(char *) noit_conf_config_filename(); |
|---|
| 65 | 66 | |
|---|
| 66 | 67 | API_EXPORT(noit_conf_section_t) |
|---|
| r9ccb08d |
r4fd2f1f |
|
| 582 | 582 | } |
|---|
| 583 | 583 | if(info->child == 0) { |
|---|
| 584 | | char *argv[2] = { "run-iep", NULL }; |
|---|
| | 584 | char *argv[3] = { "run-iep", NULL, NULL }; |
|---|
| 585 | 585 | int stdout_fileno; |
|---|
| | 586 | |
|---|
| | 587 | argv[1] = noit_conf_config_filename(); |
|---|
| 586 | 588 | |
|---|
| 587 | 589 | if(chdir(info->directory) != 0) { |
|---|