|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (37)
View Page History----
{cagrid-1.4-docs-nav:name=FQP|guidetype=Administrators}
{cagrid-1.4-docs-nav:name=FQP|guidetype=Administrators}
{cagridtoc:exclude=Federated Query Processor 1.4 Administrators Guide}
{cagridroundpanel}
{pre:class=cagridheaderfont}Contents{pre}
{toc:outline=true|exclude=Federated Query Processor 1.4 Administrators Guide|style=none}
{cagridroundpanel}
{toc:outline=true|exclude=Federated Query Processor 1.4 Administrators Guide|style=none}
{cagridroundpanel}
h1. Prerequisites
----
The Federated Query Processor service does not require any software or special system configuration beyond the standard caGrid stack.
----
The Federated Query Processor service does not require any software or special system configuration beyond the standard caGrid stack.
To use the caGrid Transfer infrastructure, [caGrid Transfer|transfer:] infrastructure for results retrieval, the transfer project is required, and the FQP service must be deployed to the *same* Tomcat container as the transfer service.
The performance of the FQP service may benefit from large amounts of RAM and multiple processor cores for handling concurrent query operations, but this is not strictly required to deploy the service.
h1. Installing the Software
----
----
Installation of the Federated Query Processor can be accomplished with either using the caGrid Installer, or manually.
h2. Install caGrid and a Container
In this step you will download and install the FQP service and a grid service container using the caGrid Installer. If you already have caGrid 1.4 installed on your machine, and a suitable container, you may proceed to the next section.
{tip}
{tip}Once you have installed caGrid, the FQP software can be found in the directory location where you installed caGrid, in the _caGrid/projects/fqp_ directory. This guide will refer to that location as *{_}FQP_HOME{_}*
{tip}
{tip}To install caGrid/FederatedQueryProcessor and set up a container, see the following sections.
{include:caGrid14:Install caGrid and Configure a Secure Container Using the caGrid 1.4 Installer}
h1. Configuring the Service
----
----
{tip}To simply deploy the FQP service with the default configuration, all you need to edit is the service's standard ServiceMetadata, by following [these instructions|#Edit Service Metadata].
{tip}
To simply deploy the FQP service with the default configuration, all you need to edit is the service's standard ServiceMetadata, by following [these instructions|#Edit Service Metadata].
{tip}
{tip}
h2. Edit Service Properties
** Default value: 10
** Type: Integer
** Type: Integer
** Controls the size of the thread pool used by the FQP service to perform DCQL and DCQL 2 queries and perform final query aggregation against target data services. Increasing this value may improve performance and responsiveness of the FQP service at the expense of potentially using more server resources.
* *initialResultLeaseInMinutes*
** Default value: 30
** Type: Integer
** Default value: 30
** Type: Integer
** Controls the initial time-to-live (lease time) of FederatedQueryResults resources. The value is specified in minutes. Unless the client explicitly requests a termination time for their results resource more distant in the future, after this time has elapsed, the resource will be destroyed. When the resource is destroyed, any remaining query execution tasks are terminated and any DCQL query results it may have contained are lost.
These properties may be configured at deployment time by the Introduce service deployment GUI, or by directly editing the service.properties file before deploying it.
## Supply the *PointOfContact*. This is the person responsible for maintaining the service.
A completed example:
A completed example:
{code:XML}<ns1:hostingResearchCenter>
<ns1:hostingResearchCenter>
<ns53:ResearchCenter displayName="Ohio State University" shortName="OSU" xmlns:ns53="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.common">
<ns53:Address country="US" locality="Columbus" postalCode="43210" stateProvince="OH" street1="3190 Graves Hall" street2="333 W. 10th Ave."/>
<ns53:Address country="US" locality="Columbus" postalCode="43210" stateProvince="OH" street1="3190 Graves Hall" street2="333 W. 10th Ave."/>
</ns1:hostingResearchCenter>
{code}
{code}
{info:title=Note}By default, FQP registers with and publishes its service metadata to the Index Service. The default Index Service is configured as the Index Service of the target grid you selected when you installed Dorian. You can find configuration details on registering and publishing to the Index Service, including disabling registration and changing which Index Service to register with, on the [Registration and Discovery] page.{info}
Once the FQP service has been deployed, start the service container and verify that no error messages are printed to the console.
h1. Starting FQP
----
----
{tip}
{tip}The Federated Query Processor service requires that the [caGrid Transfer Service|transfer14:Home] be deployed to the same Tomcat or JBoss container the FQP service will be deployed to. The Transfer service _must be deployed first_.
{tip}The Federated Query Processor is an Introduce-created service, so supports all the standard Introduce deployment processes, which are described in the [Introduce Administrator's Guide|introduce14:Administrators Guide##AdministratorsGuide-Deployment Undeployment].
{tip}
Once a container has been set up, the caGrid Trasnfer service must be deployed. Change to the caGrid transfer project directory (_$CAGRID_LOCATION/projects/transfer_) and execute the command "ant deployTomcat". Once this completes, the Federated Query Processor service may be deployed by changing to the _$CAGRID_LOCATION/projects/fqp_ directory and executing "ant deployTomcat".
The Federated Query Processor is an Introduce-created service, so supports all the standard Introduce deployment processes, which are described in the [Introduce Administrator's Guide|introduce14:Administrators Guide##AdministratorsGuide-Deployment Undeployment].
The Federated Query Processor is an Introduce-created service, so supports all the standard Introduce deployment processes, which are described in the [Introduce Administrator's Guide|introduce14:Administrators Guide##AdministratorsGuide-Deployment Undeployment].
For example, to deploy the service to Tomcat from the command line, type the following command from the *{_}FQP_HOME{_}* directory:
{terminal}> ant deployTomcat{terminal}
{terminal}> ant deployTomcat{terminal}Start up Tomcat so that your service is available. For Tomcat, run this command:
*Linux / Unix*
{terminal}> $CATALINA_HOME/bin/startup.sh{terminal}{*}Windows*
{terminal}> %CATALINA_HOME%\bin\startup.bat{terminal}
h1. Validating FQP
----
To validate the service has been deployed and is functioning correctly, use this simple client code to invoke a DCQL query and verify its results:
----
To validate the service has been deployed and is functioning correctly, use this simple client code to invoke a DCQL query and verify its results:
{code:java}
{code:java}import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cagrid.dcql.DCQLQuery;
import gov.nih.nci.cagrid.dcqlresult.DCQLQueryResultsCollection;
import gov.nih.nci.cagrid.dcqlresult.DCQLQueryResultsCollection;
}
}
}
{code}The simple main method takes two parameters. The first is the URL of the Federated Query Processor service, and the second is the filename of a DCQL query to execute. Try running the following query, which simply queries the caArray data service for Publications with an ID less than or equal to 10.
{code}
The simple main method takes two parameters. The first is the URL of the Federated Query Processor service, and the second is the filename of a DCQL query to execute. Try running the following query, which simply queries the caArray data service for Publications with an ID less than or equal to 10.
{code:xml}
{code:xml}
{code:xml}<ns1:DCQLQuery xmlns:ns1="http://caGrid.caBIG/1.0/gov.nih.nci.cagrid.dcql">
<ns1:TargetObject name="gov.nih.nci.caarray.domain.publication.Publication">
<ns1:Attribute name="id" predicate="LESS_THAN_EQUAL_TO" value="10"/>
<ns1:Attribute name="id" predicate="LESS_THAN_EQUAL_TO" value="10"/>
<ns1:targetServiceURL>http://array.nci.nih.gov:80/wsrf/services/cagrid/CaArraySvc</ns1:targetServiceURL>
</ns1:DCQLQuery>
</ns1:DCQLQuery>
{code}Executing this query should produce results similar to the following:
{code}
Executing this query should produce results similar to the following:
{code:xml}
{code:xml}
{code:xml}<ns1:DCQLQueryResultsCollection xmlns:ns1="http://caGrid.caBIG/1.0/gov.nih.nci.cagrid.dcqlresult">
<ns1:DCQLResult targetServiceURL="http://array.nci.nih.gov:80/wsrf/services/cagrid/CaArraySvc">
<ns2:CQLQueryResultCollection targetClassname="gov.nih.nci.caarray.domain.publication.Publication" xmlns:ns2="http://CQL.caBIG/1/gov.nih.nci.cagrid.CQLResultSet">
<ns2:CQLQueryResultCollection targetClassname="gov.nih.nci.caarray.domain.publication.Publication" xmlns:ns2="http://CQL.caBIG/1/gov.nih.nci.cagrid.CQLResultSet">





