Merge "Issue #1367 broke grib ingest into two routes, better exception message from remote thrift service handler" into development

Former-commit-id: 7b054e58ed [formerly 0e79b66173d37d81e13f263c70685189ba924fc3]
Former-commit-id: 18e4f52967
This commit is contained in:
Richard Peter 2012-12-07 13:14:46 -06:00 committed by Gerrit Code Review
commit c6fe3df93d
5 changed files with 114 additions and 66 deletions

View file

@ -103,6 +103,8 @@
<include>auth-common.xml</include>
<!-- grid specific services -->
<include>grib-common.xml</include>
<include>grid-process.xml</include>
<include>gridcoverage-.*.xml</include>
<include>grib-distribution.xml</include>
<include>grib-datadelivery.xml</include>
<include>level-common.xml</include>
@ -120,7 +122,8 @@
<mode name="ingest">
<exclude>ebxml.*\.xml</exclude>
<exclude>.*request.*</exclude>
<exclude>grib-ingest.xml</exclude>
<exclude>grib-decode.xml</exclude>
<exclude>grid-process.xml</exclude>
<exclude>ncgrib-ingest.xml</exclude>
<exclude>.*datadelivery.*</exclude>
<exclude>.*bandwidth.*</exclude>
@ -152,8 +155,11 @@
</mode>
<mode name="ingestGrib">
<include>time-common.xml</include>
<include>auth-common.xml</include>
<include>nwsauth-request.xml</include>
<include>grib-common.xml</include>
<include>grib-ingest.xml</include>
<include>grib-decode.xml</include>
<include>grid-process.xml</include>
<include>level-common.xml</include>
<include>grid-common.xml</include>
<include>gridcoverage-.*.xml</include>
@ -161,7 +167,6 @@
<include>persist-ingest.xml</include>
<include>management-common.xml</include>
<include>database-common.xml</include>
<include>auth-common.xml</include>
<include>event-ingest.xml</include>
<!-- ncep excludes until tested -->
<exclude>ncgrib-common.xml</exclude>
@ -222,7 +227,8 @@
are for DEVELOPMENT purposes only -->
<mode name="grib">
<include>grib-common.xml</include>
<include>grib-ingest.xml</include>
<include>grib-decode.xml</include>
<include>grid-process.xml</include>
<include>grib-distribution.xml</include>
<include>level-common.xml</include>
<include>persist-ingest.xml</include>
@ -279,12 +285,15 @@
<include>stats-common.xml</include>
</mode>
<mode name="datadeliverytemplate" template="true">
<include>database-common.xml</include>
<include>.*datadelivery.*</include>
<include>.*bandwidth.*</include>
<!-- Exclude the inmemory versions of Spring files -->
<exclude>.*bandwidth.*-inmemory.*.xml</exclude>
<include>time-common.xml</include>
<include>grib-common.xml</include>
<include>auth-common.xml</include>
<include>nwsauth-request.xml</include>
<include>grid-process.xml</include>
<include>grid-common.xml</include>
<include>gridcoverage-.*.xml</include>
<include>parameter-common.xml</include>
@ -293,8 +302,6 @@
<include>level-common.xml</include>
<include>persist-ingest.xml</include>
<include>management-common.xml</include>
<include>database-common.xml</include>
<include>auth-common.xml</include>
<include>event-ingest.xml</include>
<includeMode>statsTemplate</includeMode>
</mode>

View file

