Merge branch 'master_14.3.1' (14.3.1-23m) into omaha_14.4.1

Conflicts:
	cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/IFPClient.java
	cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml

        Issue #3648:
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java

	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java
	edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java

        Issue #3560:
	edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/services/RegistryRESTServices.java
	edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/services/RegistrySOAPServices.java
        Also modified with the resolution of #3560:
        edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/services/RegistryServiceConfiguration.java


Former-commit-id: fa1fa76dd9 [formerly f4b771ea72] [formerly da463c484e] [formerly fa1fa76dd9 [formerly f4b771ea72] [formerly da463c484e] [formerly 2616fe04b6 [formerly da463c484e [formerly 8dc5abec482b4c1c3f3469c0ffc7e06fa697c6cd]]]]
Former-commit-id: 2616fe04b6
Former-commit-id: 1c1e618183 [formerly 306826aed9] [formerly 97756f4cc415dba80b72fef671c8609b2b0ef779 [formerly 523cedbb56]]
Former-commit-id: 85a2c5f56cad1fa8121856b8cb5312cdf481051b [formerly 57f5294f08]
Former-commit-id: e05d31ae36
This commit is contained in:
Steve Harris 2014-10-03 10:18:34 -05:00
commit e40f190f9a
18 changed files with 279 additions and 253 deletions

View file

