processor)
+ throws DataAccessLayerException {
int rowsProcessed = 0;
try {
// Get a session and create a new criteria instance
@@ -480,24 +482,29 @@ public class CoreDao extends HibernateDaoSupport {
"Error populating query", e);
}
- if (processor.getBatchSize() > 0) {
- hibQuery.setMaxResults(processor.getBatchSize());
- } else if (query.getMaxResults() != null) {
- hibQuery.setMaxResults(query.getMaxResults());
+ int batchSize = processor.getBatchSize();
+ if (batchSize <= 0) {
+ batchSize = 1000;
}
- List> results = null;
- boolean continueProcessing = false;
- int count = 0;
+ hibQuery.setFetchSize(processor.getBatchSize());
- do {
- hibQuery.setFirstResult(count);
- results = hibQuery.list();
- continueProcessing = processor.process(results);
- count += results.size();
+ int count = 0;
+ ScrollableResults rs = hibQuery
+ .scroll(ScrollMode.FORWARD_ONLY);
+ boolean continueProcessing = true;
+
+ while (rs.next() && continueProcessing) {
+ Object[] row = rs.get();
+ if (row.length > 0) {
+ continueProcessing = processor
+ .process((T) row[0]);
+ }
+ count++;
+ if ((count % batchSize) == 0) {
getSession().clear();
- } while (continueProcessing && (results != null)
- && (results.size() > 0));
+ }
+ }
processor.finish();
return count;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/processor/IDatabaseProcessor.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/processor/IDatabaseProcessor.java
index 9fd67b00cc..0a3a4e7e73 100644
--- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/processor/IDatabaseProcessor.java
+++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/processor/IDatabaseProcessor.java
@@ -19,12 +19,9 @@
**/
package com.raytheon.uf.edex.database.processor;
-import java.util.List;
-
/**
* Interface for working with a batched set of results inside a database
- * session. Process can be called multiple times based on the batchSize of the
- * processor.
+ * session. Process will be called for each row.
*
*
*
@@ -32,21 +29,22 @@ import java.util.List;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Dec 9, 2013 2555 rjpeter Initial creation
+ * Dec 9, 2013 2555 rjpeter Initial creation.
+ * Jan 23, 2014 2555 rjpeter Updated to be a row at a time using ScrollableResults.
*
*
* @author rjpeter
* @version 1.0
*/
-public interface IDatabaseProcessor {
+public interface IDatabaseProcessor {
/**
- * Perform any processing on this batch of objects.
+ * Perform any processing on this row.
*
- * @param objects
+ * @param row
* @return True if should continue processing, false otherwise.
*/
- public boolean process(List> objects);
+ public boolean process(T row);
/**
* Perform any post processing if necessary.
diff --git a/pythonPackages/numpy/numpy/core/numeric.py b/pythonPackages/numpy/numpy/core/numeric.py
old mode 100644
new mode 100755
index e7d2261722..8c9f507d21
--- a/pythonPackages/numpy/numpy/core/numeric.py
+++ b/pythonPackages/numpy/numpy/core/numeric.py
@@ -1493,10 +1493,8 @@ def set_string_function(f, repr=True):
else:
return multiarray.set_string_function(f, repr)
-# randerso DR #2513 remove calls to non-threadsafe set_string_function
-# https://github.com/numpy/numpy/issues/3961
-# set_string_function(array_str, 0)
-# set_string_function(array_repr, 1)
+set_string_function(array_str, 0)
+set_string_function(array_repr, 1)
little_endian = (sys.byteorder == 'little')
diff --git a/rpms/awips2.core/Installer.ant/scripts/profile.d/awips2Ant.sh b/rpms/awips2.core/Installer.ant/scripts/profile.d/awips2Ant.sh
index e4f87f6538..4b3d02ebc3 100644
--- a/rpms/awips2.core/Installer.ant/scripts/profile.d/awips2Ant.sh
+++ b/rpms/awips2.core/Installer.ant/scripts/profile.d/awips2Ant.sh
@@ -8,10 +8,7 @@ if [ ${RC} -ne 0 ]; then
fi
# Determine Where Ant Has Been Installed.
-ANT_INSTALL=`rpm -q --queryformat '%{INSTPREFIXES}' awips2-ant`
-if [ "${ANT_INSTALL}" = "" ]; then
- return
-fi
+ANT_INSTALL=/awips2/ant
# Update The Environment.
export ANT_HOME="${ANT_INSTALL}"
diff --git a/rpms/awips2.core/Installer.python/src/x86_64/hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz b/rpms/awips2.core/Installer.python/src/x86_64/hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz
index 23dfbc4ee6..995031055b 100644
Binary files a/rpms/awips2.core/Installer.python/src/x86_64/hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz and b/rpms/awips2.core/Installer.python/src/x86_64/hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz differ
diff --git a/rpms/awips2.core/Installer.tools/source/lzf.tar.gz b/rpms/awips2.core/Installer.tools/source/lzf.tar.gz
index 22de2de72c..39534f2eb4 100644
Binary files a/rpms/awips2.core/Installer.tools/source/lzf.tar.gz and b/rpms/awips2.core/Installer.tools/source/lzf.tar.gz differ
diff --git a/rpms/build/x86_64/build.sh b/rpms/build/x86_64/build.sh
index 2224eb264a..e15fbc57ca 100644
--- a/rpms/build/x86_64/build.sh
+++ b/rpms/build/x86_64/build.sh
@@ -409,17 +409,21 @@ fi
if [ "${1}" = "-viz" ]; then
buildRPM "awips2"
- #buildRPM "awips2-common-base"
+ buildRPM "awips2-common-base"
+ #buildRPM "awips2-python-numpy"
+ buildRPM "awips2-ant"
#buildRPM "awips2-python-dynamicserialize"
#buildRPM "awips2-python"
- buildRPM "awips2-adapt-native"
+ #buildRPM "awips2-adapt-native"
#unpackHttpdPypies
#if [ $? -ne 0 ]; then
# exit 1
#fi
#buildRPM "awips2-httpd-pypies"
- buildRPM "awips2-hydroapps-shared"
+ #buildRPM "awips2-hydroapps-shared"
#buildRPM "awips2-rcm"
+ #buildRPM "awips2-gfesuite-client"
+ #buildRPM "awips2-gfesuite-server"
#buildRPM "awips2-tools"
#buildRPM "awips2-cli"
buildCAVE
@@ -447,12 +451,13 @@ if [ "${1}" = "-custom" ]; then
#if [ $? -ne 0 ]; then
# exit 1
#fi
- buildRPM "awips2-adapt-native"
- buildRPM "awips2-hydroapps-shared"
+ #buildRPM "awips2-adapt-native"
+ #buildRPM "awips2-hydroapps-shared"
#buildRPM "awips2-alertviz"
#buildRPM "awips2-python"
#buildRPM "awips2-alertviz"
#buildRPM "awips2-eclipse"
+ buildRPM "awips2-python"
exit 0
fi