@ -4,40 +4,17 @@
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- Done to force instantiation of the GribTables -->
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" />
<bean id="gribNotifyQueue"
class="com.raytheon.edex.plugin.grib.notify.GribNotifyQueue">
<property name="destinationUri" value="jms-generic:queue:gribNotification"/>
</bean>
<bean id="gribDecoder" class="com.raytheon.edex.plugin.grib.GribDecoder" />
<bean id="gribSpatialCache"
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup"
factory-method="getInstance" />
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gribStaticDataGenerator"
class="com.raytheon.edex.plugin.grib.topo.StaticDataGenerator"
factory-method="getInstance"/>
<bean id="ingest-grib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsIngestGribConfig" />
<property name="taskExecutor" ref="gribThreadPool" />
</bean>
<bean id="jmsIngestGribConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsConfig" factory-method="copy">
</bean>
<bean id="gribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="4" />
@ -54,15 +31,30 @@
<bean id="largeFileLockRelease" class="com.raytheon.edex.plugin.grib.GribLockRelease" />
<bean id="gribCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grib-camel"/>
<bean id="gribDecodeCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="gridProcessCamelRegistered">
<constructor-arg ref="grib-decode"/>
</bean>
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gridToGribConverter"
class="com.raytheon.edex.plugin.grib.GridToGribConverter" factory-method="getInstance" />
<camelContext id="grib-camel" xmlns="http://camel.apache.org/schema/spring"
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" />
<bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup"
factory-method="getInstance" />
<bean id="gribSpatialCache"
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<camelContext id="grib-decode" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
@ -77,7 +69,7 @@
<to uri="ingest-grib:queue:Ingest.Grib" />
</route>
<!-- Begin Grib Routes -->
<!-- Begin Grib Decode Route -->
<route id="gribIngestRoute">
<from uri="ingest-grib:queue:Ingest.Grib?concurrentConsumers=4&amp;destinationResolver=#qpidDurableResolver" />
<setHeader headerName="pluginName">
@ -96,17 +88,14 @@
<bean ref="largeFileChecker" />
<bean ref="gribDecoder" method="decode" />
<bean ref="gribSplitter" method="clean" />
<!-- send for processing -->
<bean ref="gribPostProcessor" method="process" />
<bean ref="persist" method="persist" />
<bean ref="index" method="index" />
<bean ref="processUtil" method="log" />
<multicast parallelProcessing="false">
<to uri="directvm:gribIngestAlert"/>
<to uri="directvm:gribNotification"/>
<to uri="vm:staticTopoGenerator"/>
<!-- send to persistence and topo -->
<to uri="directvm:gridProcessRoute" />
<!-- send to transform -->
<to uri="directvm:gridToGrib"/>
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
@ -124,31 +113,11 @@
</split>
</route>
<route id="gribIngestAlert">
<from uri="directvm:gribIngestAlert" />
<bean ref="toDataURI" method="toDataURI" />
<to uri="vm:stageNotification" />
</route>
<route id="gribNotification">
<from uri="directvm:gribNotification"/>
<bean ref="gribNotifyQueue" method="addRecords"/>
</route>
<route id="gridToGrib">
<from uri="directvm:gridToGrib"/>
<bean ref="gridToGribConverter" method="convert"/>
<to uri="directvm:indexAlert" />
</route>
<route id="gribStaticTopoGen">
<from uri="vm:staticTopoGenerator" />
<!-- genStaticTopoRecords stores to hdf5 and the database as part of method -->
<bean ref="gribStaticDataGenerator"/>
<multicast parallelProcessing="false">
<to uri="directvm:gribIngestAlert"/>
<to uri="directvm:gribNotification"/>
</multicast>
</route>
</camelContext>
</beans>

View file

@ -146,9 +146,11 @@ public class RemoteRequestServer {
&& manager.getAuthenticator() != null
&& manager.getRoleStorage() != null;
if (!ableToValidatePrivilegedRequests) {
IllegalStateException throwable = new IllegalStateException(
"Unable to perform priviledged request validation, required objects not set (IAuthenticator, IRoleStorage, IAuthenticationStorage). ALL REQUESTS WILL BE EXECUTED!");
statusHandler
.handle(Priority.PROBLEM,
"Unable to perform priviledged request validation, required objects not set (IAuthenticator, IRoleStorage, IAuthenticationStorage). ALL REQUESTS WILL BE EXECUTED!");
throwable.getLocalizedMessage(), throwable);
}
}
}

View file

@ -22,7 +22,7 @@
<bean id="gridcoveragelookup"
class="com.raytheon.uf.common.gridcoverage.lookup.GridCoverageLookup"
factory-method="getInstance"
depends-on="serializeServer,getGridCoverageHandlerRegistered,queryDataRegistered,registerRequestServiceRouter"
depends-on="serializeServer,getGridCoverageHandlerRegistered,queryDataRegistered,registerRequestServiceRouter,authFactory"
lazy-init="true" />
<bean id="gridcoverageRegistered" factory-bean="dbPluginRegistry"

View file

@ -0,0 +1,70 @@
<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://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="gridNotifyQueue"
class="com.raytheon.edex.plugin.grib.notify.GribNotifyQueue">
<property name="destinationUri" value="jms-generic:queue:gridNotification"/>
</bean>
<bean id="gridStaticDataGenerator"
class="com.raytheon.edex.plugin.grib.topo.StaticDataGenerator"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="gridProcessCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grid-process"/>
</bean>
<camelContext id="grid-process" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!-- Begin Grid Process Route -->
<route id="gridProcessRoute">
<from uri="directvm:gridProcessRoute" />
<doTry>
<pipeline>
<bean ref="persist" method="persist" />
<bean ref="index" method="index" />
<bean ref="processUtil" method="log" />
<multicast parallelProcessing="false">
<!-- send to alerts -->
<to uri="directvm:gridIngestAlert"/>
<!-- notify grid -->
<to uri="directvm:gridNotification"/>
<!-- generate topo -->
<to uri="vm:gridStaticTopoGen"/>
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="gridIngestAlert">
<from uri="directvm:gridIngestAlert" />
<bean ref="toDataURI" method="toDataURI" />
<to uri="vm:stageNotification" />
</route>
<route id="gridNotification">
<from uri="directvm:gridNotification"/>
<bean ref="gridNotifyQueue" method="addRecords"/>
</route>
<route id="gridStaticTopoGen">
<from uri="vm:staticTopoGenerator" />
<bean ref="gridStaticDataGenerator"/>
<multicast parallelProcessing="false">
<to uri="directvm:gridIngestAlert"/>
<to uri="directvm:gridNotification"/>
</multicast>
</route>
</camelContext>
</beans>