Merge "Issue #1638 Made pypies slab reads work in more than 2-d data. Moved DecisionTree to common.dataquery. Merged changes into CAVEApplication." into development

Former-commit-id: 19f0ca1fb0 [formerly 19f0ca1fb0 [formerly 3ba0adb830cc0839d39a8cd938fbde3cf27e4651]]
Former-commit-id: d2a108ed8a
Former-commit-id: a5bedd2a27
This commit is contained in:
Nate Jensen 2013-05-08 18:42:28 -05:00 committed by Gerrit Code Review
commit 825c46815a
7 changed files with 46 additions and 12 deletions

View file

@ -31,13 +31,13 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.dataquery.DecisionTree;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.URICatalog.IURIRefreshCallback;

View file

@ -22,8 +22,8 @@ package com.raytheon.uf.viz.core.rsc.updater;
import java.util.Map;
import com.raytheon.uf.common.dataquery.DecisionTree;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.IDisposeListener;

View file

@ -55,6 +55,7 @@ import com.raytheon.uf.viz.core.RecordFactory;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserver;
import com.raytheon.uf.viz.core.localization.LocalizationInitializer;
import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob;
import com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor;
import com.raytheon.viz.alerts.jobs.AutoUpdater;
import com.raytheon.viz.alerts.jobs.MenuUpdater;
@ -129,11 +130,21 @@ public class CAVEApplication implements IStandaloneComponent {
// dialog which would break gfeClient-based cron jobs.
return IApplication.EXIT_OK;
}
initializeSerialization();
Job serializationJob = initializeSerialization();
initializeDataStoreFactory();
initializeObservers();
initializeSimulatedTime();
// wait for serialization initialization to complete before
// opening JMS connection to avoid deadlock in class loaders
if (serializationJob != null) {
serializationJob.join();
}
// open JMS connection to allow alerts to be received
NotificationManagerJob.connect();
int returnCode = IApplication.EXIT_OK;
try {
@ -154,6 +165,14 @@ public class CAVEApplication implements IStandaloneComponent {
// catch any exceptions to ensure rest of finally block
// executes
}
try {
// disconnect from JMS
NotificationManagerJob.disconnect();
} catch (RuntimeException e) {
// catch any exceptions to ensure rest of finally block
// executes
}
}
if (returnCode == PlatformUI.RETURN_RESTART) {
@ -176,8 +195,8 @@ public class CAVEApplication implements IStandaloneComponent {
new PyPiesDataStoreFactory(pypiesProps));
}
protected void initializeSerialization() {
new Job("Loading Serialization") {
protected Job initializeSerialization() {
Job job = new Job("Loading Serialization") {
@Override
protected IStatus run(IProgressMonitor monitor) {
@ -190,7 +209,9 @@ public class CAVEApplication implements IStandaloneComponent {
return Status.OK_STATUS;
}
}.schedule();
};
job.schedule();
return job;
}
/**

View file

@ -27,13 +27,13 @@ import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataquery.DecisionTree;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequestSet;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponseSet;
import com.raytheon.uf.viz.core.RecordFactory;
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;

View file

@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.uf.common.dataquery.db,
Export-Package: com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.dataquery.db,
com.raytheon.uf.common.dataquery.requests,
com.raytheon.uf.common.dataquery.responses
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1173",

View file

@ -18,7 +18,7 @@
* further licensing information.
**/
package com.raytheon.uf.viz.core.datastructure;
package com.raytheon.uf.common.dataquery;
import java.util.ArrayList;
import java.util.Arrays;

View file

@ -95,12 +95,24 @@ def read(ds, request):
elif rt == 'SLAB':
minIndex = request.getMinIndexForSlab()
maxIndex = request.getMaxIndexForSlab()
# Get all sizes and slices in reverse order
slices = []
sizes = []
numIndices = len(minIndex)
# Get all sizes and slices in reverse order
for i in reversed(range(numIndices)):
slices.append(slice(minIndex[i], maxIndex[i]))
sizes.append(maxIndex[i] - minIndex[i])
sel = h5py.selections.HyperSelection(ds.shape)
# mask the request slices
sel[()] = False
# reverse x and y for hdf5
sel[minIndex[1]:maxIndex[1], minIndex[0]:maxIndex[0]] = True
sel[tuple(slices)] = True
# Resize data to desired slab size
result = ds[sel]
result.resize(maxIndex[1]-minIndex[1], maxIndex[0]-minIndex[0])
result.resize(tuple(sizes))
else:
raise NotImplementedException('Only read requests supported are ' +
'ALL, POINT, XLINE, YLINE, and SLAB')