Merge "Issue #1350: Track ingestGrib and ingestDat statistics" into development
Former-commit-id:5c398cb93f
[formerly53426e2e90
] [formerly9a90b123e7
[formerly 08b5d690e71afd7424fc00e0d4c06b497447d93a]] Former-commit-id:9a90b123e7
Former-commit-id:a7d31535da
This commit is contained in:
commit
88602c16f4
9 changed files with 84 additions and 32 deletions
|
@ -79,7 +79,7 @@
|
|||
</mode>
|
||||
<mode name="registry">
|
||||
<include>ebxml.*\.xml</include>
|
||||
<include>event-ingest.xml</include>
|
||||
<includeMode>statsTemplate</includeMode>
|
||||
</mode>
|
||||
<mode name="datadelivery">
|
||||
<includeMode>registry</includeMode>
|
||||
|
@ -149,7 +149,6 @@
|
|||
<exclude>qpf-ingest.xml</exclude>
|
||||
<exclude>fssobs-ingest.xml</exclude>
|
||||
<exclude>cpgsrv-spring.xml</exclude>
|
||||
<exclude>stats-ingest.xml</exclude>
|
||||
</mode>
|
||||
<mode name="ingestGrib">
|
||||
<include>time-common.xml</include>
|
||||
|
@ -172,6 +171,7 @@
|
|||
<exclude>h5uair-common.xml</exclude>
|
||||
<exclude>h5scd-ingest.xml</exclude>
|
||||
<!-- end of ncep excludes -->
|
||||
<includeMode>statsTemplate</includeMode>
|
||||
<includeMode>excludeDpaAndOgc</includeMode>
|
||||
</mode>
|
||||
<!-- Runs separate now, not just high mem -->
|
||||
|
@ -214,6 +214,7 @@
|
|||
<exclude>ncgrib-common.xml</exclude>
|
||||
<exclude>nctext-common.xml</exclude>
|
||||
<includeMode>excludeDpaAndOgc</includeMode>
|
||||
<includeMode>statsTemplate</includeMode>
|
||||
</mode>
|
||||
|
||||
<!-- modes listed below are not supported in a production setting, they
|
||||
|
@ -272,6 +273,10 @@
|
|||
<exclude>.*datadelivery-registry.*</exclude>
|
||||
<includeMode>datadeliverytemplate</includeMode>
|
||||
</mode>
|
||||
<mode name="statsTemplate" template="true">
|
||||
<include>event-common.xml</include>
|
||||
<include>stats-common.xml</include>
|
||||
</mode>
|
||||
<mode name="datadeliverytemplate" template="true">
|
||||
<include>.*datadelivery.*</include>
|
||||
<include>.*bandwidth.*</include>
|
||||
|
@ -289,8 +294,8 @@
|
|||
<include>management-common.xml</include>
|
||||
<include>database-common.xml</include>
|
||||
<include>auth-common.xml</include>
|
||||
<include>stats-common.xml</include>
|
||||
<include>event-ingest.xml</include>
|
||||
<includeMode>statsTemplate</includeMode>
|
||||
</mode>
|
||||
<mode name="excludeDpaAndOgc" template="true">
|
||||
<!-- exclude dpa services -->
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
.,\
|
||||
res/
|
||||
|
|
@ -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);
|
||||
|
|
@ -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) {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<beans
|
||||
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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||
|
||||
<bean id="eventBusThreadCount" class="java.lang.String">
|
||||
<constructor-arg type="java.lang.String" value="15" />
|
||||
</bean>
|
||||
|
||||
<bean id="logHandler" class="com.raytheon.uf.edex.event.handler.LogHandler"/>
|
||||
|
||||
</beans>
|
|
@ -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">
|
||||
|
||||
<bean id="eventBusThreadCount" class="java.lang.String">
|
||||
<constructor-arg type="java.lang.String" value="15" />
|
||||
</bean>
|
||||
<bean id="logHandler" class="com.raytheon.uf.edex.event.handler.LogHandler"/>
|
||||
|
||||
|
||||
<bean id="jms-notify" class="org.apache.camel.component.jms.JmsComponent">
|
||||
<constructor-arg ref="jmsIngestNotifyConfig" />
|
||||
<property name="taskExecutor" ref="notifyThreadPool" />
|
||||
<property name="taskExecutor" ref="notifyThreadPool" />
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="jmsIngestNotifyConfig" class="org.apache.camel.component.jms.JmsConfiguration"
|
||||
factory-bean="jmsConfig" factory-method="copy">
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="notifyThreadPool"
|
||||
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
|
||||
<property name="corePoolSize" value="1" />
|
||||
<property name="maxPoolSize" value="1" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
<bean id="statsPurge"
|
||||
<bean id="statsPurge"
|
||||
class="com.raytheon.uf.edex.stats.StatsPurge"
|
||||
depends-on="statsRegister"/>
|
||||
<bean id="statsHandler"
|
||||
class="com.raytheon.uf.edex.stats.handler.StatsHandler"
|
||||
depends-on="eventBusThreadCount"/>
|
||||
depends-on="statsRegister"/>
|
||||
|
||||
<bean id="aggregateManager" class="com.raytheon.uf.edex.stats.AggregateManager">
|
||||
<constructor-arg value="${stats.period}"/>
|
||||
<constructor-arg value="${stats.scanInterval}"/>
|
||||
<constructor-arg value="${stats.period}"/>
|
||||
<constructor-arg value="${stats.scanInterval}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="edexStatsRegistered" factory-bean="clusteredCamelContextMgr"
|
||||
factory-method="register" depends-on="persistCamelRegistered">
|
||||
<constructor-arg ref="edexStats-camel"/>
|
||||
</bean>
|
||||
|
||||
</bean>
|
||||
|
||||
<camelContext id="edexStats-camel"
|
||||
xmlns="http://camel.apache.org/schema/spring"
|
||||
errorHandlerRef="errorHandler"
|
||||
|
|
|
@ -9,10 +9,13 @@
|
|||
<property name="pluginFQN" value="com.raytheon.uf.common.stats" />
|
||||
<property name="database" value="metadata" />
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="statsRegister" factory-bean="dbPluginRegistry" factory-method="register">
|
||||
<constructor-arg value="stats"/>
|
||||
<constructor-arg ref="statsDatabaseProperties"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="statsHandler"
|
||||
class="com.raytheon.uf.edex.stats.handler.StatsHandler"
|
||||
depends-on="eventBusThreadCount"/>
|
||||
</beans>
|
||||
|
|
Loading…
Add table
Reference in a new issue