Merge branch 'omaha_14.3.1' into omaha_14.4.1

Former-commit-id: 5e6b9943f1 [formerly 1a06d18686] [formerly 5e6b9943f1 [formerly 1a06d18686] [formerly c83753b4d3 [formerly 5c1f5dbf543c9cd27cf83158308a9ce34d057201]]]
Former-commit-id: c83753b4d3
Former-commit-id: 3337f2d6d1 [formerly 1b709fb6c3]
Former-commit-id: 3e4e9365ca
This commit is contained in:
Steve Harris 2014-05-15 08:31:27 -05:00
commit dfc96a2fae
16 changed files with 195 additions and 88 deletions

View file

@ -16,6 +16,21 @@ function dropDatauri {
}
# takes one arg: name of the index
function dropIndex {
${PSQL} -U awips -d metadata -c "DROP INDEX IF EXISTS \"$1\";"
}
# takes three args: table, index name, columns
# will first drop the index if it exists and then adds it back, this is
# fairly inefficient if it does exist but operationally it won't exist and for
# testing this allows the script to be run easily as a noop.
function dropAndAddIndex {
${PSQL} -U awips -d metadata -c "DROP INDEX IF EXISTS \"$2\";"
${PSQL} -U awips -d metadata -c "CREATE INDEX $2 ON $1 USING btree $3;"
}
# takes three args: table, constraint name, unique columns
# will first drop the constraint if it exists and then adds it back, this is
# fairly inefficient if it does exist but operationally it won't exist and for
@ -28,14 +43,24 @@ function dropAndAddConstraint {
echo "FATAL: The update has failed."
exit 1
fi
}
# takes one arg: name of the table
function vacuumTable {
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE $1"
}
echo "INFO: Dropping dataURI columns."
dropAndAddConstraint grid grid_reftime_forecasttime_rangestart_rangeend_info_id "(refTime, forecastTime, rangestart, rangeend, info_id)"
dropAndAddConstraint grid_info grid_info_datasetid_secondaryid_ensembleid_location_id_parameter_abbreviation_level_id "(datasetid, secondaryid, ensembleid, location_id, parameter_abbreviation, level_id)"
dropAndAddConstraint grid grid_reftime_forecasttime_info_id_rangestart_rangeend_key "(refTime, forecastTime, info_id, rangestart, rangeend)"
dropAndAddConstraint grid_info grid_info_datasetid_parameter_abbreviation_level_id_seconda_key "(datasetid, parameter_abbreviation, level_id, secondaryid, ensembleid, location_id)"
dropIndex gridDatasetReftime_idx
dropIndex grid_reftimeindex
dropIndex gridinfoNameParamLevel_idx
dropAndAddIndex grid grid_info_id_index "(info_id)"
dropDatauri
vacuumTable grid
vacuumTable grid_info
echo "INFO: grid dataURI column dropped successfully"

View file

@ -17,17 +17,6 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
CREATE INDEX "gridDatasetReftime_idx"
ON grid
USING btree
(info_id, reftime, forecasttime);
CREATE INDEX "gridinfoNameParamLevel_idx"
ON grid_info
USING btree
(datasetid, parameter_abbreviation, level_id);
CREATE INDEX "gridinfoSecondryId_idx"
ON grid_info
USING btree

View file

@ -63,8 +63,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@Table(name = "grid_info", uniqueConstraints = { @UniqueConstraint(columnNames = {
"datasetid", "secondaryid", "ensembleid", "location_id",
"parameter_abbreviation", "level_id" }) })
"datasetid", "parameter_abbreviation", "level_id", "secondaryid",
"ensembleid", "location_id" }) })
@SequenceGenerator(name = "GRIDINFO_GENERATOR", sequenceName = "gridinfo_seq", allocationSize = 1)
@DynamicSerialize
public class GridInfoRecord extends PersistableDataObject<Integer> {
@ -196,59 +196,74 @@ public class GridInfoRecord extends PersistableDataObject<Integer> {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((datasetId == null) ? 0 : datasetId.hashCode());
result = prime * result
result = (prime * result)
+ ((ensembleId == null) ? 0 : ensembleId.hashCode());
result = prime * result + ((level == null) ? 0 : level.hashCode());
result = prime * result
result = (prime * result) + ((level == null) ? 0 : level.hashCode());
result = (prime * result)
+ ((location == null) ? 0 : location.hashCode());
result = prime * result
result = (prime * result)
+ ((parameter == null) ? 0 : parameter.hashCode());
result = prime * result
result = (prime * result)
+ ((secondaryId == null) ? 0 : secondaryId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
GridInfoRecord other = (GridInfoRecord) obj;
if (datasetId == null) {
if (other.datasetId != null)
if (other.datasetId != null) {
return false;
} else if (!datasetId.equals(other.datasetId))
}
} else if (!datasetId.equals(other.datasetId)) {
return false;
}
if (ensembleId == null) {
if (other.ensembleId != null)
if (other.ensembleId != null) {
return false;
} else if (!ensembleId.equals(other.ensembleId))
}
} else if (!ensembleId.equals(other.ensembleId)) {
return false;
}
if (level == null) {
if (other.level != null)
if (other.level != null) {
return false;
} else if (!level.equals(other.level))
}
} else if (!level.equals(other.level)) {
return false;
}
if (location == null) {
if (other.location != null)
if (other.location != null) {
return false;
} else if (!location.equals(other.location))
}
} else if (!location.equals(other.location)) {
return false;
}
if (parameter == null) {
if (other.parameter != null)
if (other.parameter != null) {
return false;
} else if (!parameter.equals(other.parameter))
}
} else if (!parameter.equals(other.parameter)) {
return false;
}
if (secondaryId == null) {
if (other.secondaryId != null)
if (other.secondaryId != null) {
return false;
} else if (!secondaryId.equals(other.secondaryId))
}
} else if (!secondaryId.equals(other.secondaryId)) {
return false;
}
return true;
}

