WebSphere eXtreme Scale includes a query engine that allows clients to run queries against a single partition in the grid. The query engine does not provide a way to run queries over the entire grid. This would involve a complex interaction between every partition and wouldn't scale very well. Joining tables across hundreds of partitions, or ordering results requires query decomposition, multiple remote requests and client-side aggregation.
This sample provides a simple alternative that uses a ReduceGridAgent from the Data Grid API to spray a query request to all partitions and return results to the client. The client has access to all of the details of the query result and can perform additional aggregation on the results if needed.
The sample includes the following features:
- Run a select query against all partitions.
- Retrieve the query plan from all partitions and verify that the plan is identical.
- Run a delete query against all partitions.
- Run a "reload" query against all partitions.
- Two test cases demonstrating both the EntityManager and the ObjectMap APIs.
- WebSphere eXtreme Scale version 220.127.116.11 or later
- The sample will only run in the standalone WebSphere eXtreme Scale installation or the trial version .
- Java Software Development Kit (JDK) version 1.5 or later
- Version 5 is required if using the EntityManager API sample.
To install the sample follow these steps:
- Download the ParallelQuery.zip file from the following downloads section.
- Extract the ParallelQuery.zip file to the <ObjectGrid>/samples directory.
The <ObjectGrid> directory is the directory where the eXtreme Scale trial was extracted, or the ObjectGrid directory within a WebSphere eXtreme Scale product install.
Running the sample
The ParallelQuery.zip contains the ParallelQuery binary class files and the source files for running parallel queries. It also includes two test cases that demonstrate how to use the sample using both the EntityManager API and the ObjectMap API . The samples can be run with the supplied scripts for Windows and UNIX operating systems, or can also be run in Eclipse.
For details on running the sample, see the README.txt file located in the extracted ParallelQuery directory. For details on running the sample in Eclipse, see the ECLIPSE_README.txt file also located in the extracted ParallelQuery directory.
Please post any feedback on this sample as a comment on this page.
|ParallelQuery.zip||108 kb||Apr 26, 2010||Added cascade and invalidation support. See README.txt for details.|