This is a simple example showing how to create and execute a remote query.
GEODE_HOME
to the install directory of Apache GeodeFrom a command shell, set the current directory to the remotequery
build directory in your example workspace.
$ cd workspace/examples/build/cpp/remotequery
Run the startserver
script to start the Geode cluster with authentication and create a region.
For Windows cmd:
$ powershell.exe -File startserver.ps1
For Windows Powershell:
$ startserver.ps1
For Bash:
$ ./startserver.sh
Execute cpp-remotequery
, expect the following output:
Create orders Storing orders in the region Getting the orders from the region The following orders have a quantity greater than 30: OrderID: 2 Product Name: product y Quantity: 37 OrderID: 4 Product Name: product z Quantity: 102 OrderID: 6 Product Name: product z Quantity: 4
Run the stopserver
script to gracefully shutdown the Geode cluster.
For Windows cmd:
$ powershell.exe -File stopserver.ps1
For Windows Powershell:
$ stopserver.ps1
For Bash:
$ ./stopserver.sh