View file

@ -76,14 +76,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "gridseq")
@Table(name = "grid", uniqueConstraints = { @UniqueConstraint(columnNames = {
"refTime", "forecastTime", "rangestart", "rangeend", "info_id" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
* No need for a separate refTime/forecastTime index since its included in grid
* unique constraint
*/
@org.hibernate.annotations.Table(appliesTo = "grid", indexes = { @Index(name = "grid_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@Table(name = "grid", uniqueConstraints = { @UniqueConstraint(columnNames = {
"refTime", "forecastTime", "info_id", "rangestart", "rangeend" }) })
@org.hibernate.annotations.Table(appliesTo = "grid", indexes = { @Index(name = "grid_info_id_index", columnNames = { "info_id" }) })
@DynamicSerialize
public class GridRecord extends PersistablePluginDataObject implements
ISpatialEnabled {

View file

@ -30,6 +30,7 @@
* Nov 13, 2013 2549 rferrel Changes to GFE and modelsounding.
* Dec 12, 2013 2624 rferrel Document Julian time stamp.
* Dec 13, 2013 2555 rjpeter Updated all to use dirPatterns.
* May 24, 2014 2881 rferrel Updated retention times.
*
* @author rferrel
* @version 1.0
@ -45,8 +46,8 @@
The <category> has four types of tags:
<name> - Required tag. The id for the category such as grib2 or redbook.
Used in the GUIs to filter what is the display in the table.
<extRetentionHours> - Optional tag. The extended retentionHours for selected directories of this category.
Default is the archive's <minRetentionHours>.
<extRetentionHours> - Optional tag. The hours to retain data in directories of selected Data Sets for a category.
Default is 1 hour.
<dataSet> - Required to have a least one. Each one contains a set of tags explained below.
<selectedDisplayNames> - A directory matching <dirPattern>. These are selected directories from the Retention GUI. The purger
will used the category's <extRetentionHours> instead of the Arhivie's <minRetentionHours>.
@ -139,7 +140,7 @@
<archive>
<name>Processed</name>
<rootDir>/archive/</rootDir>
<minRetentionHours>24</minRetentionHours>
<minRetentionHours>168</minRetentionHours>
<category>
<name>Decision Assistance</name>
<extRetentionHours>168</extRetentionHours>

View file

@ -27,6 +27,7 @@
* Aug 05, 2013 2224 rferrel Changes to add dataSet tags.
* Oct 01, 2013 2147 rferrel Date time stamp no longer requires an hour field.
* Dec 12, 2013 2624 rferrel Document Julian time stamp.
* May 14, 2014 2881 rferrel Change retention times and data set modifications.
*
* @author rferrel
* @version 1.0
@ -42,8 +43,8 @@
The <category> has four types of tags:
<name> - Required tag. The id for the category such as grib2 or redbook.
Used in the GUIs to filter what is the display in the table.
<extRetentionHours> - Optional tag. The extended retentionHours for selected directories of this category.
Default is the archive's <minRetentionHours>.
<extRetentionHours> - Optional tag. The hours to retain data in directories of selected Data Sets for a category.
Default is 1 hour.
<dataSet> - Required to have a least one. Each one contains a set of tags explained below.
<selectedDisplayNames> - A directory matching <dirPattern>. These are selected directories from the Retention GUI. The purger
will used the category's <extRetentionHours> instead of the Arhivie's <minRetentionHours>.
@ -136,48 +137,57 @@
<archive>
<name>Raw</name>
<rootDir>/data_store/</rootDir>
<minRetentionHours>24</minRetentionHours>
<minRetentionHours>168</minRetentionHours>
<category>
<name>Local</name>
<extRetentionHours>168</extRetentionHours>
<dataSet>
<dirPattern>(manual)</dirPattern>
<filePattern>.*\.(\d{4})(\d{2})(\d{2})_(\d{2}).*</filePattern>
<displayLabel>{1}</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)</dirPattern>
<filePattern>.*_(\d{4})(\d{2})(\d{2})(\d{2})\..*</filePattern>
<displayLabel>{1}</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)</dirPattern>
<filePattern>.*-(\d{10})</filePattern>
<displayLabel>{1}</displayLabel>
<timeType>EpochSec</timeType>
<dateGroupIndices>2</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)</dirPattern>
<filePattern>.*\.wan(\d{10})</filePattern>
<displayLabel>{1}</displayLabel>
<timeType>EpochSec</timeType>
<dateGroupIndices>2</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/mpe</dirPattern>
<filePattern>.*[^\d](\d{4})(\d{2})(\d{2})(\d{2})(z|\d{2}z).*</filePattern>
<displayLabel>{1}</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)</dirPattern>
<filePattern>.*\.\d{8}\.\d{3}</filePattern>
<displayLabel>{1}</displayLabel>
<timeType>File</timeType>
</dataSet>
<dataSet>
<dirPattern>(manual)/grib/(\d{4})(\d{2})(\d{2})/\d{2}/</dirPattern>
<filePattern>.*(LAPS|MSAS).*</filePattern>
<timeType>Date</timeType>
<displayLabel>{1}-LAPS/MSAS</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/grib/(\d{4})(\d{2})(\d{2})/(\d{2})/(mpe)</dirPattern>
<filePattern>.*_(\d{4})(\d{2})(\d{2})(\d{2})z.*</filePattern>
<timeType>Date</timeType>
<displayLabel>{1}-MPE Local</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/grib/(\d{4})(\d{2})(\d{2})/(\d{2})/(mpe)</dirPattern>
<filePattern>(ZETA98_)[A-Z].*(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})z.*</filePattern>
<timeType>Date</timeType>
<displayLabel>{1}-HPE/BiasHPE</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/.*taf/(\d{4})(\d{2})(\d{2})/(\d{2})</dirPattern>
<timeType>Date</timeType>
<displayLabel>{1}-Local TAFs</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/shef/(\d{4})(\d{2})(\d{2})/(\d{2})</dirPattern>
<timeType>Date</timeType>
<displayLabel>{1}-Various SHEF Products</displayLabel>
<dateGroupIndices>2,3,4,5</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/text/\d{8}/\d{2}</dirPattern>
<timeType>EpochSec</timeType>
<filePattern>.*(\d{10})</filePattern>
<displayLabel>{1}-Various Local Text Products</displayLabel>
<dateGroupIndices>2</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>(manual)/warning/\d{8}/\d{2}</dirPattern>
<timeType>EpochSec</timeType>
<filePattern>.*(\d{10})</filePattern>
<displayLabel>{1}-Local Warnings</displayLabel>
<dateGroupIndices>2</dateGroupIndices>
</dataSet>
</category>
<category>
<name>Model</name>
@ -238,6 +248,12 @@
<displayLabel>{1}</displayLabel>
<dateGroupIndices>4,5,6,7</dateGroupIndices>
</dataSet>
<dataSet>
<dirPattern>radar/(t...)/.*/.*/.*/.*/(netcdf)/.*</dirPattern>
<filePattern>(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(.*)</filePattern>
<displayLabel>{1}-{2}</displayLabel>
<dateGroupIndices>3,4,5,6</dateGroupIndices>
</dataSet>
</category>
<category>
<name>Satellite</name>

View file

@ -119,7 +119,7 @@ public class TextDBSrvWrapper {
int tries = 0;
byte[] bytesOut = null;
while (tries < 2) {
while ((bytesOut == null) && (tries < 2)) {
try {
ByteArrayOutputStream baos = ByteArrayOutputStreamPool
.getInstance().getStream();

View file

@ -43,6 +43,15 @@
version="0.0.0"
fragment="true"/>
<plugin
id="gov.noaa.nws.ncep.ui.nsharp.win32"
os="win32"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="gov.noaa.nws.ncep.ui.nsharp.win64"
os="win32"
@ -52,4 +61,4 @@
version="0.0.0"
fragment="true"/>
</feature>
</feature>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>gov.noaa.nws.ncep.ui.nsharp.win32</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Mon Oct 17 10:13:57 CDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Win32 Native Nsharp Library 32-Bit
Bundle-SymbolicName: gov.noaa.nws.ncep.ui.nsharp.win32
Bundle-Version: 1.0.0.qualifier
Fragment-Host: gov.noaa.nws.ncep.ui.nsharp;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86))

Binary file not shown.

View file

@ -0,0 +1,3 @@
bin.includes = META-INF/,\
.,\
bignsharp.dll