@ -110,7 +110,9 @@ import com.vividsolutions.jts.geom.LineString;
* 07-24-2014 3429 mapeters Updated deprecated drawLine() calls.
* 08-21-2014 DR 15700 Qinglu Lin handle the situation where frameTime is null in paintTrack().
* 09-09-2014 RM #657 Qinglu Lin handle StormTrackState.trackType is null.
*
* 09-25-2014 ASM #16773 D. Friedman Fix NPE.
*
>>>>>>> master_14.2.4
* </pre>
*
* @author mschenke
@ -1318,6 +1320,11 @@ public class StormTrackDisplay implements IRenderable {
private void paintLabels(IGraphicsTarget target,
StormTrackProperties paintProps) throws VizException {
StormTrackState state = paintProps.getState();
if (state.timePoints == null || state.futurePoints == null) {
return;
}
// get the magnification from the state
float magnification = state.magnification;
// find a nice looking radius

View file

@ -122,6 +122,8 @@ import com.raytheon.viz.gfe.core.parm.Parm;
* 04/09/2014 #3004 dgilling Support moved ClearPracticeVTECTableRequest.
* 07/01/2014 #3149 randerso Changed getGridData to handle limited number of grids returned
* and re-request if not all data returned
* 09/23/14 #3648 randerso Changed getParmList to return results even if some DbIds
* have errors
*
* </pre>
*
@ -194,8 +196,20 @@ public class IFPClient {
throws GFEServerException {
GetParmListRequest request = new GetParmListRequest();
request.setDbIds(ids);
ServerResponse<?> sr = makeRequest(request);
return (List<ParmID>) sr.getPayload();
ServerResponse<?> sr = makeRequest(request, false);
List<ParmID> parmIds = (List<ParmID>) sr.getPayload();
if (!sr.isOkay()) {
String msg = formatSRMessage(sr);
if (parmIds != null && !parmIds.isEmpty()) {
// got something so display an error message and continue
statusHandler.error(msg);
} else {
// got nothing so throw exception
throw new GFEServerException(msg);
}
}
return parmIds;
}
/**
@ -746,27 +760,33 @@ public class IFPClient {
if ((throwExceptionsBasedOnResponse) && (rval != null)
&& (!rval.isOkay())) {
StringBuilder msg = new StringBuilder();
if (rval.getMessages().size() > 1) {
msg.append("Errors ");
} else {
msg.append("Error ");
}
msg.append("occurred on GFE server -");
Iterator<ServerMsg> iter = rval.getMessages().iterator();
while (iter.hasNext()) {
msg.append(iter.next().getMessage());
if (iter.hasNext()) {
msg.append(", ");
}
}
throw new GFEServerException(msg.toString());
String msg = formatSRMessage(rval);
throw new GFEServerException(msg);
}
return rval;
}
private String formatSRMessage(ServerResponse<?> rval) {
StringBuilder sb = new StringBuilder();
if (rval.getMessages().size() > 1) {
sb.append("Errors ");
} else {
sb.append("Error ");
}
sb.append("occurred on GFE server: ");
Iterator<ServerMsg> iter = rval.getMessages().iterator();
while (iter.hasNext()) {
sb.append(iter.next().getMessage());
if (iter.hasNext()) {
sb.append(", ");
}
}
String msg = sb.toString();
return msg;
}
public void clearPracticeTable(String siteId) throws VizException {
try {
ClearPracticeVTECTableRequest request = new ClearPracticeVTECTableRequest(

View file

@ -34,6 +34,7 @@ import java.util.List;
* ------------ ---------- ----------- --------------------------
* Jul 16, 2014 3419 jsanchez Initial creation
* Aug 28, 2014 ASM #15658 D. Friedman Add marine zone list.
* Sep 25, 2014 ASM #16783 D. Friedman Remove action field.
*
* </pre>
*
@ -45,8 +46,6 @@ public class Watch {
private String phenSig;
private String action;
private String etn;
private Date startTime;
@ -59,12 +58,11 @@ public class Watch {
private List<String> partOfState;
private List<String> marineAreas;
private String marineArea;
public Watch(String state, String action, String phenSig, String etn,
public Watch(String state, String phenSig, String etn,
Date startTime, Date endTime) {
this.state = state;
this.action = action;
this.phenSig = phenSig;
this.etn = etn;
this.startTime = startTime;
@ -119,14 +117,6 @@ public class Watch {
this.partOfState = partOfState;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getEtn() {
return etn;
}
@ -135,19 +125,18 @@ public class Watch {
this.etn = etn;
}
public List<String> getMarineAreas() {
return marineAreas;
public String getMarineArea() {
return marineArea;
}
public void setMarineAreas(List<String> marineAreas) {
this.marineAreas = marineAreas;
public void setMarineArea(String marineArea) {
this.marineArea = marineArea;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((action == null) ? 0 : action.hashCode());
result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
result = prime * result + ((etn == null) ? 0 : etn.hashCode());
result = prime * result + ((phenSig == null) ? 0 : phenSig.hashCode());
@ -166,11 +155,6 @@ public class Watch {
if (getClass() != obj.getClass())
return false;
Watch other = (Watch) obj;
if (action == null) {
if (other.action != null)
return false;
} else if (!action.equals(other.action))
return false;
if (endTime == null) {
if (other.endTime != null)
return false;

View file

@ -28,6 +28,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -78,9 +79,12 @@ import com.vividsolutions.jts.geom.Polygon;
* Aug 28, 2014 ASM #15658 D. Friedman Add marine zones.
* Aug 29, 2014 ASM #15551 Qinglu Lin Sort watches by ETN and filter out ActiveTableRecord
* with act of CAN and EXP in processRecords().
* Sep 12, 2014 ASM #15551 Qinglu Lin Prevent a county's WOU from being used while its
* corresponding WCN is canceled or expired.
*
* Sep 25, 2014 ASM #15551 Qinglu Lin Prevent a county's WOU from being used while its
* corresponding WCN is canceled or expired, prevent NEW
* from being used while CON/EXT is issued, and prevent duplicate
* /missing (part of state, state abbreviation) which resulted from
* extension of a watch to counties which are of same/different fe_area.
* Sep 25, 2014 ASM #16783 D. Friedman Do not use VTEC action to determine Watch uniqueness.
* </pre>
*
* @author jsanchez
@ -365,6 +369,16 @@ public class WatchUtil {
}
}
Collections.sort(records, PEUI);
// Filters out extra ActiveTableRecords that have same phenSig, etn, and ugcZone.
Map<String, ActiveTableRecord> atrMap = new LinkedHashMap<String, ActiveTableRecord>();
for (ActiveTableRecord atr: records) {
String key = atr.getPhensig() + atr.getEtn() + atr.getUgcZone();
atrMap.put(key, atr);
}
records = new ArrayList<ActiveTableRecord>(atrMap.values());
return records;
}
@ -414,14 +428,13 @@ public class WatchUtil {
}
}
String action = ar.getAct();
String phenSig = ar.getPhensig();
String etn = ar.getEtn();
Date startTime = ar.getStartTime().getTime();
Date endTime = ar.getEndTime().getTime();
if (validUgcZones.contains(ugcZone)) {
Watch watch = new Watch(state, action, phenSig, etn, startTime,
Watch watch = new Watch(state, phenSig, etn, startTime,
endTime);
List<String> areas = map.get(watch);
if (areas == null) {
@ -440,19 +453,35 @@ public class WatchUtil {
List<String> partOfState = new ArrayList<String>(
determineAffectedPortions(watch.getAreas()));
watch.setPartOfState(partOfState);
watches.add(watch);
} else {
watch.setMarineAreas(determineMarineAreas(watch.getAreas()));
watches.addAll(generateMarineWatchItems(watch,
determineMarineAreas(watch.getAreas())));
}
watches.add(watch);
}
// keep the code for their use in the future
/*
// Sorts the watches based on state name.
/* Sorts the watches based on ETN, then state. Marine areas
* have a null state value so they appear at the end of each
* watch.
*/
Collections.sort(watches, new Comparator<Watch>() {
@Override
public int compare(Watch watch1, Watch watch2) {
String etn1 = watch1.getEtn();
String etn2 = watch2.getEtn();
int c;
if (etn1 == etn2)
c = 0;
else if (etn1 == null)
return 1;
else if (etn2 == null)
return -1;
else
c = etn1.compareTo(etn2);
if (c != 0)
return c;
String state1 = watch1.getState();
String state2 = watch2.getState();
if (state1 == state2)
@ -465,25 +494,23 @@ public class WatchUtil {
return state1.compareTo(state2);
}
});
*/
// Sorts the watches based on ETN.
Collections.sort(watches, new Comparator<Watch>() {
@Override
public int compare(Watch watch1, Watch watch2) {
String etn1 = watch1.getEtn();
String etn2 = watch2.getEtn();
if (etn1 == etn2)
return 0;
else if (etn1 == null)
return 1;
else if (etn2 == null)
return -1;
else
return etn1.compareTo(etn2);
// Filters out extra Watches that have different startTime but same phenSig, etn, state, partOfState, endTime, and marineArea.
Map<String, Watch> watchMap = new LinkedHashMap<String, Watch>();
for (Watch w: watches) {
List<String> pos = w.getPartOfState() != null ?
new ArrayList<String>(w.getPartOfState()) : null;
if (pos != null)
Collections.sort(pos);
String key = String.valueOf(w.getPhenSig())
+ String.valueOf(w.getEtn()) + String.valueOf(w.getState())
+ String.valueOf(pos) + String.valueOf(w.getEndTime());
if (w.getMarineArea() != null) {
key = key + '.' + w.getMarineArea();
}
});
watchMap.put(key, w);
}
watches = new ArrayList<Watch>(watchMap.values());
return watches;
}
@ -513,6 +540,18 @@ public class WatchUtil {
return affectedPortions;
}
private List<Watch> generateMarineWatchItems(Watch template, List<String> areas) {
ArrayList<Watch> result = new ArrayList<Watch>();
for (String area: areas) {
Watch watch = new Watch(template.getState(), template.getPhenSig(),
template.getEtn(), template.getStartTime(),
template.getEndTime());
watch.setMarineArea(area);
result.add(watch);
}
return result;
}
private List<String> determineMarineAreas(List<String> areas) {
HashSet<Pair<Integer, String>> groupedAreas = new HashSet<Pair<Integer,String>>();
for (String area : areas) {
@ -529,6 +568,7 @@ public class WatchUtil {
groupedAreas.add(new Pair<Integer, String>(entryIndex,
getMarineZoneName(area)));
}
break;
}
entryIndex++;
}
@ -698,4 +738,22 @@ public class WatchUtil {
return abrev;
}
// ActiveTableRecord: phenSig, etn, ugcZone, issueTime
public static final Comparator<ActiveTableRecord> PEUI = new Comparator<ActiveTableRecord>() {
@Override
public int compare(ActiveTableRecord o1, ActiveTableRecord o2) {
int i = o1.getPhensig().compareTo(o2.getPhensig());
if (i == 0) {
i = o1.getEtn().compareTo(o2.getEtn());
if (i == 0) {
i = o1.getUgcZone().compareTo(o2.getUgcZone());
if (i == 0) {
i = o1.getIssueTime().compareTo(o2.getIssueTime());
}
}
}
return i;
}
};
}

View file

@ -105,6 +105,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* 09/30/2013 #2147 rferrel Changes to archive hdf5 files.
* 10/15/2013 #2446 randerso Added ORDER BY clause to getOverlappingTimes
* 06/12/14 #3244 randerso Improved error handling
* 09/21/2014 #3648 randerso Changed to do version purging when new databases are added
*
* </pre>
*
@ -1078,9 +1079,38 @@ public class GFEDao extends DefaultPluginDao {
* Remove all GFE records for a particular DatabaseID
*
* @param dbId
* database to be purged
* @return true if database was removed, false if not found (already
* removed)
*/
public void purgeGFEGrids(final DatabaseID dbId) {
delete(dbId);
public boolean purgeGFEGrids(final DatabaseID dbId) {
Session sess = null;
boolean purged = false;
try {
sess = getHibernateTemplate().getSessionFactory().openSession();
Transaction tx = sess.beginTransaction();
Object toDelete = sess.get(DatabaseID.class, dbId.getId(),
LockOptions.UPGRADE);
if (toDelete != null) {
sess.delete(toDelete);
}
tx.commit();
purged = true;
} catch (Exception e) {
statusHandler.error("Error purging " + dbId, e);
} finally {
if (sess != null) {
try {
sess.close();
} catch (Exception e) {
statusHandler.error(
"Error occurred closing database session", e);
}
}
}
return purged;
}
/**

View file

@ -126,6 +126,7 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger;
* created in response to another DBInvChangeNotification so IFPServers stay in synch.
* Cleaned up commented code.
* 07/21/2014 #3415 randerso Fixed d2dGridDataPurged to not purge NetCDF databases.
* 09/21/2014 #3648 randerso Changed to do version purging when new databases are added
* </pre>
*
* @author bphillip
@ -203,7 +204,6 @@ public class GridParmManager {
} else {
statusHandler
.debug("No matching GridDatabase for requested ParmID in createParm()");
// TODO: should we return null?
return new GridParm();
}
}
@ -861,13 +861,23 @@ public class GridParmManager {
ServerResponse<GridDatabase> status = createDB(dbId);
if (status.isOkay()) {
db = status.getPayload();
} else {
statusHandler.error(status.message());
}
}
if (db != null) {
this.addDB(db);
// do version purging
List<DatabaseID> purged = null;
if (!db.getDbId().getModelTime()
.equals(DatabaseID.NO_MODEL_TIME)) {
purged = versionPurge(db.getDbId());
}
if (notify) {
createDbNotification(Arrays.asList(dbId), null);
createDbNotification(Arrays.asList(dbId), purged);
}
}
}
@ -969,85 +979,6 @@ public class GridParmManager {
return sr;
}
/**
* Perform database based on versions
*
* @return ServerResponse containing status only
*/
public ServerResponse<?> versionPurge() {
ServerResponse<?> sr = new ServerResponse<Object>();
ServerResponse<List<DatabaseID>> ssr = getDbInventory();
if (!ssr.isOkay()) {
sr.addMessage("VersionPurge failed - couldn't get database inventory");
sr.addMessages(ssr);
return sr;
}
List<DatabaseID> currentInv = ssr.getPayload();
// sort the inventory by site, type, model, time (most recent first)
Collections.sort(currentInv);
// process the inventory looking for "old" unwanted databases
String model = null;
String site = null;
String type = null;
int count = 0;
int desiredVersions = 0;
for (DatabaseID dbId : currentInv) {
// new series?
if (!dbId.getSiteId().equals(site)
|| !dbId.getDbType().equals(type)
|| !dbId.getModelName().equals(model)) {
site = dbId.getSiteId();
type = dbId.getDbType();
model = dbId.getModelName();
count = 0;
// determine desired number of versions
desiredVersions = this.config.desiredDbVersions(dbId);
}
// process the id and determine whether it should be purged
count++;
if ((count > desiredVersions)
&& !dbId.getModelTime().equals(DatabaseID.NO_MODEL_TIME)) {
deallocateDb(dbId, true);
PurgeLogger.logInfo("Purging " + dbId, "gfe");
}
}
List<DatabaseID> newInv = getDbInventory().getPayload();
List<DatabaseID> additions = new ArrayList<DatabaseID>(newInv);
additions.removeAll(currentInv);
List<DatabaseID> deletions = new ArrayList<DatabaseID>(currentInv);
deletions.removeAll(newInv);
// kludge to keep dbMap in synch until GridParmManager/D2DParmICache
// merge/refactor
List<DatabaseID> toRemove = new ArrayList<DatabaseID>(dbMap.keySet());
toRemove.removeAll(newInv);
for (DatabaseID dbId : toRemove) {
if (dbMap.remove(dbId) != null) {
statusHandler
.info("Synching GridParmManager with database inventory, removing "
+ dbId);
}
// add any removals to the deletions list
// so notifications go to the other JVMs
if (!deletions.contains(dbId)) {
deletions.add(dbId);
}
}
createDbNotification(additions, deletions);
return sr;
}
/**
* Purge grids based on time
*
@ -1112,13 +1043,8 @@ public class GridParmManager {
}
private ServerResponse<GridDatabase> createDB(DatabaseID id) {
// TODO: consider merging this into getDatabase()
ServerResponse<GridDatabase> status = new ServerResponse<GridDatabase>();
GridDatabase db = this.dbMap.get(id);
if (db != null) {
status.setPayload(db);
return status;
} // already exists
if (!id.isValid() || !id.getFormat().equals(DataType.GRID)) {
status.addMessage("Database id "
+ id
@ -1127,6 +1053,7 @@ public class GridParmManager {
}
// create the grid database
IFPGridDatabase db = null;
GridDbConfig dbConfig = this.config.gridDbConfig(id);
if (dbConfig == null) {
status.addMessage("Unable to obtain GridDbConfig information for creation"
@ -1149,9 +1076,6 @@ public class GridParmManager {
"Unable to mark database restored: " + dbId, e);
}
}
// add to list of databases
addDB(db);
} else {
status.addMessage("Database " + id + " is not valid.");
db = null;
@ -1202,12 +1126,8 @@ public class GridParmManager {
}
// create the databases (the list should now only contain GRID dbs)
ServerResponse<GridDatabase> sr = new ServerResponse<GridDatabase>();
for (DatabaseID dbId : inventory) {
sr = createDB(dbId);
if (!sr.isOkay()) {
statusHandler.error(sr.message());
}
getDatabase(dbId, false);
}
NetCDFDatabaseManager.initializeNetCDFDatabases(config);
@ -1269,11 +1189,9 @@ public class GridParmManager {
for (Date refTime : D2DGridDatabase.getModelRunTimes(
d2dModelName, desiredVersions)) {
D2DGridDatabase db = D2DGridDatabase.getDatabase(config,
d2dModelName, refTime);
if (db != null) {
addDB(db);
}
dbId = D2DGridDatabase.getDbId(d2dModelName, refTime,
config);
getDatabase(dbId, false);
}
} catch (Exception e) {
statusHandler.error("Error initializing D2D model: "
@ -1288,30 +1206,18 @@ public class GridParmManager {
public void filterGridRecords(List<GridRecord> gridRecords) {
List<GridUpdateNotification> guns = new LinkedList<GridUpdateNotification>();
for (GridRecord record : gridRecords) {
String d2dModelName = record.getDatasetId();
Date refTime = record.getDataTime().getRefTime();
DatabaseID dbId = D2DGridDatabase.getDbId(d2dModelName, refTime,
config);
// not a d2d model we care about
if (dbId == null) {
continue;
}
D2DGridDatabase db = (D2DGridDatabase) this.dbMap.get(dbId);
if (db == null) {
// New database
db = D2DGridDatabase.getDatabase(config, d2dModelName, refTime);
if (db == null) {
continue;
}
addDB(db);
statusHandler.info("filterGridRecords new D2D database: "
+ dbId);
GfeNotification dbInv = new DBInvChangeNotification(
Arrays.asList(dbId), null, siteID);
SendNotifications.send(dbInv);
}
D2DGridDatabase db = (D2DGridDatabase) getDatabase(dbId, true);
GridUpdateNotification gun = db.update(record);
if (gun != null) {
@ -1509,6 +1415,10 @@ public class GridParmManager {
if (notif instanceof DBInvChangeNotification) {
DBInvChangeNotification invChanged = (DBInvChangeNotification) notif;
for (DatabaseID dbId : invChanged.getDeletions()) {
deallocateDb(dbId, false);
}
ServerResponse<GridDatabase> sr = new ServerResponse<GridDatabase>();
for (DatabaseID dbId : invChanged.getAdditions()) {
this.getDatabase(dbId, false);
@ -1517,14 +1427,6 @@ public class GridParmManager {
statusHandler.error("Error updating GridParmManager: "
+ sr.message());
}
for (DatabaseID dbId : invChanged.getDeletions()) {
if (this.dbMap.remove(dbId) != null) {
statusHandler
.info("handleGfeNotification removing database: "
+ dbId);
}
}
} else if (notif instanceof GridUpdateNotification) {
DatabaseID satDbId = D2DSatDatabase.getDbId(siteID);
GridUpdateNotification gun = (GridUpdateNotification) notif;
@ -1585,10 +1487,7 @@ public class GridParmManager {
iter.remove();
} else {
// remove the database
if (this.dbMap.remove(dbid) != null) {
statusHandler.info("d2dGridDataPurged removing database: "
+ dbid);
}
deallocateDb(dbid, false);
}
}
@ -1611,4 +1510,46 @@ public class GridParmManager {
SendNotifications.send(notifs);
}
/**
* Perform database purge based on versions for the given model
*
* @param modelToPurge
* DatabaseID for model to be purged
*
* @return list of purged databases
*/
public List<DatabaseID> versionPurge(DatabaseID modelToPurge) {
int desiredVersions = this.config.desiredDbVersions(modelToPurge);
List<DatabaseID> currentInv = new ArrayList<DatabaseID>(
this.dbMap.keySet());
// sort the inventory by site, type, model, time (most recent first)
Collections.sort(currentInv);
// process the inventory looking for "old" unwanted databases
List<DatabaseID> purged = new ArrayList<DatabaseID>();
String model = modelToPurge.getModelName();
String site = modelToPurge.getSiteId();
String type = modelToPurge.getDbType();
int count = 0;
for (DatabaseID dbId : currentInv) {
// new series?
if (dbId.getSiteId().equals(site) && dbId.getDbType().equals(type)
&& dbId.getModelName().equals(model)) {
// process the id and determine whether it should be purged
count++;
if ((count > desiredVersions)
&& !dbId.getModelTime()
.equals(DatabaseID.NO_MODEL_TIME)) {
deallocateDb(dbId, true);
purged.add(dbId);
PurgeLogger.logInfo("Purging " + dbId, "gfe");
}
}
}
return purged;
}
}

View file

@ -115,6 +115,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* 10/31/2013 #2508 randerso Change to use DiscreteGridSlice.getKeys()
* 12/10/13 #2611 randerso Change saveGridData to set update time when saving grids
* 05/29/2014 #3071 randerso Fix NPE in getCachedParmID
* 09/21/2014 #3648 randerso Changed deleteDatabase to handle database already being deleted by other JVM
*
* </pre>
*
@ -2038,15 +2039,18 @@ public class IFPGridDatabase extends GridDatabase {
* the DatabaseID of the datbase to be deleted
*/
public static void deleteDatabase(DatabaseID id) {
boolean purged = false;
try {
GFEDao gfeDao = new GFEDao();
gfeDao.purgeGFEGrids(id);
purged = gfeDao.purgeGFEGrids(id);
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to delete model database: " + id, e);
}
deleteModelHDF5(id);
if (purged) {
deleteModelHDF5(id);
}
}
/**

View file

@ -38,7 +38,8 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
* 04/08/08 #875 bphillip Initial Creation
* 09/22/09 3058 rjpeter Converted to IRequestHandler
* 05/02/13 #1969 randerso Fixed null pointer if getParmList fails
* 06/13/13 2044 randerso Refactored to use IFPServer
* 06/13/13 #2044 randerso Refactored to use IFPServer
* 09/23/14 #3648 randerso Changed to send results even if some DbIds fail
* </pre>
*
* @author bphillip
@ -52,6 +53,8 @@ public class GetParmListHandler extends BaseGfeRequestHandler implements
List<ParmID> retVal = new ArrayList<ParmID>();
ServerResponse<List<ParmID>> sr = new ServerResponse<List<ParmID>>();
sr.setPayload(retVal);
for (DatabaseID id : request.getDbIds()) {
ServerResponse<List<ParmID>> ssr = getIfpServer(request)
.getGridParmMgr().getParmList(id);
@ -61,9 +64,6 @@ public class GetParmListHandler extends BaseGfeRequestHandler implements
sr.addMessages(ssr);
}
}
if (sr.isOkay()) {
sr.setPayload(retVal);
}
return sr;
}
}

View file

@ -290,9 +290,12 @@ class WECache(object):
saveSize = 0 # number of grids in saveRequest
# get full time range for flush
sortedList = sorted(trList, key=lambda t: t[0])
flushTR = (sortedList[0][0], sortedList[-1][1])
if (len(trList)):
sortedList = sorted(trList, key=lambda t: t[0])
flushTR = (sortedList[0][0], sortedList[-1][1])
else:
flushTR = (0, 2**31-1) # all times
timeSpan = None # time span if this contiguous batch
gridsToSave = ArrayList(self._batchSize) # grids in this contiguous batch
saveBatch = False
@ -421,7 +424,7 @@ class WECache(object):
def flush(self):
"""Writes all dirty time ranges in the WECache to HDF5/DB"""
# flush entire inventory
self.__flushGrids(self._dirty)
self.__flushGrids(self.keys())
def overlaps(self, tr1, tr2):
if (tr1[0] >= tr2[0] and tr1[0] < tr2[1]) or \

View file

@ -129,6 +129,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* 07/14/2014 mpduff Fix data range checks
* 08/05/2014 15671 snaples Fixed check for posting when not found in ingestfilter and token is set for load_shef_ingest
* 09/03/2014 mpduff Fixed river status table updates.
* 09/12/2014 mpduff Fix for shef_load_ingest token
* 09/18/2014 3627 mapeters Updated deprecated {@link TimeTools} usage.
* </pre>
*
@ -2147,14 +2148,14 @@ public class PostShef {
ingestSwitch = ShefConstants.IngestSwitch.POST_PE_OFF;
}
matchFound = true;
ingestSwitchMap.put(key, ingestSwitch);
break;
}
}
}
ingestSwitchMap.put(key, ingestSwitch);
}
matchFound = ingestSwitchMap.containsKey(key);
ingestSwitch = ingestSwitchMap.get(key);
/*

View file

@ -230,10 +230,10 @@ ${currTime}##
#set($lastTime = ${currTime})
#end
#end
#if(!${watch.marineAreas})
#if(!${watch.marineArea})
#areaFormat(${watch.partOfState} true false true)${watch.state}##
#else
#formatMarineAreas(${watch.marineAreas})
#formatMarineArea(${watch.marineArea})
#end
#set($lastEtn = ${watch.etn})
#end
@ -291,10 +291,10 @@ ${currTime}##
#set($lastTime = ${currTime})
#end
#end
#if(!${watch.marineAreas})
#if(!${watch.marineArea})
#areaFormat(${watch.partOfState} true false true)${watch.state}##
#else
#formatMarineAreas(${watch.marineAreas})
#formatMarineArea(${watch.marineArea})
#end
#set($lastEtn = ${watch.etn})
#end
@ -304,23 +304,9 @@ ${currTime}##
#end
########END MACRO
#macro(formatMarineAreas $marineAreas)
#set($macount = 0)
#set($numMarineAreas = ${list.size(${marineAreas})})
#foreach(${marineArea} in ${marineAreas})
#set($macount = $macount + 1)
#if(${marineArea}=="THE ADJACENT COASTAL WATERS" && $macount > 1)
OTHER ADJACENT COASTAL WATERS##
#else
#macro(formatMarineArea $marineArea)
${marineArea}##
#end
#if($macount == $numMarineAreas - 1)
AND ##
#elseif($macount < $numMarineAreas)
...##
#end
#end
#end
########END MACRO
#macro(printcoords $coordinates $list)

View file

@ -385,10 +385,10 @@ DENSE FOG WAS REDUCING VISIBILITIES TO BELOW ${visibility}. REDUCE YOUR SPEED...
#############
## WATCHES ##
#############
#if(${list.contains($includedWatches, "torWatches")} && ${list.contains(${bullets}, "includeTorWatches")})
#if(${list.contains($includedWatches, "TO.A")} && ${list.contains(${bullets}, "includeTorWatches")})
#inserttorwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
#if(${list.contains(${includedWatches}, "svrWatches")} && ${list.contains(${bullets}, "includeSvrWatches")})
#if(${list.contains(${includedWatches}, "SV.A")} && ${list.contains(${bullets}, "includeSvrWatches")})
#insertsvrwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
####################################

View file

@ -13,12 +13,12 @@
values passed to the template.
-->
<zoneWordingConfig>
<entry match="^LEZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE ERIE" />
<entry match="^LHZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE HURON" />
<entry match="^LMZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE MICHIGAN" />
<entry match="^LOZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE ONTARIO" />
<entry match="^LSZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE SUPERIOR" />
<entry match="^LCZ.*" replace="THE ADJACENT COASTAL WATERS OF LAKE SAINT CLAIRE" />
<entry match="^LEZ.*" replace="THE ADJACENT WATERS OF LAKE ERIE" />
<entry match="^LHZ.*" replace="THE ADJACENT WATERS OF LAKE HURON" />
<entry match="^LMZ.*" replace="THE ADJACENT WATERS OF LAKE MICHIGAN" />
<entry match="^LOZ.*" replace="THE ADJACENT WATERS OF LAKE ONTARIO" />
<entry match="^LSZ.*" replace="THE ADJACENT WATERS OF LAKE SUPERIOR" />
<entry match="^LCZ.*" replace="THE ADJACENT WATERS OF LAKE SAINT CLAIRE" />
<entry match="^SLZ.*" replace="" /> <!-- Saint Lawrence River -->
<entry match="^.*" replace="THE ADJACENT COASTAL WATERS" />
</zoneWordingConfig>

View file

@ -354,10 +354,10 @@ CONDITIONS CAN DETERIORATE RAPIDLY IN WINTER WEATHER SITUATIONS. BE PREPARED FOR
#############
## WATCHES ##
#############
#if(${list.contains(${includedWatches}, "torWatches")} && ${list.contains(${bullets}, "includeTorWatches")})
#if(${list.contains($includedWatches, "TO.A")} && ${list.contains(${bullets}, "includeTorWatches")})
#inserttorwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
#if(${list.contains(${includedWatches}, "svrWatches")} && ${list.contains(${bullets}, "includeSvrWatches")})
#if(${list.contains(${includedWatches}, "SV.A")} && ${list.contains(${bullets}, "includeSvrWatches")})
#insertsvrwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
####################################

View file

@ -55,26 +55,13 @@ public class RegistryServiceConfiguration {
/** Default value for establishing an HTTP connection */
private static final String DEFAULT_CONNECT_TIMEOUT = "10000";
/** The HTTP Communication policy configuration */
private HTTPClientPolicy httpClientPolicy;
/**
* Gets the HTTP communication policy.
*
* @return The HTTP communication policy
*/
public HTTPClientPolicy getHttpClientPolicy() {
if (httpClientPolicy == null) {
initHttpClientPolicy();
}
return httpClientPolicy;
}
/**
* Initializes the HTTP communication policy
*/
private void initHttpClientPolicy() {
httpClientPolicy = new HTTPClientPolicy();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setReceiveTimeout(Long.parseLong(System.getProperty(
RECEIVE_TIMEOUT_PROPERTY, DEFAULT_RECEIVE_TIMEOUT)));
httpClientPolicy.setConnectionTimeout(Long.parseLong(System
@ -88,5 +75,6 @@ public class RegistryServiceConfiguration {
httpClientPolicy.setProxyServerPort(ProxyConfiguration.getHttpsProxyPort());
httpClientPolicy.setNonProxyHosts(ProxyConfiguration.getHttpsNonProxyHosts());
}
return httpClientPolicy;
}
}

View file

@ -161,6 +161,9 @@ _ldm_root_dir=${_ldm_dir}/ldm-%{_ldm_version}
_myHost=`hostname`
_myHost=`echo ${_myHost} | cut -f1 -d'-'`
# Remove old ldm dir
rm -rf ${_ldm_root_dir}
pushd . > /dev/null 2>&1
cp ${_ldm_dir}/SOURCES/%{_ldm_src_tar} ${_ldm_dir}
# unpack the ldm source
@ -176,7 +179,6 @@ if [ $? -ne 0 ]; then
exit 1
fi
chown -R ldm:fxalpha ${_ldm_dir}
popd . > /dev/null 2>&1
# create .bash_profile
if [ ! -f /usr/local/ldm/.bash_profile ]; then
@ -223,6 +225,8 @@ fi
popd > /dev/null 2>&1
# unpack bin, decoders, and etc.
pushd . > /dev/null 2>&1
cd ${_ldm_dir}/SOURCES
_PATCH_DIRS=( 'bin' 'decoders' 'etc' )
for patchDir in ${_PATCH_DIRS[*]};
do