Merge branch 'development' into omaha_13.3.1

Former-commit-id: 67f090638f [formerly 67f090638f [formerly 52683c1ffba08b80b0d1f2b619161e108ca598b8]]
Former-commit-id: 6ec9e73035
Former-commit-id: 0051276ad1
This commit is contained in:
Steve Harris 2013-02-25 15:58:48 -06:00
commit 140ae3191c
69 changed files with 2103 additions and 1624 deletions

View file

@ -46,6 +46,7 @@ import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
* ------------ ---------- ----------- --------------------------
* Jul 3, 2007 chammack Initial Creation.
* Jan 14, 2013 1442 rferrel Added method searchTreeUsingContraints.
* Addition checks on constraints.
*
* </pre>
*
@ -356,12 +357,7 @@ public class DecisionTree<T> {
|| (c == RequestConstraint.WILDCARD
|| parsedValue == null || c
.evaluate(parsedValue))) {
// for (int k = 0; k < lvl; k++) {
// System.out.print(" ");
// }
foundSomething = true;
// System.out.println("visit: " + curNode.decisionAttribute
// + ":: " + c);
searchTree(n, searchCriteria, resultList, lvl + 1,
evaluatedConstraint);
}
@ -370,13 +366,9 @@ public class DecisionTree<T> {
// Evaluate using existing constraints.
for (Node n : curNode.nodeChildren) {
RequestConstraint c = n.decision;
if (parsedValue.equals(c)) {
// for (int k = 0; k < lvl; k++) {
// System.out.print(" ");
// }
if ((c == null && parsedValue == null)
|| (parsedValue != null && parsedValue.equals(c))) {
foundSomething = true;
// System.out.println("visit: " + curNode.decisionAttribute
// + ":: " + c);
searchTree(n, searchCriteria, resultList, lvl + 1,
evaluatedConstraint);
}
@ -521,8 +513,6 @@ public class DecisionTree<T> {
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("pluginName", "grib");
dataMap.put("model", "nam12");
// List<Integer> list = iDT.searchTree(dataMap);
// System.out.println(list.get(0));
Map<String, Object> dataMap2 = new HashMap<String, Object>();
dataMap2.put("pluginName", "grib");

View file

@ -79,13 +79,16 @@ import com.raytheon.viz.ui.widgets.duallist.DualListConfig;
* Dec 18, 2012 1436 bgonzale When creating the filter dialogs, use the loaded
* configuration when populating the filters. Fixed selection
* icon update when loading from a file.
* Feb 24, 2013 1620 mpduff Fixed set clean issue when loading configurations. Set clean
* needs to be called after the data load job is complete.
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class FilterExpandBar extends Composite implements IFilterUpdate, IExpandControlAction {
public class FilterExpandBar extends Composite implements IFilterUpdate,
IExpandControlAction {
/**
* Filter expand bar.
@ -126,10 +129,10 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
private ReferencedEnvelope envelope;
/**
* Constructor.
* Constructor.
*
* @param parent
* The parent composite
* @param parent
* The parent composite
*/
public FilterExpandBar(Composite parent) {
super(parent, SWT.NONE);
@ -158,7 +161,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
gd.widthHint = 600;
expandBar.setLayoutData(gd);
FilterDefinitionManager filterMan = FilterDefinitionManager.getInstance();
FilterDefinitionManager filterMan = FilterDefinitionManager
.getInstance();
dataTypeFilterXml = filterMan.getDataTypeXml();
filterXml = filterMan.getFilterXml();
@ -174,7 +178,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
layout.marginHeight = 0;
layout.marginWidth = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
composite
.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
ExpandBarControlsConfig expBarConfig = new ExpandBarControlsConfig();
expBarConfig.setCollapseAll(true);
@ -240,6 +245,7 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
notifyListeners(SWT.SetData, new Event());
DataDeliveryGUIUtils
.markNotBusyInUIThread(jobParent);
setClean();
}
});
}
@ -256,7 +262,7 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
String displayName = data.getDisplayName();
String filterID = data.getId();
// String clazz = data.getClazz();
// String clazz = data.getClazz();
ArrayList<SettingsXML> settingsList = data.getSettingsList();
DualListConfig dualConfig = new DualListConfig();
@ -266,26 +272,20 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
for (SettingsXML setting : settingsList) {
if (setting.getName().equalsIgnoreCase("availableText")) {
dualConfig.setAvailableListLabel(setting.getValue());
}
else if (setting.getName().equalsIgnoreCase("selectedText")) {
} else if (setting.getName().equalsIgnoreCase("selectedText")) {
dualConfig.setSelectedListLabel(setting.getValue());
}
else if (setting.getName().equalsIgnoreCase("showUpDownBtns")) {
} else if (setting.getName().equalsIgnoreCase("showUpDownBtns")) {
dualConfig.setShowUpDownBtns(getBoolean(setting.getValue()));
}
else if (setting.getName().equalsIgnoreCase("listWidth")) {
} else if (setting.getName().equalsIgnoreCase("listWidth")) {
dualConfig.setShowUpDownBtns(getBoolean(setting.getValue()));
}
else if (setting.getName().equalsIgnoreCase("listHeight")) {
} else if (setting.getName().equalsIgnoreCase("listHeight")) {
dualConfig.setShowUpDownBtns(getBoolean(setting.getValue()));
}
else if (setting.getName().equalsIgnoreCase("showRegex")) {
} else if (setting.getName().equalsIgnoreCase("showRegex")) {
filterConfig.setRegExVisible(getBoolean(setting.getValue()));
}
else if (setting.getName().equalsIgnoreCase("showMatch")) {
filterConfig.setMatchControlVisible(getBoolean(setting.getValue()));
}
else if (setting.getName().equalsIgnoreCase("showDualList")) {
} else if (setting.getName().equalsIgnoreCase("showMatch")) {
filterConfig.setMatchControlVisible(getBoolean(setting
.getValue()));
} else if (setting.getName().equalsIgnoreCase("showDualList")) {
filterConfig.setDualListVisible(getBoolean(setting.getValue()));
}
}
@ -324,7 +324,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
filterConfig.setFilterID(filterID);
expItem.setText(displayName);
FilterComp filterComp = new FilterComp(expandBar, SWT.NONE, this, filterConfig, idx);
FilterComp filterComp = new FilterComp(expandBar, SWT.NONE, this,
filterConfig, idx);
expItem.setHeight(filterComp.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
expItem.setControl(filterComp);
@ -355,7 +356,7 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
* Parent component.
*/
private void addSeparator(Composite parentComp) {
GridLayout gl = (GridLayout)parentComp.getLayout();
GridLayout gl = (GridLayout) parentComp.getLayout();
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
gd.horizontalSpan = gl.numColumns;
@ -381,7 +382,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
private void displayEnableFilterDialog() {
if (expandBar.getItemCount() == 0) {
MessageBox mb = new MessageBox(this.getShell(), SWT.ICON_ERROR | SWT.OK);
MessageBox mb = new MessageBox(this.getShell(), SWT.ICON_ERROR
| SWT.OK);
mb.setText("Warning");
mb.setMessage("No filters are available to enable/disable.");
mb.open();
@ -389,14 +391,15 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
}
if (enableFilterDlg == null || enableFilterDlg.isDisposed()) {
enableFilterDlg = new EnableFilterDlg(this.getShell(), getFilterNames(), getEnabledFilters());
enableFilterDlg = new EnableFilterDlg(this.getShell(),
getFilterNames(), getEnabledFilters());
enableFilterDlg.open();
if (enableFilterDlg.getReturnValue() != null && (Boolean)enableFilterDlg.getReturnValue() == true) {
if (enableFilterDlg.getReturnValue() != null
&& (Boolean) enableFilterDlg.getReturnValue() == true) {
this.enableFilters(enableFilterDlg.getSelectedIndexes());
}
}
else {
} else {
enableFilterDlg.bringToTop();
}
}
@ -463,7 +466,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
ArrayList<Integer> enabledIndexes = new ArrayList<Integer>();
for (int i = 0; i < expandBar.getItems().length; i++) {
AbstractFilterComp afc = (AbstractFilterComp)(expandBar.getItem(i).getControl());
AbstractFilterComp afc = (AbstractFilterComp) (expandBar.getItem(i)
.getControl());
if (afc.isEnabled()) {
enabledIndexes.add(i);
}
@ -480,11 +484,12 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
*/
public void enableFilters(ArrayList<Integer> indexes) {
for (ExpandItem ei : expandBar.getItems()) {
((AbstractFilterComp)ei.getControl()).setEnabled(false);
((AbstractFilterComp) ei.getControl()).setEnabled(false);
}
for (int idx : indexes) {
((AbstractFilterComp)(expandBar.getItem(idx).getControl())).setEnabled(true);
((AbstractFilterComp) (expandBar.getItem(idx).getControl()))
.setEnabled(true);
}
}
@ -551,7 +556,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
@Override
public void clearAllAction() {
MessageBox mb = new MessageBox(this.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
MessageBox mb = new MessageBox(this.getShell(), SWT.ICON_QUESTION
| SWT.YES | SWT.NO);
mb.setText("Clear All Filters");
mb.setMessage("You are about to clear all of your filter settings. This\n"
+ "cannot be undone.\n\nDo you wish to continue?");
@ -563,7 +569,7 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
for (ExpandItem ei : expandBar.getItems()) {
if (ei.getControl() instanceof FilterComp) {
((FilterComp)ei.getControl()).resetControls();
((FilterComp) ei.getControl()).resetControls();
}
}
}
@ -600,7 +606,8 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
}
private void updateFilterSettings() {
ArrayList<FilterTypeXML> filterTypeList = filterSettingsXml.getFilterTypeList();
ArrayList<FilterTypeXML> filterTypeList = filterSettingsXml
.getFilterTypeList();
if (filterTypeList != null && filterTypeList.size() > 0) {
for (FilterTypeXML ftx : filterTypeList) {
if (ftx.getFilterType().equals("Data Type")) {
@ -613,12 +620,12 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
break;
}
}
if (filterList != null) {
// createExpandItems();
for (FilterTypeXML filterTypeXml : filterTypeList) {
String filterType = filterTypeXml.getFilterType();
if (filterList.contains(filterType)) {
for (String filter : filterList) {
if (filter.equals(filterType)) {
@ -627,12 +634,18 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
if (ei.getText().equals(filter)) {
Control control = ei.getControl();
if (control instanceof FilterComp) {
FilterComp fc = (FilterComp)control;
String[] items = filterTypeXml.getValues().toArray(
new String[filterTypeXml.getValues().size()]);
if (items != null && items.length > 0) {
FilterComp fc = (FilterComp) control;
String[] items = filterTypeXml
.getValues()
.toArray(
new String[filterTypeXml
.getValues()
.size()]);
if (items != null
&& items.length > 0) {
fc.selectItems(items);
ei.setImage(filterImgs.getExpandItemImage(ExpandItemState.Entries));
ei.setImage(filterImgs
.getExpandItemImage(ExpandItemState.Entries));
}
}
}
@ -646,14 +659,17 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
}
/**
* @param filterSettingsXml
* Populate the filters.
*
* @param filterSettingsXml
* Settings to populate
*/
public void populateFilterSettingsXml(FilterSettingsXML filterSettingsXml) {
ExpandItem[] items = expandBar.getItems();
for (ExpandItem item : items) {
Control control = item.getControl();
if (control instanceof FilterComp) {
FilterComp fc = (FilterComp)control;
FilterComp fc = (FilterComp) control;
String[] selectedItems = fc.getSelectedListItems();
ArrayList<String> values = new ArrayList<String>();
for (String selectedItem : selectedItems) {
@ -687,7 +703,7 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
public boolean isDirty() {
ExpandItem[] items = expandBar.getItems();
for (ExpandItem item : items) {
FilterComp comp = (FilterComp)item.getControl();
FilterComp comp = (FilterComp) item.getControl();
if (comp != null) {
if (comp.isDirty()) {
return true;
@ -704,16 +720,20 @@ public class FilterExpandBar extends Composite implements IFilterUpdate, IExpand
public void setClean() {
ExpandItem[] items = expandBar.getItems();
for (ExpandItem item : items) {
FilterComp comp = (FilterComp)item.getControl();
FilterComp comp = (FilterComp) item.getControl();
if (comp != null) {
comp.setDirty(false);
}
}
}
/**
* Set the referenced envelope.
*
* @param envelope
* The ReferencedEnvelope
*/
public void setEnvelope(ReferencedEnvelope envelope) {
this.envelope = envelope;
}
}

View file

@ -24,6 +24,7 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.stats;bundle-version="1.0.0",
com.raytheon.uf.viz.stats;bundle-version="1.0.0",
com.raytheon.uf.common.event;bundle-version="1.0.0",
com.raytheon.uf.common.dataaccess;bundle-version="1.0.0",
org.apache.log4j;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy

View file

@ -91,6 +91,7 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
* 02/01/13 1569 D. Hladky updated constants
* 02/01/13 1627 D. Hladky removed unused(useless) db load method
* 02/19/13 1639 njensen Replaced ConcurrentHashMaps with data structures
* 02/20/13 1635 D. Hladky Fixed multi guidance sources
*
* </pre>
*
@ -119,23 +120,6 @@ public class FFMPMonitor extends ResourceMonitor {
private FFMPSiteDataContainer siteDataMap = new FFMPSiteDataContainer();
// /** FFMP Records indexed by site, times and field **/
// public ConcurrentHashMap<String, ConcurrentHashMap<String,
// FFMPCacheRecord>> ffmpData = null;
//
// // list of earliest available date queried by site, sourceName
// public ConcurrentHashMap<String, ConcurrentHashMap<String, Date>>
// ffmpAvailableUriQueryDates = null;
//
// // map by site, sourceName, Date
// public ConcurrentHashMap<String, ConcurrentHashMap<String,
// ConcurrentSkipListMap<Date, List<String>>>> ffmpAvailableUris = null;
//
// // map by field, huc, and the URIs that have been loaded for
// public ConcurrentHashMap<String, ConcurrentHashMap<String,
// ConcurrentHashMap<String, ConcurrentHashMap<String, String>>>>
// ffmpLoadedUris = null;
// Interpolation Guidance Sources
public FFMPGuidanceInterpolation interpolation = null;
@ -890,7 +874,7 @@ public class FFMPMonitor extends ResourceMonitor {
ffmpSplash.close();
break;
}
Thread.sleep(1000);
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
if (ffmpSplash != null) {

View file

@ -1122,19 +1122,21 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
private void updateGapValueLabel(double gapVal) {
if (gapVal > 0.75) {
gapValueLbl.setBackground(getDisplay()
.getSystemColor(SWT.COLOR_RED));
} else if (gapVal > 0.30) {
gapValueLbl.setBackground(getDisplay().getSystemColor(
SWT.COLOR_YELLOW));
} else {
gapValueLbl.setBackground(getDisplay().getSystemColor(
SWT.COLOR_GREEN));
}
if (gapValueLbl != null) {
if (gapVal > 0.75) {
gapValueLbl.setBackground(getDisplay().getSystemColor(
SWT.COLOR_RED));
} else if (gapVal > 0.30) {
gapValueLbl.setBackground(getDisplay().getSystemColor(
SWT.COLOR_YELLOW));
} else {
gapValueLbl.setBackground(getDisplay().getSystemColor(
SWT.COLOR_GREEN));
}
String str = String.format("%2.2f ", gapVal);
gapValueLbl.setText(str);
String str = String.format("%2.2f ", gapVal);
gapValueLbl.setText(str);
}
}
private void initTimeDuration() {

View file

@ -20,6 +20,7 @@
package com.raytheon.uf.viz.monitor.ffmp.ui.dialogs;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@ -46,8 +47,10 @@ import com.raytheon.uf.viz.monitor.ffmp.xml.FFMPTableColumnXML;
* ------------ ---------- ----------- --------------------------
* Mar 8, 2011 lvenable Initial creation
* Mar 8, 2012 DR 14406 gzhang Fixing QPF Column Title Missing
* Feb 19, 2013 1635 dhladky Fixed multiple guidance displays
* </pre>
*
*
* @author lvenable
* @version 1.0
*/
@ -261,6 +264,7 @@ public class FfmpTableConfigData {
}
ArrayList<String> guidTypes = productXml.getAvailableGuidanceTypes();
Collections.sort(guidTypes);
ffmpTableColMap.put(COLUMN_NAME.NAME.getColumnName(),
COLUMN_NAME.NAME.getColumnName());

View file

@ -160,6 +160,7 @@ import com.vividsolutions.jts.geom.Point;
* 02/01/13 1569 D. Hladky Added constants
* 10 Feb 2013 1584 mpduff Add performance logging.
* Feb 19, 2013 1639 njensen Replaced FFMPCacheRecord with FFMPRecord
* Feb 20, 2013 1635 dhladky Fixed multiple guidance display
* </pre>
*
* @author dhladky
@ -475,7 +476,7 @@ public class FFMPResource extends
} else {
while (!loader.isDone) {
try {
Thread.sleep(1000);
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
@ -487,7 +488,7 @@ public class FFMPResource extends
while (!loader.isDone) {
try {
Thread.sleep(1000);
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
@ -708,7 +709,7 @@ public class FFMPResource extends
value = getGuidanceRecord().getBasinData(FFMPRecord.ALL)
.getMaxGuidanceValue(pfafs,
getGuidanceInterpolation(getFFGName()),
getGuidSourceExpiration(), fips);
getGuidSourceExpiration(getFFGName()), fips);
break;
}
case QPE: {
@ -803,6 +804,7 @@ public class FFMPResource extends
private float forceValue(List<Long> pfafs, FFMPBasin basin,
float unforcedValue) {
float value = unforcedValue;
String ffgType = getFFGName();
if (forceUtil == null) {
forceUtil = new FFFGForceUtil(this, getFFGName());
@ -821,15 +823,15 @@ public class FFMPResource extends
// Recalculate the guidance using the forced value(s)
value = guidRecord.getBasinData(FFMPRecord.ALL)
.getAverageGuidanceValue(pfafList,
this.getGuidanceInterpolation(getFFGName()),
this.getGuidanceInterpolation(ffgType),
new Float(value), forcedPfafs,
getGuidSourceExpiration());
getGuidSourceExpiration(ffgType));
} else if (forcedPfafs.size() > 0) {
value = guidRecord.getBasinData(FFMPRecord.ALL)
.getAverageGuidanceValue(pfafList,
this.getGuidanceInterpolation(getFFGName()),
this.getGuidanceInterpolation(ffgType),
Float.NaN, forcedPfafs,
getGuidSourceExpiration());
getGuidSourceExpiration(ffgType));
}
}
@ -1870,6 +1872,7 @@ public class FFMPResource extends
float qpe = 0.0f;
float guid = 0.0f;
float diff = Float.NaN;
String ffgType = getFFGName();
try {
if (aggregate) {
@ -1886,8 +1889,8 @@ public class FFMPResource extends
guids = getGuidanceRecord()
.getBasinData(FFMPRecord.ALL)
.getGuidanceValues(pfafs,
getGuidanceInterpolation(getFFGName()),
getGuidSourceExpiration());
getGuidanceInterpolation(ffgType),
getGuidSourceExpiration(ffgType));
}
if ((qpes != null) && (guids != null)) {
diff = FFMPUtils.getMaxDiffValue(qpes, guids);
@ -1908,7 +1911,7 @@ public class FFMPResource extends
guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(getHuc()).get(key),
recentTime, getFFGName());
recentTime, ffgType);
diff = FFMPUtils.getDiffValue(qpe, guid);
}
@ -1924,7 +1927,7 @@ public class FFMPResource extends
guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(FFMPRecord.ALL).get(key),
recentTime, getFFGName());
recentTime, ffgType);
guid = forceValue(pfafs,
getBasin(key, getField(), recentTime, aggregate),
guid);
@ -1932,7 +1935,7 @@ public class FFMPResource extends
}
}
} catch (Exception e) {
e.printStackTrace();
statusHandler.handle(Priority.ERROR, "Error caculating Diff", e);
}
return diff;
}
@ -1950,6 +1953,7 @@ public class FFMPResource extends
float qpe = 0.0f;
float guid = 0.0f;
float ratio = Float.NaN;
String ffgType = getFFGName();
try {
if (aggregate) {
@ -1966,8 +1970,8 @@ public class FFMPResource extends
guids = getGuidanceRecord()
.getBasinData(FFMPRecord.ALL)
.getGuidanceValues(pfafs,
getGuidanceInterpolation(getFFGName()),
getGuidSourceExpiration());
getGuidanceInterpolation(ffgType),
getGuidSourceExpiration(ffgType));
}
if ((qpes != null) && (guids != null)) {
ratio = FFMPUtils.getMaxRatioValue(qpes, guids);
@ -1987,7 +1991,7 @@ public class FFMPResource extends
guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(getHuc()).get(key),
recentTime, getFFGName());
recentTime, ffgType);
ratio = FFMPUtils.getRatioValue(qpe, guid);
}
}
@ -2001,12 +2005,12 @@ public class FFMPResource extends
guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(FFMPRecord.ALL).get(key),
recentTime, getFFGName());
recentTime, ffgType);
ratio = FFMPUtils.getRatioValue(qpe, guid);
}
}
} catch (Exception e) {
e.printStackTrace();
statusHandler.handle(Priority.ERROR, "Error caculating Ratio", e);
}
return ratio;
}
@ -3426,14 +3430,14 @@ public class FFMPResource extends
for (SourceXML ffgSource : getProduct().getGuidanceSourcesByType(
ffgGraphType)) {
if (guidBasin.getValue(ffgSource.getSourceName(),
guidanceInterpolator, getGuidSourceExpiration()) != null) {
guidanceInterpolator, getGuidSourceExpiration(ffgGraphType)) != null) {
double time = FFMPGuiUtils.getTimeDiff(mostRecentRefTime,
FFMPGuiUtils.getHourDisplacement(mostRecentRefTime,
ffgSource.getDurationHour()));
fgd.setGuid(time, (double) guidBasin.getValue(
ffgSource.getSourceName(), guidanceInterpolator,
getGuidSourceExpiration()));
getGuidSourceExpiration(ffgGraphType)));
guidTimes.add(time);
}
}
@ -3503,13 +3507,13 @@ public class FFMPResource extends
guidanceInterpolator
.getInterpolationOffset(),
guidanceInterpolator,
getGuidSourceExpiration());
getGuidSourceExpiration(ffgGraphType));
} else {
if (guidanceInterpolator.getSource1() != null) {
guidancev = guidBasin.getValue(
guidanceInterpolator.getSource1(),
guidanceInterpolator,
getGuidSourceExpiration());
getGuidSourceExpiration(ffgGraphType));
}
}
@ -3934,12 +3938,12 @@ public class FFMPResource extends
getGuidanceInterpolation(guidType)
.getInterpolationOffset(),
getGuidanceInterpolation(guidType),
getGuidSourceExpiration());
getGuidSourceExpiration(guidType));
} else {
dvalue = basin.getValue(getGuidanceInterpolation(guidType)
.getStandardSource(),
getGuidanceInterpolation(guidType),
getGuidSourceExpiration());
getGuidSourceExpiration(guidType));
}
if (dvalue == FFMPUtils.MISSING) {
@ -3948,7 +3952,7 @@ public class FFMPResource extends
} else {
dvalue = basin.getValue(getPrimarySource(), recentTime,
getGuidanceInterpolation(guidType),
getGuidSourceExpiration());
getGuidSourceExpiration(guidType));
}
}
@ -4125,18 +4129,12 @@ public class FFMPResource extends
*
* @return
*/
public long getGuidSourceExpiration() {
public long getGuidSourceExpiration(String guidType) {
if (guidSourceExpiration == 0l) {
if (getProduct() != null) {
String guidSrc = FFMPConfig.getInstance().getFFMPConfigData()
.getIncludedGuids();
if (guidSrc.contains(",")) {
String[] parts = guidSrc.split(",");
guidSrc = parts[0];
}
SourceXML source = getProduct().getGuidanceSourcesByType(
guidSrc).get(0);
guidType).get(0);
guidSourceExpiration = source
.getExpirationMinutes(getSiteKey())
* TimeUtil.MILLIS_PER_MINUTE;

View file

@ -35,6 +35,7 @@ import com.raytheon.uf.common.stats.StatisticsEvent;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 8, 2013 mpduff Initial creation
* Feb 19, 2013 1635 dhladky Safety from null
*
* </pre>
*
@ -106,8 +107,9 @@ public class StatsCollector {
*/
public void setStop(String key) {
StatisticsEvent event = statsDataMap.remove(key);
event.finalizeEvent();
EventBus.publish(event);
if (event != null) {
event.finalizeEvent();
EventBus.publish(event);
}
}
}

View file

@ -42,6 +42,7 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
* Jan 31, 2013 bkowal Initial creation
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
* single request.
* Feb 19, 2013 1552 mpduff Handle empty legend text.
*
* </pre>
*
@ -54,7 +55,7 @@ public abstract class AbstractDataAccessResource<T extends AbstractDataAccessRes
protected static final String _SPACE_ = " ";
private String genericLegendText;
private String genericLegendText = StringUtils.EMPTY;
/**
* Constructor
@ -77,6 +78,9 @@ public abstract class AbstractDataAccessResource<T extends AbstractDataAccessRes
}
}
/**
* {@inheritDoc}
*/
@Override
protected void initInternal(IGraphicsTarget target) throws VizException {
DataTime[] timesToLoad = descriptor.getFramesInfo().getTimeMap()
@ -92,6 +96,9 @@ public abstract class AbstractDataAccessResource<T extends AbstractDataAccessRes
}
}
/**
* {@inheritDoc}
*/
@Override
public void remove(DataTime dataTime) {
;// for now never remove anything from dataTimes since there are no
@ -132,7 +139,10 @@ public abstract class AbstractDataAccessResource<T extends AbstractDataAccessRes
* the request-type specific legend text
*/
private final String buildLegendText(String genericLegendText) {
StringBuilder stringBuilder = new StringBuilder(genericLegendText);
StringBuilder stringBuilder = new StringBuilder();
if (genericLegendText != null) {
stringBuilder.append(genericLegendText);
}
stringBuilder.append(this.padWithSeparator(this
.buildLegendTextInternal()));
return stringBuilder.toString();

View file

@ -54,7 +54,6 @@ import com.raytheon.viz.dataaccess.rsc.AbstractDataAccessResourceData;
@XmlAccessorType(XmlAccessType.NONE)
public class GenericGeometryResourceData extends
AbstractDataAccessResourceData<IGeometryData> {
/**
* Constructor
*/

View file

@ -312,7 +312,7 @@ public interface IReferenceSetManager {
*
* @param listener
*/
public void evaluateActiveRefSet(IPythonJobListener<?> listener);
public void evaluateActiveRefSet(IPythonJobListener<ReferenceData> listener);
/**
* Force the active ref set to be re-evalutated

View file

@ -1762,13 +1762,16 @@ public class ReferenceSetManager implements IReferenceSetManager,
}
@Override
public void evaluateActiveRefSet(IPythonJobListener<?> listener) {
public void evaluateActiveRefSet(IPythonJobListener<ReferenceData> listener) {
ReferenceData active = getActiveRefSet();
if (active.isQuery()) {
// Re-evaluate the activeRefSet
evaluateQuery(active.getQuery(), listener);
} else {
// if non-query,need to fire, but do this in an else otherwise we
// will fire the listener twice for queries
listener.jobFinished(getActiveRefSet());
}
}
@Override
@ -1800,18 +1803,17 @@ public class ReferenceSetManager implements IReferenceSetManager,
*/
@Override
public void receiveMessage(final Message message) {
IPythonJobListener<Object> listener = new IPythonJobListener<Object>() {
IPythonJobListener<ReferenceData> listener = new IPythonJobListener<ReferenceData>() {
@Override
public void jobFailed(Throwable e) {
statusHandler.handle(Priority.ERROR,
"Unable to finish QueryScript job", e);
}
public void jobFinished(Object result) {
public void jobFinished(ReferenceData result) {
getActiveRefSet();
ReferenceData newRef = (ReferenceData) result;
if (!newRef.getGrid().equals(getActiveRefSet().getGrid())) {
setActiveRefSet(newRef);
if (!result.getGrid().equals(getActiveRefSet().getGrid())) {
setActiveRefSet(result);
}
};
};

View file

@ -19,7 +19,7 @@
<vmArgs>-Xincgc -Xmx1280M -Dosgi.instance.area.readOnly=true
-Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError=&quot;capture -t no -p $pid &amp;&quot; -Dlog4j.configuration=log4j-viz-core.xml</vmArgs>
<vmArgsWin>-Dfile.encoding=UTF-8</vmArgsWin>
<vmArgsWin>-Dfile.encoding=UTF-8 -Xmx768M</vmArgsWin>
</launcherArgs>
<windowImages/>

View file

@ -27,6 +27,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -73,6 +74,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* 10-21-09 #1711 bsteffen Updated Baseline and Points to use new ToolsDataManager
* 01/30/2012 DR 14308 D.Friedman Use correct style for arrow types.
* 07/31/2012 #875 rferrel Now uses points.
* Feb 21, 2013 1617 bsteffen fixed vb sounding point selection for
* points which contain the word Point
*
*
* </pre>
@ -91,6 +94,8 @@ public abstract class AbstractDataCatalog implements IDataCatalog {
/** key representing all point and line planes **/
public static final String POINT_LINE_KEY = "PointLine";
public static final Pattern POINT_PATTERN = Pattern.compile("^Point");
/**
*
* @return a list of plugin Names used for the given setting
@ -274,8 +279,9 @@ public abstract class AbstractDataCatalog implements IDataCatalog {
case VARVSHGT:
case CROSSSECTION:
case SOUNDING:
pointLetter = catalogEntry.getSelectedData().getPlanesKey()
.replace("Point", "");
pointLetter = POINT_PATTERN.matcher(
catalogEntry.getSelectedData().getPlanesKey())
.replaceFirst("");
break;
case TIMESERIES:
pointLetter = catalogEntry.getDialogSettings().getPointsSelection()

View file

@ -12,4 +12,5 @@ bin.includes = META-INF/,\
jetty-util-7.2.2.v20101205.jar,\
jetty-webapp-7.2.2.v20101205.jar,\
jetty-xml-7.2.2.v20101205.jar,\
org.apache.jasper.glassfish_2.1.0.v201007080150.jar
org.apache.jasper.glassfish_2.1.0.v201007080150.jar,\
jetty-util-6.1.26.jar

Binary file not shown.

View file

@ -37,11 +37,10 @@
<!-- delete the shell scripts from ${esbDir}/bin/ -->
<echo message="Cleaning target directory: ${edex.root.directory}/bin/" />
<delete>
<delete includeemptydirs="true">
<fileset dir="${edex.root.directory}/bin/">
<include name="*.sh"/>
<include name="wrapper.conf" />
<include name="linux-x86-*/**" />
<include name="yajsw/**" />
</fileset>
</delete>
@ -67,9 +66,6 @@
</fileset>
</copy>
<!-- copy the correct wrapper based on architecture. -->
<antcall target="deploy.esb.wrapper-${architecture}" />
<!-- copy the correct 'libpython.so' based on architecture. -->
<mkdir dir="${edex.root.directory}/lib/lib_illusion" />
<copy todir="${edex.root.directory}/lib/lib_illusion">
@ -81,30 +77,6 @@
<!-- set executable permissions - start.sh. -->
<chmod file="${edex.root.directory}/bin/start.sh" perm="ugo+rx" />
</target>
<target name="deploy.esb.wrapper-x86">
<copy todir="${edex.root.directory}">
<fileset dir="${esb.directory}">
<include name="**/bin/linux-x86-32/**" />
</fileset>
</copy>
<!-- update permissions on the wrapper. -->
<chmod file="${edex.root.directory}/bin/linux-x86-32/wrapper"
perm="ugo+rx" />
</target>
<target name="deploy.esb.wrapper-x86_64">
<copy todir="${edex.root.directory}">
<fileset dir="${esb.directory}">
<include name="**/bin/linux-x86-64/**" />
</fileset>
</copy>
<!-- update permissions on the wrapper. -->
<chmod file="${edex.root.directory}/bin/linux-x86-64/wrapper"
perm="ugo+rx" />
</target>
<target name="deploy.esb-data">
<copy todir="${edex.root.directory}"

View file

@ -1,28 +0,0 @@
#********************************************************************
##
# 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.
##
# Wrapper Properties
#********************************************************************
wrapper.java.classpath.6=%EDEX_HOME%/conf/resources/
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=%EDEX_HOME%/bin/linux-x86-32/
wrapper.java.library.path.4=%EDEX_HOME%/lib/dependencies/org.jep.linux32/

View file

@ -1,27 +0,0 @@
#********************************************************************
##
# 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.
##
# Wrapper Properties
#********************************************************************
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=%EDEX_HOME%/bin/linux-x86-64/
wrapper.java.library.path.4=%EDEX_HOME%/lib/native/linux64/
wrapper.java.library.path.5=%EDEX_HOME%/lib/dependencies/org.jep.linux64/

View file

@ -50,7 +50,6 @@ PYTHON_INSTALL="/awips2/python"
JAVA_INSTALL="/awips2/java"
PSQL_INSTALL="/awips2/psql"
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
@ -60,6 +59,8 @@ awips_home=$(dirname $EDEX_HOME)
# Source The File With The Localization Information
source ${dir}/setup.env
#source /awips2/edex/bin/yajsw/bin/setenv.sh
### AWIPS 1 support ###
if [ -f /etc/rc.config.d/AWIPS ]; then
. /etc/rc.config.d/AWIPS
@ -126,10 +127,6 @@ if [ -e $EDEX_HOME/etc/${RUN_MODE}.sh ]; then
. $EDEX_HOME/etc/${RUN_MODE}.sh
fi
if [ $DEBUG_FLAG == "on" ]; then
. $EDEX_HOME/etc/debug.sh
fi
if [ $PROFILE_FLAG == "on" ]; then
. $EDEX_HOME/etc/profiler.sh
fi
@ -137,14 +134,19 @@ fi
# enable core dumps
#ulimit -c unlimited
# which wrapper do we start (possibly use a symlink instead)?
wrapper_dir=
if [ -d $dir/linux-x86-32 ]; then
wrapper_dir=linux-x86-32
export EDEX_ARCH="32-bit"
# determine whether we are running a 32-bit or 64-bit version of EDEX -
# based on the AWIPS II Java that has been installed
EDEX_BITS="32"
EXPECTED_ARCH=`file ${JAVA_INSTALL}/bin/java | awk '{ print $3; }'`
if [ "${EXPECTED_ARCH}" = "64-bit" ]; then
EDEX_BITS="64"
fi
if [ -d $dir/linux-x86-64 ]; then
wrapper_dir=linux-x86-64
export EDEX_ARCH="64-bit"
export EDEX_BITS=${EDEX_BITS}
WRAPPER_ARGS=""
if [ $DEBUG_FLAG == "on" ]; then
WRAPPER_ARGS="wrapper.java.debug.port=${EDEX_DEBUG_PORT}"
echo "To Debug ... Connect to Port: ${EDEX_DEBUG_PORT}."
fi
$dir/$wrapper_dir/wrapper -c $dir/$CONF_FILE
java -jar ${EDEX_HOME}/bin/yajsw/wrapper.jar -c ${EDEX_HOME}/bin/yajsw/conf/${CONF_FILE} ${WRAPPER_ARGS}

View file

@ -21,50 +21,51 @@
# Wrapper Properties
#********************************************************************
#include.required wrapper.conf
#wrapper.debug=TRUE
wrapper.debug=false
set.default.EDEX_HOME=../..
wrapper.working.dir=..
wrapper.working.dir=/awips2/edex/bin
wrapper.fork_hack=true
# Java Application
wrapper.java.command=java
wrapper.java.command=/awips2/java/bin/java
# necessary for etc/init.d/edex_camel
wrapper.pidfile=./%EDEX_RUN_MODE%.pid
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.pidfile=${EDEX_HOME}/bin/${EDEX_RUN_MODE}.pid
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=%EDEX_HOME%/bin/wrapper.jar
wrapper.java.classpath.2=%EDEX_HOME%/lib/plugins/com.raytheon.uf.edex.esb.camel.launcher.jar
wrapper.java.classpath.3=%EDEX_HOME%/conf/
wrapper.java.classpath.4=%EDEX_HOME%/conf/cache/
wrapper.java.classpath.5=%EDEX_HOME%/conf/spring/
wrapper.java.classpath.6=%EDEX_HOME%/conf/resources/
wrapper.java.classpath.1=${EDEX_HOME}/bin/yajsw/wrapper.jar
wrapper.java.classpath.2=${EDEX_HOME}/conf/
wrapper.java.classpath.3=${EDEX_HOME}/conf/cache/
wrapper.java.classpath.4=${EDEX_HOME}/conf/spring/
wrapper.java.classpath.5=${EDEX_HOME}/conf/resources/
# include ANY jar files that are found in the locations denoted by
# wrapper.search.java.classpath.#
wrapper.search.java.classpath.1=${EDEX_HOME}/lib/dependencies
wrapper.search.java.classpath.2=${EDEX_HOME}/lib/plugins
# set the umask for file/directory creation by the Java process
wrapper.java.umask=0002
# Java Library Path
wrapper.java.library.path.2=%LD_LIBRARY_PATH%
wrapper.java.library.path.3=%EDEX_HOME%/lib/native/linux32/
wrapper.java.library.path.1=${EDEX_HOME}/lib/dependencies/org.jep.linux${EDEX_BITS}/
wrapper.java.library.path.2=${LD_LIBRARY_PATH}
wrapper.java.library.path.3=${EDEX_HOME}/lib/native/linux32/
# this path will not exist for 32-bit EDEX; however, both the 32-bit and 64-bit
# paths are needed for 64-bit EDEX
wrapper.java.library.path.4=${EDEX_HOME}/lib/native/linux64/
# Java Additional Parameters
# note that n is the parameter number starting from 1.
wrapper.java.additional.1=-Dedex.run.mode=%EDEX_RUN_MODE%
wrapper.java.additional.2=-Dedex.home=%EDEX_HOME%
wrapper.java.additional.1=-Dedex.run.mode=${EDEX_RUN_MODE}
wrapper.java.additional.2=-Dedex.home=${EDEX_HOME}
# sets the Maximum Permanent Generation memory size
wrapper.java.additional.3=-XX:MaxPermSize=%MAX_PERM_SIZE%
wrapper.java.additional.3=-XX:MaxPermSize=${MAX_PERM_SIZE}
# sets the JS dev mode flag into the System properties
wrapper.java.additional.4=-Dedex.dev.mode=%DEV_MODE%
wrapper.java.additional.4=-Dedex.dev.mode=${DEV_MODE}
# turn on JMX access to basic JVM instrumentation
wrapper.java.additional.5=-Dcom.sun.management.jmxremote
@ -77,71 +78,84 @@ wrapper.java.additional.7=-XX:+UseConcMarkSweepGC
wrapper.java.additional.8=-XX:+CMSIncrementalMode
wrapper.java.additional.9=-Djava.net.preferIPv4Stack=true
wrapper.java.additional.10=-Ddb.addr=%DB_ADDR%
wrapper.java.additional.11=-Ddb.port=%DB_PORT%
wrapper.java.additional.12=-Dbroker.addr=%BROKER_ADDR%
wrapper.java.additional.10=-Ddb.addr=${DB_ADDR}
wrapper.java.additional.11=-Ddb.port=${DB_PORT}
wrapper.java.additional.12=-Dbroker.addr=${BROKER_ADDR}
wrapper.java.additional.13=-Ddc.db.name=%DC_DB_NAME%
wrapper.java.additional.14=-Dfxa.db.name=%FXA_DB_NAME%
wrapper.java.additional.15=-Dhm.db.name=%HM_DB_NAME%
wrapper.java.additional.16=-Dih.db.name=%IH_DB_NAME%
wrapper.java.additional.17=-Daw.site.identifier=%AW_SITE_IDENTIFIER%
wrapper.java.additional.18=-Ddata.archive.root=%DATA_ARCHIVE_ROOT%
wrapper.java.additional.13=-Ddc.db.name=${DC_DB_NAME}
wrapper.java.additional.14=-Dfxa.db.name=${FXA_DB_NAME}
wrapper.java.additional.15=-Dhm.db.name=${HM_DB_NAME}
wrapper.java.additional.16=-Dih.db.name=${IH_DB_NAME}
wrapper.java.additional.17=-Daw.site.identifier=${AW_SITE_IDENTIFIER}
wrapper.java.additional.18=-Ddata.archive.root=${DATA_ARCHIVE_ROOT}
wrapper.java.additional.19=-Djms.pool.min=%JMS_POOL_MIN%
wrapper.java.additional.20=-Djms.pool.max=%JMS_POOL_MAX%
wrapper.java.additional.21=-Ddb.metadata.pool.min=%METADATA_POOL_MIN%
wrapper.java.additional.22=-Ddb.metadata.pool.max=%METADATA_POOL_MAX%
wrapper.java.additional.19=-Djms.pool.min=${JMS_POOL_MIN}
wrapper.java.additional.20=-Djms.pool.max=${JMS_POOL_MAX}
wrapper.java.additional.21=-Ddb.metadata.pool.min=${METADATA_POOL_MIN}
wrapper.java.additional.22=-Ddb.metadata.pool.max=${METADATA_POOL_MAX}
wrapper.java.additional.23=-Dcom.sun.management.jmxremote.port=%EDEX_JMX_PORT%
wrapper.java.additional.23=-Dcom.sun.management.jmxremote.port=${EDEX_JMX_PORT}
wrapper.java.additional.24=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.25=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.26=-DByteArrayOutputStreamPool.maxPoolSize=%SERIALIZE_POOL_MAX_SIZE%
wrapper.java.additional.27=-DByteArrayOutputStreamPool.initStreamSize=%SERIALIZE_STREAM_INIT_SIZE_MB%
wrapper.java.additional.28=-DByteArrayOutputStreamPool.maxStreamSize=%SERIALIZE_STREAM_MAX_SIZE_MB%
wrapper.java.additional.26=-DByteArrayOutputStreamPool.maxPoolSize=${SERIALIZE_POOL_MAX_SIZE}
wrapper.java.additional.27=-DByteArrayOutputStreamPool.initStreamSize=${SERIALIZE_STREAM_INIT_SIZE_MB}
wrapper.java.additional.28=-DByteArrayOutputStreamPool.maxStreamSize=${SERIALIZE_STREAM_MAX_SIZE_MB}
wrapper.java.additional.29=-Dpypies.server=%PYPIES_SERVER%
wrapper.java.additional.30=-Dpypies.maxConnections=%PYPIES_MAX_CONN%
wrapper.java.additional.29=-Dpypies.server=${PYPIES_SERVER}
wrapper.java.additional.30=-Dpypies.maxConnections=${PYPIES_MAX_CONN}
wrapper.java.additional.31=%DEBUG_PARAM_1%
wrapper.java.additional.32=%DEBUG_PARAM_2%
wrapper.java.additional.33=%DEBUG_PARAM_3%
wrapper.java.additional.34=%DEBUG_PARAM_4%
wrapper.java.additional.35=%PROFILER_PARAM_1%
wrapper.java.additional.35=${PROFILER_PARAM_1}
wrapper.java.additional.36=-Dlog4j.configuration=%LOG4J_CONF%
wrapper.java.additional.36=-Dlog4j.configuration=${LOG4J_CONF}
# moved these from environment.xml to setup.env
wrapper.java.additional.37=-Dhttp.server=%HTTP_SERVER%
wrapper.java.additional.38=-Djms.server=%JMS_SERVER%
wrapper.java.additional.39=-Ddatadelivery.server=%DATADELIVERY_SERVER%
wrapper.java.additional.40=-Debxml.registry.service=%EBXML_REGISTRY_SERVICE%
wrapper.java.additional.41=-Debxml.registry.lcm.service=%EBXML_REGISTRY_LCM_SERVICE%
wrapper.java.additional.42=-Debxml.registry.query.service=%EBXML_REGISTRY_QUERY_SERVICE%
wrapper.java.additional.37=-Dhttp.server=${HTTP_SERVER}
wrapper.java.additional.38=-Djms.server=${JMS_SERVER}
wrapper.java.additional.39=-Ddatadelivery.server=${DATADELIVERY_SERVER}
wrapper.java.additional.40=-Debxml.registry.service=${EBXML_REGISTRY_SERVICE}
wrapper.java.additional.41=-Debxml.registry.lcm.service=${EBXML_REGISTRY_LCM_SERVICE}
wrapper.java.additional.42=-Debxml.registry.query.service=${EBXML_REGISTRY_QUERY_SERVICE}
wrapper.java.additional.43=-DHighMem=%HIGH_MEM_FLAG%
wrapper.java.additional.44=-Dmanagement.port=%MGMT_PORT%
wrapper.java.additional.43=-DHighMem=${HIGH_MEM_FLAG}
wrapper.java.additional.44=-Dmanagement.port=${MGMT_PORT}
wrapper.java.additional.45=-Dqpid.dest_syntax=BURL
wrapper.java.additional.46=-Dweb.port=8080
wrapper.java.additional.47=-Dconfidential.port=8443
wrapper.java.additional.48=-Dhttp.port=%HTTP_PORT%
wrapper.java.additional.49=-Dedex.arch=%EDEX_ARCH%
wrapper.java.additional.50=-Dedex.tmp=%TEMP_DIR%
wrapper.java.additional.51=-Dawips.registrymanager.debug=%AWIPS_REGISTRYMANAGER_DEBUG%
wrapper.java.additional.48=-Dhttp.port=${HTTP_PORT}
wrapper.java.additional.49=-Dedex.arch=${EDEX_BITS}-bit
wrapper.java.additional.50=-Dedex.tmp=${TEMP_DIR}
wrapper.java.additional.51=-Dawips.registrymanager.debug=${AWIPS_REGISTRYMANAGER_DEBUG}
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=%INIT_MEM%
wrapper.java.initmemory=${INIT_MEM}
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=%MAX_MEM%
wrapper.java.maxmemory=${MAX_MEM}
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=com.raytheon.uf.edex.esb.Main
wrapper.java.app.mainclass=com.raytheon.uf.edex.esb.Main
# Application parameters. Add parameters as needed starting from 2
wrapper.app.parameter.2=start
wrapper.ping.timeout=0
wrapper.ping.timeout=300
#********************************************************************
# Monitor the Application
#********************************************************************
wrapper.java.monitor.heap = true
# warning messages will be logged; it is also possible to send an e-mail
wrapper.java.monitor.heap.threshold.percent = 90
wrapper.java.monitor.deadlock = true
# application will be restarted and a warning message will be logged
wrapper.filter.action.deadlock.restart=RESTART
# restart the application if it crashes
wrapper.on_exit.default=RESTART
# restart the application if it runs out of memory
wrapper.trigger.1=java.lang.OutOfMemoryError
wrapper.trigger.action=RESTART
#********************************************************************
# Wrapper Logging Properties
@ -150,10 +164,10 @@ wrapper.ping.timeout=0
wrapper.console.format=M
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=%CONSOLE_LOGLEVEL%
wrapper.console.loglevel=DEBUG
# Log file to use for wrapper output logging.
wrapper.logfile=%EDEX_HOME%/logs/edex-%EDEX_RUN_MODE%-YYYYMMDD.log
wrapper.logfile=${EDEX_HOME}/logs/edex-${EDEX_RUN_MODE}-YYYYMMDD.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=M
@ -178,14 +192,13 @@ wrapper.logfile.maxsize=1000m
wrapper.logfile.maxfiles=30
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
wrapper.syslog.loglevel=INFO
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=EDEX %EDEX_RUN_MODE%
wrapper.console.title=EDEX ${EDEX_RUN_MODE}
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties

Binary file not shown.

Binary file not shown.

View file

@ -1,24 +0,0 @@
#!/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 DEBUG_PARAM_1="-Xdebug"
export DEBUG_PARAM_2="-Xnoagent"
export DEBUG_PARAM_3="-Djava.compiler=NONE"
export DEBUG_PARAM_4="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${EDEX_DEBUG_PORT}"

Binary file not shown.

View file

@ -45,10 +45,6 @@
<property name="contextPath" value="/uEngineProducts" />
<property name="war" value="file:///${edex.home}/data/uEngine" />
</bean>
<bean class="org.eclipse.jetty.webapp.WebAppContext">
<property name="contextPath" value="/activemqAdmin" />
<property name="war" value="file:///${edex.home}/webapps/admin" />
</bean>
</list>
</property>
</bean>

View file

@ -37,7 +37,6 @@ import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.client.entity.GzipDecompressingEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.conn.ConnectionPoolTimeoutException;
@ -77,6 +76,8 @@ import com.raytheon.uf.common.util.ByteArrayOutputStreamPool.ByteArrayOutputStre
* 08/09/12 15307 snaples Added putEntitiy in postStreamingEntity.
* 01/07/13 DR 15294 D. Friedman Added streaming requests.
* Jan 24, 2013 1526 njensen Added postDynamicSerialize()
* Feb 20, 2013 1628 bsteffen clean up Inflaters used by
* HttpClient.
*
* </pre>
*
@ -386,6 +387,11 @@ public class HttpClient {
statusHandler.handle(Priority.EVENTB,
"Error reading InputStream, assuming closed", e);
}
try {
SafeGzipDecompressingEntity.close();
} catch (IOException e) {
// ignore
}
}
}
}
@ -747,7 +753,7 @@ public class HttpClient {
HeaderElement[] codecs = ceheader.getElements();
for (HeaderElement codec : codecs) {
if (codec.getName().equalsIgnoreCase("gzip")) {
response.setEntity(new GzipDecompressingEntity(response
response.setEntity(new SafeGzipDecompressingEntity(response
.getEntity()));
return;
}

View file

@ -0,0 +1,126 @@
/**
* 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.
**/
package com.raytheon.uf.common.comm;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.util.zip.GZIPInputStream;
import org.apache.http.HttpEntity;
import org.apache.http.client.entity.GzipDecompressingEntity;
/**
* <pre>
*
* This class obsessively closes GZIPInputStreams to end Inflaters
* and keep native memory free.
*
* Assumptions:
* This class can only be used if the content in this entity is going to be
* created and consumed on the same thread. If a new entity is created on the
* same thread, the content of the previous entity will be closed so don't use
* if a single thread is managing multiple responses at the same time.
*
* The Back Story:
* java.util.zip.Inflater is known to hold native memory until it is garbage
* collected or until end() is
* called(http://bugs.sun.com/view_bug.do?bug_id=4797189). The default
* GzipDecompressingEntity uses GZIPInputStream which uses Inflater for
* decompression. Ideally when the stream is done, it would get closed, which
* would trigger the Inflater to end and free the native resources. What really
* happens is that this entity gets wrapped in a BasicManagedEntity which wraps
* the GZIPInputStream in a EofSensorInputStream and at the end of the day the
* Inflater is left unended. The Inflater will still get cleaned when garbage
* collection runs and the finalizer gets invoked, but this adds some ambiguity
* to the availability of native memory. This calss exists to remove that
* ambiguity. There are a few things which can compound the problem and make
* things worse:
* 1. When the java heap is excessively large then the garbage collector may
* run less frequently since it has lots of space but it also means there
* is less native memory available.
* 2. When the process is running lots of native code outside the JVM then the
* garbage collector will not run as often but the demand for native memory
* will be greater.
*
*
* There are three ways that this class keeps the number of open
* GZIPInputStreams down.
* 1. Provides a static close method that can be used by HttpClient to force
* close GZIPInputStream.
* 2. Uses a ThreadLocal to limit the number of GZIPInputStreams to one per
* thread. This is also the mechanism used to staticly track which
* GZIPInputStream need to be closed.
* 3. Only holds weak references to the GZIPInputStreams so that if the
* garbage collector beats us to it then the Inflaters can get freed early.
*
* </pre>
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 20, 2013 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
class SafeGzipDecompressingEntity extends GzipDecompressingEntity{
private static ThreadLocal<WeakReference<GZIPInputStream>> stream = new ThreadLocal<WeakReference<GZIPInputStream>>();
public SafeGzipDecompressingEntity(HttpEntity entity) {
super(entity);
}
@Override
public InputStream getContent() throws IOException {
close();
InputStream istream = super.getContent();
if (istream instanceof GZIPInputStream) {
// save off a reference to the stream so it can be clsoed later.
stream.set(new WeakReference<GZIPInputStream>(
(GZIPInputStream) istream));
}
return istream;
}
/**
* Closes whatever GZIPInputStream's are open on this Thread, freeing any
* native resources used by the Inflater.
*
* @throws IOException
*/
public static void close() throws IOException {
WeakReference<GZIPInputStream> ref = stream.get();
if(ref != null){
stream.remove();
GZIPInputStream stream = ref.get();
if(stream != null){
stream.close();
}
}
}
}

View file

@ -0,0 +1 @@
com.raytheon.uf.common.dataaccess.impl.DefaultDataRequest

View file

@ -25,6 +25,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import com.raytheon.uf.common.dataaccess.IDataFactory;
import com.raytheon.uf.common.dataaccess.IDataRequest;
import com.raytheon.uf.common.dataaccess.exception.InvalidIdentifiersException;
@ -42,6 +43,7 @@ import com.raytheon.uf.common.dataaccess.exception.InvalidIdentifiersException;
* Nov 13, 2012 njensen Initial creation
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
* single request.
* Feb 19, 2012 1552 mpduff Implement IDataFactory.
*
* </pre>
*
@ -49,7 +51,7 @@ import com.raytheon.uf.common.dataaccess.exception.InvalidIdentifiersException;
* @version 1.0
*/
public abstract class AbstractDataFactory {
public abstract class AbstractDataFactory implements IDataFactory {
/**
* Returns the identifiers that must be set on a request for the request to
@ -57,7 +59,7 @@ public abstract class AbstractDataFactory {
*
* @return the required identifiers
*/
public String[] getRequiredIdentifiers(){
public String[] getRequiredIdentifiers() {
return null;
}
@ -97,8 +99,8 @@ public abstract class AbstractDataFactory {
}
if (!missing.isEmpty() || !invalid.isEmpty()) {
throw new InvalidIdentifiersException(request.getDatatype(), missing,
invalid);
throw new InvalidIdentifiersException(request.getDatatype(),
missing, invalid);
}
}

View file

@ -7,7 +7,8 @@ Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization, com.raytheon.uf.viz.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.raytheon.uf.common.dataplugin.ffmp,
com.raytheon.uf.common.dataplugin.ffmp.dao
com.raytheon.uf.common.dataplugin.ffmp.dao,
com.raytheon.uf.common.dataplugin.ffmp.dataaccess
Require-Bundle: javax.persistence;bundle-version="1.0.0",
com.raytheon.edex.common;bundle-version="1.11.1",
com.raytheon.uf.common.monitor;bundle-version="1.11.5",
@ -19,4 +20,8 @@ Require-Bundle: javax.persistence;bundle-version="1.0.0",
com.raytheon.uf.common.dataplugin.shef;bundle-version="1.12.1174",
com.raytheon.uf.common.cache;bundle-version="1.12.1174",
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0"
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0",
com.raytheon.uf.common.dataaccess;bundle-version="1.0.0",
com.google.guava;bundle-version="1.0.0",
javax.measure;bundle-version="1.0.0",
com.raytheon.uf.common.message;bundle-version="1.12.1174"

View file

@ -1,2 +1 @@
com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord
com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
res/

View file

@ -0,0 +1,12 @@
<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">
<bean id="ffmpDataFactory"
class="com.raytheon.uf.common.dataplugin.ffmp.dataaccess.FFMPGeometryFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register" id="ffmpDataAccessRegister">
<constructor-arg value="ffmp" />
<constructor-arg ref="ffmpDataFactory" />
</bean>
</beans>

View file

@ -83,6 +83,7 @@ import com.vividsolutions.jts.io.WKBReader;
* 07/09/10 3914 D. Hladky Localization work
* 12/13/10 7484 D. Hladky Service Backup
* 02/01/13 1569 D.Hladky Constants
* 02/20/13 1635 D. Hladky Constants
*
* </pre>
*
@ -568,7 +569,7 @@ public class FFMPTemplates {
"FFMPTemplate: Starting site template process " + dataKey
+ ":" + cwa + ":" + huc);
// special handling for VGB's
if (huc.equals("VIRTUAL")) {
if (huc.equals(FFMPRecord.VIRTUAL)) {
getVirtualGageBasins(dataKey, cwa);
} else {
getMap(dataKey, cwa, huc);

View file

@ -0,0 +1,313 @@
/**
* 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.
**/
package com.raytheon.uf.common.dataplugin.ffmp.dataaccess;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.dataaccess.IDataRequest;
import com.raytheon.uf.common.dataaccess.exception.DataRetrievalException;
import com.raytheon.uf.common.dataaccess.exception.UnsupportedOutputTypeException;
import com.raytheon.uf.common.dataaccess.geom.IGeometryData;
import com.raytheon.uf.common.dataaccess.grid.IGridData;
import com.raytheon.uf.common.dataaccess.impl.AbstractDataPluginFactory;
import com.raytheon.uf.common.dataaccess.impl.DefaultGeometryData;
import com.raytheon.uf.common.dataaccess.util.DatabaseQueryUtil;
import com.raytheon.uf.common.dataaccess.util.DatabaseQueryUtil.QUERY_MODE;
import com.raytheon.uf.common.dataaccess.util.PDOUtil;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasin;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasinData;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates.MODE;
import com.raytheon.uf.common.dataplugin.ffmp.HucLevelGeometriesFactory;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager;
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager;
import com.raytheon.uf.common.monitor.xml.DomainXML;
import com.raytheon.uf.common.monitor.xml.SourceXML;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.vividsolutions.jts.geom.Geometry;
/**
* A data factory for retrieving FFMP data.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 24, 2013 1552 mpduff Initial creation
*
* </pre>
*
* @author mpduff
* @version 1.0
*/
public class FFMPGeometryFactory extends AbstractDataPluginFactory {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(FFMPGeometryFactory.class);
/** Site key constant */
public static final String SITE_KEY = "siteKey";
/** Data key constant */
public static final String DATA_KEY = "dataKey";
/** wfo constant */
public static final String WFO = "wfo";
/** plugin constant */
public static final String PLUGIN_NAME = "ffmp";
/** huc constant */
public static final String HUC = "huc";
/** source name constant */
public static final String SOURCE_NAME = "sourceName";
/** FFMP Templates object */
private FFMPTemplates templates;
/**
* Constructor.
*/
public FFMPGeometryFactory() {
}
/**
* Not Supported.
*/
@Override
protected IGridData[] getGridData(IDataRequest request,
DbQueryResponse dbQueryResponse) {
// Not currently handled
throw new UnsupportedOutputTypeException(request.getDatatype(),
PLUGIN_NAME);
}
/**
* {@inheritDoc}
*/
@Override
protected IGeometryData[] getGeometryData(IDataRequest request,
DbQueryResponse dbQueryResponse) {
List<Map<String, Object>> results = dbQueryResponse.getResults();
Map<Long, DefaultGeometryData> cache = new HashMap<Long, DefaultGeometryData>();
for (Map<String, Object> map : results) {
for (Map.Entry<String, Object> es : map.entrySet()) {
FFMPRecord rec = (FFMPRecord) es.getValue();
try {
IDataStore dataStore = PDOUtil.getDataStore(rec);
rec.retrieveMapFromDataStore(dataStore, rec.getDataURI(),
templates,
(String) request.getIdentifiers().get(HUC), rec
.getDataTime().getRefTime(), rec
.getSourceName());
} catch (Exception e) {
throw new DataRetrievalException(
"Failed to retrieve the IDataRecord for PluginDataObject: "
+ rec.toString(), e);
}
try {
cache = makeGeometryData(rec, request, cache);
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
}
}
return cache.values().toArray(
new DefaultGeometryData[cache.values().size()]);
}
/**
* {@inheritDoc}
*/
@Override
protected Map<String, RequestConstraint> buildConstraintsFromRequest(
IDataRequest request) {
Map<String, RequestConstraint> map = new HashMap<String, RequestConstraint>();
Map<String, Object> identifiers = request.getIdentifiers();
String siteKey = (String) identifiers.get(SITE_KEY);
for (Map.Entry<String, Object> entry : request.getIdentifiers()
.entrySet()) {
String key = entry.getKey();
String value = (String) entry.getValue();
if (!key.equals(HUC)) {
RequestConstraint rc = new RequestConstraint(value);
map.put(key, rc);
}
}
RequestConstraint parameterConstraint = new RequestConstraint();
parameterConstraint.setConstraintValueList(request.getParameters());
parameterConstraint.setConstraintType(ConstraintType.IN);
map.put(SOURCE_NAME, parameterConstraint);
String domain = (String) request.getIdentifiers().get(WFO);
DomainXML domainXml = FFMPRunConfigurationManager.getInstance()
.getDomain(domain);
templates = FFMPTemplates.getInstance(domainXml, siteKey, MODE.EDEX);
return map;
}
/**
* Create the IGeometryData objects.
*
* @param rec
* The FFMPRecord
* @param cache
* @param huc
* The HUC level
* @param siteKey
* The siteKey
* @param cwa
* The CWA
* @param dataKey
* The dataKey
* @throws Exception
*/
private Map<Long, DefaultGeometryData> makeGeometryData(FFMPRecord rec,
IDataRequest request, Map<Long, DefaultGeometryData> cache)
throws Exception {
String huc = (String) request.getIdentifiers().get(HUC);
String dataKey = (String) request.getIdentifiers().get(DATA_KEY);
String siteKey = (String) request.getIdentifiers().get(SITE_KEY);
String cwa = (String) request.getIdentifiers().get(WFO);
FFMPBasinData basinData = rec.getBasinData(huc);
HashMap<Long, FFMPBasin> basinDataMap = basinData.getBasins();
HucLevelGeometriesFactory geomFactory = HucLevelGeometriesFactory
.getInstance();
Map<Long, Geometry> geomMap = geomFactory.getGeometries(templates,
dataKey, cwa, huc);
FFMPSourceConfigurationManager srcConfigMan = FFMPSourceConfigurationManager
.getInstance();
SourceXML sourceXml = srcConfigMan.getSource(rec.getSourceName());
DefaultGeometryData data = null;
String[] locationNames = request.getLocationNames();
List<Long> pfafList = null;
if (locationNames != null) {
pfafList = convertLocations(locationNames);
}
for (Long pfaf : geomMap.keySet()) {
if (pfafList == null || pfafList.contains(pfaf)) {
if (cache.containsKey(pfaf)) {
data = cache.get(pfaf);
} else {
data = new DefaultGeometryData();
Map<String, Object> attrs = new HashMap<String, Object>();
attrs.put(DATA_KEY, dataKey);
attrs.put(SITE_KEY, siteKey);
attrs.put(WFO, cwa);
attrs.put(HUC, huc);
data.setAttributes(attrs);
data.setLocationName(String.valueOf(pfaf));
data.setGeometry(geomMap.get(pfaf));
cache.put(pfaf, data);
}
FFMPBasin basin = basinDataMap.get(pfaf);
if (basin == null) {
continue;
}
Float value = basin.getValue(rec.getDataTime().getRefTime());
String parameter = rec.getSourceName();
String unitStr = sourceXml.getUnit();
Unit<?> unit = null;
if (unitStr.equals(SourceXML.UNIT_TXT)) {
unit = Unit.valueOf("in");
}
if (unit != null) {
data.addData(parameter, value, unit);
} else {
data.addData(parameter, value);
}
}
}
return cache;
}
/**
* Convert list of PFAF strings to list of PFAF longs
*
* @param locationNames
* @return
*/
private List<Long> convertLocations(String[] locationNames) {
List<Long> pfafList = new ArrayList<Long>();
for (String s : locationNames) {
try {
pfafList.add(Long.parseLong(s));
} catch (NumberFormatException e) {
statusHandler.handle(Priority.PROBLEM,
"Error parsing pfaf id: " + s, e);
}
}
return pfafList;
}
/**
* {@inheritDoc}
*/
@Override
public String[] getAvailableLocationNames(IDataRequest request) {
List<String> pfafList = new ArrayList<String>();
String domain = (String) request.getIdentifiers().get("wfo");
String sql = "select pfaf_id from mapdata.ffmp_basins where cwa = '"
+ domain + "';";
List<Object[]> results = DatabaseQueryUtil.executeDatabaseQuery(
QUERY_MODE.MODE_SQLQUERY, sql, "metadata", "ffmp");
for (Object[] oa : results) {
pfafList.add((String) oa[0]);
}
return pfafList.toArray(new String[pfafList.size()]);
}
}

View file

@ -22,9 +22,7 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.hibernate;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthAllocation;
/**
* DAO that handles {@link BandwidthAllocation} instances. Intentionally
* package-private as Spring reflectively creates it, and application code must
* rely on the interface.
* DAO that handles {@link BandwidthAllocation} instances.
*
* <pre>
*
@ -33,13 +31,14 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthAllocation;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 13, 2013 1543 djohnson Initial creation
* Feb 22, 2013 1543 djohnson Made public as YAJSW doesn't like Spring exceptions.
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
class BandwidthAllocationDao extends
public class BandwidthAllocationDao extends
BaseBandwidthAllocationDao<BandwidthAllocation> implements IBandwidthAllocationDao {
/**

View file

@ -28,9 +28,7 @@ import com.raytheon.uf.edex.database.dao.SessionManagedDao;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthDataSetUpdate;
/**
* DAO that handles {@link BandwidthDataSetUpdate} instances. Intentionally
* package-private as Spring reflectively creates it, and application code must
* rely on the interface.
* DAO that handles {@link BandwidthDataSetUpdate} instances.
*
* <pre>
*
@ -39,13 +37,14 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthDataSetUpdate;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 13, 2013 1543 djohnson Initial creation
* Feb 22, 2013 1543 djohnson Made public as YAJSW doesn't like Spring exceptions.
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
class BandwidthDataSetUpdateDao extends
public class BandwidthDataSetUpdateDao extends
SessionManagedDao<Long, BandwidthDataSetUpdate> implements IBandwidthDataSetUpdateDao {
private static final String GET_DATASETMETADATA_BY_PROVIDER_AND_DATASET = "from BandwidthDataSetUpdate d where "

View file

@ -29,9 +29,7 @@ import com.raytheon.uf.edex.database.dao.SessionManagedDao;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthSubscription;
/**
* Data access object for {@link BandwidthSubscription} instances. Intentionally
* package-private as Spring reflectively creates it, and application code must
* rely on the interface.
* Data access object for {@link BandwidthSubscription} instances.
*
* <pre>
*
@ -40,13 +38,14 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthSubscription;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 07, 2013 1543 djohnson Initial creation
* Feb 22, 2013 1543 djohnson Made public as YAJSW doesn't like Spring exceptions.
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
class BandwidthSubscriptionDao extends
public class BandwidthSubscriptionDao extends
SessionManagedDao<Long, BandwidthSubscription> implements
IBandwidthSubscriptionDao {

View file

@ -29,9 +29,7 @@ import org.hibernate.jdbc.Work;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.SubscriptionRetrieval;
/**
* * DAO that handles {@link SubscriptionRetrieval} instances. Intentionally
* package-private as Spring reflectively creates it, and application code must
* rely on the interface.
* * DAO that handles {@link SubscriptionRetrieval} instances.
*
* <pre>
*
@ -40,13 +38,14 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.SubscriptionRetrieval;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 13, 2013 1543 djohnson Initial creation
* Feb 22, 2013 1543 djohnson Made public as YAJSW doesn't like Spring exceptions.
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
class SubscriptionRetrievalDao extends
public class SubscriptionRetrievalDao extends
BaseBandwidthAllocationDao<SubscriptionRetrieval> implements ISubscriptionRetrievalDao {
private static final String GET_SUBSCRIPTIONRETRIEVAL_BY_PROVIDER_AND_DATASET_BASE = "from SubscriptionRetrieval sr where "

View file

@ -23,8 +23,7 @@ import com.raytheon.uf.edex.datadelivery.retrieval.db.RetrievalRequestRecord.Sta
/**
*
* DAO for {@link RetrievalRequestRecord} entities. Intentionally
* package-private as all access should be through the Spring set interface.
* DAO for {@link RetrievalRequestRecord} entities.
*
* <pre>
*
@ -35,6 +34,7 @@ import com.raytheon.uf.edex.datadelivery.retrieval.db.RetrievalRequestRecord.Sta
* Jan 30, 2013 1543 djohnson Add SW history.
* Feb 07, 2013 1543 djohnson Use session management code.
* Feb 13, 2013 1543 djohnson Exported interface which is now implemented.
* Feb 22, 2013 1543 djohnson Made public as YAJSW doesn't like Spring exceptions.
*
* </pre>
*
@ -44,7 +44,7 @@ import com.raytheon.uf.edex.datadelivery.retrieval.db.RetrievalRequestRecord.Sta
@Repository
@Transactional
// TODO: Split service functionality from DAO functionality
class RetrievalDao extends
public class RetrievalDao extends
SessionManagedDao<RetrievalRequestRecordPK, RetrievalRequestRecord> implements IRetrievalDao {
private static final IUFStatusHandler statusHandler = UFStatus
@ -53,7 +53,7 @@ class RetrievalDao extends
/**
* Constructor.
*/
RetrievalDao() {
public RetrievalDao() {
}
/**

View file

@ -111,6 +111,7 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIProcessor;
* 07/31/2011 578 dhladky FFTI modifications
* 01/27/13 1478 D. Hladky Added creation of full cache records to help read write stress on NAS
* 02/01/13 1569 D. Hladky Added constants, switched to using aggregate records written through pypies
* 02/20/13 1635 D. Hladky Added some finally methods to increase dead lock safety. Reduced wait times for threads.
* </pre>
*
* @author dhladky
@ -468,15 +469,19 @@ public class FFMPGenerator extends CompositeProductGenerator implements
while (processes.size() > 0) {
// wait for all threads to finish before returning
try {
Thread.sleep(100);
statusHandler.handle(Priority.DEBUG,
"Checking status ..." + processes.size());
for (String source : processes.keySet()) {
Thread.sleep(50);
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler.handle(Priority.DEBUG,
"Still processing ..." + source);
"Checking status ..." + processes.size());
for (String source : processes.keySet()) {
statusHandler.handle(Priority.DEBUG,
"Still processing ..." + source);
}
}
} catch (InterruptedException e) {
e.printStackTrace();
statusHandler.handle(Priority.WARN,
"Thread interrupted ..." + e);
}
}
@ -506,9 +511,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements
while (fftiSources.size() > 0) {
try {
Thread.sleep(100);
statusHandler.handle(Priority.DEBUG,
"Checking status ..." + fftiDone);
Thread.sleep(50);
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler.handle(Priority.DEBUG,
"Checking status ..." + fftiDone);
}
} catch (InterruptedException e) {
statusHandler.handle(Priority.DEBUG,
"Checking status failed!" + e);
@ -532,8 +539,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} catch (Throwable e) {
statusHandler.handle(Priority.ERROR,
"Unable to process FFMP Records.");
e.printStackTrace();
"Unable to process FFMP Records.", e);
}
}
}
@ -585,19 +591,25 @@ public class FFMPGenerator extends CompositeProductGenerator implements
@Override
public void run() {
try {
statusHandler.handle(
Priority.DEBUG,
"ProcessProduct: Starting thread "
+ ffmpProduct.getSourceName());
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler.handle(
Priority.DEBUG,
"ProcessProduct: Starting thread "
+ ffmpProduct.getSourceName());
}
process();
statusHandler.handle(
Priority.DEBUG,
"ProcessProduct: Finishing thread "
+ ffmpProduct.getSourceName());
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler.handle(
Priority.DEBUG,
"ProcessProduct: Finishing thread "
+ ffmpProduct.getSourceName());
}
} catch (Exception e) {
processes.remove(ffmpProduct.getSourceName());
statusHandler.handle(Priority.ERROR, "ProcessProduct: removed "
+ ffmpProduct.getSourceName(), e);
} finally {
// resets the process list
processes.remove(ffmpProduct.getSourceName());
}
}
@ -748,12 +760,15 @@ public class FFMPGenerator extends CompositeProductGenerator implements
while (productKeys.size() > 0) {
// wait for all threads to finish before returning
try {
Thread.sleep(100);
statusHandler.handle(Priority.DEBUG,
"Checking status ..." + productKeys.size());
for (String source : productKeys.keySet()) {
Thread.sleep(50);
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler.handle(Priority.DEBUG,
"Still processing ..." + source);
"Checking status ..." + productKeys.size());
for (String source : productKeys.keySet()) {
statusHandler.handle(Priority.DEBUG,
"Still processing ..." + source);
}
}
} catch (InterruptedException e) {
statusHandler.handle(Priority.WARN,
@ -767,7 +782,6 @@ public class FFMPGenerator extends CompositeProductGenerator implements
recs[i] = ffmpRecords.get(i);
}
products.put(ffmpProduct.getSourceName(), recs);
processes.remove(ffmpProduct.getSourceName());
}
}
@ -811,8 +825,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
*/
public void createUnifiedGeometries(DomainXML domain) {
ArrayList<String> hucsToGen = new ArrayList<String>();
hucsToGen.add("ALL");
hucsToGen.add("COUNTY");
hucsToGen.add(FFMPRecord.ALL);
hucsToGen.add(FFMPRecord.COUNTY);
for (int i = template.getTotalHucLevels() - 1; i >= 0; i--) {
hucsToGen.add("HUC" + i);
@ -877,7 +891,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
// Didn't process a domain, locked by another cluster
// member, sleep and try again
try {
Thread.sleep(100);
Thread.sleep(50);
} catch (InterruptedException e) {
statusHandler.handle(Priority.WARN,
"Domain processing Interrupted!", e);
@ -1204,10 +1218,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements
statusHandler.handle(Priority.ERROR, getGeneratorName()
+ ": filter: " + filter.getName()
+ ": failed to route filter to generator", e);
} finally {
// safer, this way filter never gets set in weird state
filter.setValidTime(new Date(System.currentTimeMillis()));
filter.reset();
}
filter.setValidTime(new Date(System.currentTimeMillis()));
filter.reset();
}
/**

View file

@ -39,10 +39,6 @@
<property name="contextPath" value="/purgeWeb"/>
<property name="war" value="file:///${edex.home}/webapps/purgeWeb"/>
</bean>
<bean class="org.eclipse.jetty.webapp.WebAppContext">
<property name="contextPath" value="/activemqAdmin"/>
<property name="war" value="file:///${edex.home}/webapps/admin"/>
</bean>
</list>
</property>
</bean>

View file

@ -145,15 +145,11 @@ rm -rf ${RPM_BUILD_ROOT}
%dir /awips2/edex/logs
%dir /awips2/edex/webapps
/awips2/edex/webapps/*
/awips2/edex/bin/wrapper.jar
%dir /awips2/edex/bin/linux-x86-%{_build_bits}
/awips2/edex/bin/linux-x86-%{_build_bits}/*.so
/awips2/edex/bin/linux-x86-%{_build_bits}/*.conf
/awips2/edex/bin/wrapper.conf
%dir /awips2/edex/bin/yajsw
/awips2/edex/bin/yajsw/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/edex/bin
/awips2/edex/bin/*.sh
/awips2/edex/bin/linux-x86-%{_build_bits}/wrapper
%attr(744,root,root) /etc/init.d/*

View file

@ -60,7 +60,7 @@ export DATA_ARCHIVE_ROOT=/tmp/sbn
# $1 == instance token
startEDEX() {
pidfile=${EDEX_INSTALL}/bin/${1}.pid
CAMELPROCESS=`ps -ef | grep "edex.dev.mode"|grep -c "edex.run.mode=${1} " `
CAMELPROCESS=`ps -ef | grep "aw.site.identifier"|grep -c "edex.run.mode=${1} " `
if [ $CAMELPROCESS -eq 1 ]; then
echo "WARNING: EDEX ${1} instance already running, not starting another instance"
return 1

View file

@ -74,8 +74,15 @@
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/org.dom4j"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.edex.plugin.level"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.common.dataplugin.level"/>
<classpathentry kind="src" path="/com.raytheon.uf.common.dataplugin.ffmp"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.dataaccess"/>
<classpathentry kind="src" path="/com.raytheon.uf.common.monitor"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.common.dataplugin.grid"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.edex.log"/>
<classpathentry kind="src" path="/com.raytheon.viz.core"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.edex.decodertools"/>
<classpathentry kind="lib" path="/opt/uframe-eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar"/>
<classpathentry kind="lib" path="/opt/uframe-eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64.source_3.6.1.v3655c.jar"/>
<classpathentry kind="lib" path="/opt/uframe-eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -24,6 +24,8 @@ import java.util.List;
import org.junit.Ignore;
import com.raytheon.uf.common.monitor.xml.FFMPTemplateXML;
/**
* Implementation of {@link IJaxbableClassesLocator} that returns a static list
* of classes.
@ -86,7 +88,10 @@ public class TestJaxbableClassesLocator implements IJaxbableClassesLocator {
com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.BandwidthMap.class,
com.raytheon.uf.common.datadelivery.retrieval.xml.ServiceConfig.class,
com.raytheon.uf.common.datadelivery.retrieval.xml.UnitLookup.class,
com.raytheon.uf.common.datadelivery.retrieval.xml.LevelLookup.class };
com.raytheon.uf.common.datadelivery.retrieval.xml.LevelLookup.class,
com.raytheon.uf.common.monitor.xml.FFMPSourceConfigXML.class,
com.raytheon.uf.common.monitor.xml.FFMPRunConfigXML.class,
FFMPTemplateXML.class };
JAXB_CLASSES = Arrays.asList(array);
}

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FFMPRunConfig xmlns:ns2="group">
<runner>
<!-- configure uri filter sources -->
<sourceIngestConfig uriSubLocation="3" name="DHR">
<dataKey>kdvn</dataKey>
<dataKey>tmsp</dataKey>
<dataKey>karx</dataKey>
<dataKey>kdmx</dataKey>
</sourceIngestConfig>
<sourceIngestConfig uriSubLocation="3" name="DPR">
<dataKey>kdvn</dataKey>
<dataKey>tmsp</dataKey>
<dataKey>karx</dataKey>
<dataKey>kdmx</dataKey>
</sourceIngestConfig>
<sourceIngestConfig uriSubLocation="3" name="FFG0124hr">
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig uriSubLocation="3" name="FFG0324hr">
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig uriSubLocation="3" name="FFG0624hr">
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig uriSubLocation="3" name="QPFSCAN">
<dataKey>kdvn</dataKey>
<dataKey>tmsp</dataKey>
<dataKey>karx</dataKey>
<dataKey>kdmx</dataKey>
</sourceIngestConfig>
<!-- overrides of source config -->
<sourceOverride name="DHR">
<dataKey dataKey="kdvn">
<override param="expirationMinutes" value="20"/>
</dataKey>
<dataKey dataKey="kdmx">
<override param="expirationMinutes" value="25"/>
</dataKey>
</sourceOverride>
<!-- setup product definitions -->
<product key="kdvn" name="DHR"/>
<product key="kdvn" name="DPR"/>
<product key="kdmx" name="DHR"/>
<product key="kdmx" name="DPR"/>
<product key="karx" name="DHR"/>
<product key="karx" name="DPR"/>
<product key="tmsp" name="DHR"/>
<!-- domains to be run -->
<domain cwa="DVN" primary="true"/>
<domain cwa="DMX" primary="false"/>
<domain cwa="ARX" primary="false"/>
<domain cwa="LOT" primary="false"/>
<domain cwa="MPX" primary="false"/>
</runner>
</FFMPRunConfig>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FFMPTemplate extents="20000.0" virtual="true" numberOfHuc="6" hucDepth="4" xmlns:ns2="group">
<excludedVGBs/>
</FFMPTemplate>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FFMPRunConfig xmlns:ns2="group">
<runner>
<!-- Source Ingest Config's, used by URI Filters -->
<sourceIngestConfig name="FFG0124hr" uriSubLocation="3">
<dataKey>KKRF</dataKey>
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig name="FFG0324hr" uriSubLocation="3">
<dataKey>KKRF</dataKey>
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig name="FFG0624hr" uriSubLocation="3">
<dataKey>KKRF</dataKey>
<dataKey>KMSR</dataKey>
</sourceIngestConfig>
<sourceIngestConfig name="QPFSCAN" uriSubLocation="3">
<dataKey>koax</dataKey>
<dataKey>kdmx</dataKey>
<dataKey>kuex</dataKey>
</sourceIngestConfig>
<sourceIngestConfig name="DHR" uriSubLocation="3">
<dataKey>koax</dataKey>
<dataKey>kdmx</dataKey>
<dataKey>kuex</dataKey>
</sourceIngestConfig>
<sourceIngestConfig name="DPR" uriSubLocation="3">
<dataKey>kdmx</dataKey>
</sourceIngestConfig>
<!-- Product definitions to be run against -->
<product name="DHR" key="koax"/>
<product name="DHR" key="kuex"/>
<product name="DHR" key="kdmx"/>
<product name="DPR" key="kdmx"/>
<product name="DHRMOSAIC" key="hpe"/>
<product name="BDHRMOSAIC" key="bhpe"/>
<!-- domains to be used -->
<domain primary="true" cwa="OAX"/>
<domain primary="false" cwa="GID"/>
<domain primary="false" cwa="DMX"/>
</runner>
</FFMPRunConfig>