Issue #2272 - EDEX updates for ALR

- added an EDEX ingest hydro mode
- a cluster task can now be specified via an EDEX properties file
- Amend: added purge-logs to hydro ingest
- Amend: created the hydro request mode
- Amend: created environment properties files for the new EDEX instances
- Amend: cluster prefix is now defined statically

Change-Id: Ic60c988751cf75b9433c11fa71c04ab5190f6369

Former-commit-id: d1f201a579b9a0421295df26c9ad17717581073f
This commit is contained in:
Bryan Kowal 2013-08-26 17:48:02 -05:00 committed by Steve Harris
parent e65b8a9f6e
commit 73690a97aa
6 changed files with 134 additions and 2 deletions

View file

@ -113,6 +113,58 @@
<exclude>cpgsrv-spring.xml</exclude>
<exclude>.*sbn-simulator.*</exclude>
</mode>
<mode name="ingestHydro">
<include>distribution-spring.xml</include>
<include>manualIngest-common.xml</include>
<include>manualIngest-spring.xml</include>
<include>shef-ingest.xml</include>
<include>shef-common.xml</include>
<include>ohd-common.xml</include>
<include>alarmWhfs-spring.xml</include>
<include>arealffgGenerator-spring.xml</include>
<include>arealQpeGen-spring.xml</include>
<include>DPADecoder-spring.xml</include>
<include>dqcPreprocessor-spring.xml</include>
<include>floodArchiver-spring.xml</include>
<include>freezingLevel-spring.xml</include>
<include>hpeDHRDecoder-spring.xml</include>
<include>ihfsDbPurge-spring.xml</include>
<include>logFilePurger-spring.xml</include>
<include>mpeFieldgen-spring.xml</include>
<include>mpeHpeFilePurge-spring.xml</include>
<include>mpeLightningSrv-ingest.xml</include>
<include>mpeProcessGrib-spring.xml</include>
<include>ohdSetupService-spring.xml</include>
<include>pointDataRetrievel-spring.xml</include>
<include>q2FileProcessor-spring.xml</include>
<include>satpre-spring.xml</include>
<include>purge-logs.xml</include>
</mode>
<mode name="requestHydro">
<include>ohd-common.xml</include>
<include>database-common.xml</include>
<include>ohd-request.xml</include>
<include>alertviz-request.xml</include>
<include>auth-common.xml</include>
<include>auth-request.xml</include>
<include>menus-request.xml</include>
<include>utility-request.xml</include>
<include>management-common.xml</include>
<include>management-request.xml</include>
<include>manualIngest-common.xml</include>
<include>manualIngest-request.xml</include>
<include>nwsauth-request.xml</include>
<include>persist-request.xml</include>
<include>site-common.xml</include>
<include>site-request.xml</include>
<include>time-common.xml</include>
<include>units-common.xml</include>
<include>useradmin-common.xml</include>
<include>useradmin-request.xml</include>
<include>event-common.xml</include>
<include>eventbus-common.xml</include>
<include>edex-request.xml</include>
</mode>
<mode name="ingestGrib">
<include>time-common.xml</include>
<include>auth-common.xml</include>

View file

@ -0,0 +1,29 @@
#!/bin/bash
##
# 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.
##
export INIT_MEM=412 # in Meg
export MAX_MEM=796 # in Meg
export METADATA_POOL_MIN=4
export EDEX_DEBUG_PORT=5006
export EDEX_JMX_PORT=1617
export LOG4J_CONF=log4j-ingest.xml
export MGMT_PORT=9602

View file

@ -0,0 +1,36 @@
#!/bin/bash
##
# 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.
##
export INIT_MEM=128 # in Meg
if [ "$EDEX_ARCH" == "64-bit" ]; then
export MAX_MEM=1648 # in Meg
else
export MAX_MEM=880 # in Meg
fi
export SERIALIZE_POOL_MAX_SIZE=24
export SERIALIZE_STREAM_INIT_SIZE_MB=2
export SERIALIZE_STREAM_MAX_SIZE_MB=8
export JMS_POOL_MIN=8
export JMS_POOL_MAX=24
export EDEX_DEBUG_PORT=5005
export EDEX_JMX_PORT=1616
export MGMT_PORT=9601

View file

@ -48,6 +48,8 @@ import com.raytheon.uf.edex.database.dao.DaoConfig;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 28, 2010 #5050 rjpeter Initial creation from SmartInitTransaction.
* Aug 26, 2013 #2272 bkowal Add a function to see if a cluster suffix has
* been specified via the environment.
*
* </pre>
*
@ -55,6 +57,16 @@ import com.raytheon.uf.edex.database.dao.DaoConfig;
* @version 1.0
*/
public class ClusterLockUtils {
/*
* An optional context suffix can be included in an EDEX properties file.
* This suffix will be appended to the details of each cluster task.
*/
public static final String CLUSTER_SUFFIX;
static {
CLUSTER_SUFFIX = System.getProperty("cluster.suffix") != null ? "-"
+ System.getProperty("cluster.suffix") : "";
}
public enum LockState {
SUCCESSFUL, ALREADY_RUNNING, FAILED, OLD;

View file

@ -40,6 +40,7 @@ import com.raytheon.uf.edex.database.cluster.ClusterTask;
* ------------ ---------- ----------- --------------------------
* Feb 19, 2010 njensen Initial creation
* Aug 21, 2013 DR 16521 D. Friedman Ensure endpoint URI is used for cluster entry
* Aug 26, 2013 DR 2272 bkowal Append an optional suffix to the cluster task details
*
* </pre>
*
@ -62,7 +63,7 @@ public class ClusteredQuartzEndpoint extends QuartzEndpoint {
@Override
public void onJobExecute(final JobExecutionContext jobExecutionContext)
throws JobExecutionException {
String jName = getEndpointUri();
String jName = getEndpointUri() + ClusterLockUtils.CLUSTER_SUFFIX;
long period = Math.abs(jobExecutionContext.getFireTime().getTime()
- jobExecutionContext.getNextFireTime().getTime()) / 2;
ClusterTask ct = ClusterLockUtils.lock(TASK, jName, period, false);

View file

@ -50,6 +50,7 @@ import com.raytheon.uf.edex.database.cluster.ClusterTask;
* Nov 10, 2010 5050 rjpeter Initial creation
* Jul 16, 2012 DR 15073 D. Friedman Stop consumers instead of whole context
* May 14, 2013 1989 njensen Camel 2.11 compatibility
* Aug 26, 2013 DR 2272 bkowal Append an optional suffix to the cluster task details
* </pre>
*
* @author rjpeter
@ -112,8 +113,9 @@ public class ClusteredContextManager {
}
public void checkClusteredContexts() {
String suffix = ClusterLockUtils.CLUSTER_SUFFIX;
for (CamelContext camelContext : clusteredContextList) {
String contextName = camelContext.getName();
String contextName = camelContext.getName() + suffix;
ClusterTask lock = ClusterLockUtils.lock(taskName, contextName,
myName, timeOutMillis, false);
boolean activateRoute = false;