diff --git a/edexOsgi/build.edex/esb/conf/modes.xml b/edexOsgi/build.edex/esb/conf/modes.xml index 3d79c484c3..a08a6dc3b6 100644 --- a/edexOsgi/build.edex/esb/conf/modes.xml +++ b/edexOsgi/build.edex/esb/conf/modes.xml @@ -79,7 +79,7 @@ ebxml.*\.xml - event-ingest.xml + statsTemplate registry @@ -149,7 +149,6 @@ qpf-ingest.xml fssobs-ingest.xml cpgsrv-spring.xml - stats-ingest.xml time-common.xml @@ -172,6 +171,7 @@ h5uair-common.xml h5scd-ingest.xml + statsTemplate excludeDpaAndOgc @@ -214,6 +214,7 @@ ncgrib-common.xml nctext-common.xml excludeDpaAndOgc + statsTemplate diff --git a/edexOsgi/com.raytheon.uf.common.stats/build.properties b/edexOsgi/com.raytheon.uf.common.stats/build.properties index 34d2e4d2da..242efb0ca2 100644 --- a/edexOsgi/com.raytheon.uf.common.stats/build.properties +++ b/edexOsgi/com.raytheon.uf.common.stats/build.properties @@ -1,4 +1,6 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.stats/res/scripts/stats_indices.sql b/edexOsgi/com.raytheon.uf.common.stats/res/scripts/stats_indices.sql new file mode 100644 index 0000000000..ff3f977deb --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.stats/res/scripts/stats_indices.sql @@ -0,0 +1,30 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ + +CREATE INDEX "aggregateQuery_idx" + ON events.aggregate + USING btree + (startDate, endDate, eventType, field); + +CREATE INDEX "statsQuery_idx" + ON events.stats + USING btree + (date, eventType); + diff --git a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ProcessUtil.java b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ProcessUtil.java index b4c76ffcca..c2079f34e8 100644 --- a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ProcessUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ProcessUtil.java @@ -160,7 +160,12 @@ public class ProcessUtil { processEvent.setProcessingLatency(latencyMilliseconds); } - EventBus.getInstance().publish(processEvent); + // processing in less than 0 millis isn't trackable, usually due to an + // error occurred and statement logged incorrectly + if ((processEvent.getProcessingLatency() > 0) + && (processEvent.getProcessingTime() > 0)) { + EventBus.getInstance().publish(processEvent); + } // Make sure we have something to log. if (sb.length() > 0) { diff --git a/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-common.xml b/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-common.xml new file mode 100644 index 0000000000..6acb725514 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-common.xml @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-ingest.xml b/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-ingest.xml index c46a2f88eb..e9b737c3d9 100644 --- a/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.event/res/spring/event-ingest.xml @@ -2,28 +2,22 @@ xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - - - - + - + - + - + - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.event/src/com/raytheon/uf/edex/event/EventBus.java b/edexOsgi/com.raytheon.uf.edex.event/src/com/raytheon/uf/edex/event/EventBus.java index d0142e2dcb..b4abaf34aa 100644 --- a/edexOsgi/com.raytheon.uf.edex.event/src/com/raytheon/uf/edex/event/EventBus.java +++ b/edexOsgi/com.raytheon.uf.edex.event/src/com/raytheon/uf/edex/event/EventBus.java @@ -41,10 +41,9 @@ public class EventBus { } catch (Exception e) { statusHandler.error( "Unable to set thread pool size from spring; defaulting size to " - + threadCount + ".", - e); + + threadCount + ".", e); } - asyncEventBus = new AsyncEventBus( + asyncEventBus = new AsyncEventBus("EventBus", Executors.newFixedThreadPool(threadCount)); } diff --git a/edexOsgi/com.raytheon.uf.edex.stats/res/spring/edex-process-stats.xml b/edexOsgi/com.raytheon.uf.edex.stats/res/spring/edex-process-stats.xml index 48a1850307..709ed41321 100644 --- a/edexOsgi/com.raytheon.uf.edex.stats/res/spring/edex-process-stats.xml +++ b/edexOsgi/com.raytheon.uf.edex.stats/res/spring/edex-process-stats.xml @@ -2,25 +2,24 @@ xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - + depends-on="statsRegister"/> + - - + + - - + + - + - + +