Merge branch 'omaha_14.3.1' into omaha_14.4.1

Former-commit-id: 5e6b9943f1 [formerly 1a06d18686] [formerly c83753b4d3 [formerly 5c1f5dbf543c9cd27cf83158308a9ce34d057201]]
Former-commit-id: c83753b4d3
Former-commit-id: 1b709fb6c3
This commit is contained in:
Steve Harris 2014-05-15 08:31:27 -05:00
commit 3337f2d6d1
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 # takes three args: table, constraint name, unique columns
# will first drop the constraint if it exists and then adds it back, this is # 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 # 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." echo "FATAL: The update has failed."
exit 1 exit 1
fi fi
}
# takes one arg: name of the table
function vacuumTable {
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE $1" ${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE $1"
} }
echo "INFO: Dropping dataURI columns." echo "INFO: Dropping dataURI columns."
dropAndAddConstraint grid grid_reftime_forecasttime_rangestart_rangeend_info_id "(refTime, forecastTime, rangestart, rangeend, info_id)" dropAndAddConstraint grid grid_reftime_forecasttime_info_id_rangestart_rangeend_key "(refTime, forecastTime, info_id, rangestart, rangeend)"
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_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 dropDatauri
vacuumTable grid
vacuumTable grid_info
echo "INFO: grid dataURI column dropped successfully" 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 * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information. * 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" CREATE INDEX "gridinfoSecondryId_idx"
ON grid_info ON grid_info
USING btree USING btree

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -43,6 +43,15 @@
version="0.0.0" version="0.0.0"
fragment="true"/> 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 <plugin
id="gov.noaa.nws.ncep.ui.nsharp.win64" id="gov.noaa.nws.ncep.ui.nsharp.win64"
os="win32" os="win32"
@ -52,4 +61,4 @@
version="0.0.0" version="0.0.0"
fragment="true"/> 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