The VXQuery cluster is made up of two parts: a single cluster controller (cc) and many node controllers (nc). The VXQuery CLI is used to parse the query and compile the job for the VXQuery cluster to process. The CLI passes the job to the cc which manages the job and returns the result to the CLI. The following diagram depicts the cluster layout.
The XML document are distributed between the ncs. The query's collection function will identify XML file path for the ncs.
$ export JAVA_HOME=/usr/java/latest
$ unzip apache-vxquery-X.Y-source-release.zip $ cd apache-vxquery-X.Y $ mvn package -DskipTests $ cd ..
Create a configuration xml file containing the information of the vxquery cluster.Here is an example of a VXQuery configuration file for a cluster with 1 master and 3 slaves.
<cluster xmlns="cluster"> <name>local</name> <username>joe</username> <master_node> <id>master</id> <client_ip>128.195.52.177</client_ip> <cluster_ip>192.168.100.0</cluster_ip> </master_node> <node> <id>nodeA</id> <cluster_ip>192.168.100.1</cluster_ip> </node> <node> <id>nodeB</id> <cluster_ip>192.168.100.2</cluster_ip> </node> <node> <id>nodeC</id> <cluster_ip>192.168.100.3</cluster_ip> </node> </cluster>
To deploy the cluster you need to execute this command in the vxquery installation directory
$python cluster_cli.py -c ../conf/cluster.xml -a deploy -d /apache-vxquery/vxquery-server
The command to start the cluster is
$python cluster_cli.py -c ../conf/cluster.xml -a start
The command to stop the cluster is
$python cluster_cli.py -c ../conf/cluster.xml -a stop
You can try these commands to check on the status of the processes
$ps -ef|grep ${USER}|grep java|grep 'Dapp.name=vxquerycc'
$ps -ef|grep ${USER}|grep java|grep 'Dapp.name=vxquerync'
$ps -ef|grep ${USER}|grep java|grep 'hyracks'