Getting started tutorial lesson 3.2: Running the getting
started sample client application
Use the following steps to run a client
to interact with the data grid. The catalog
server, container server, and client all run on a single server in
this example.
Open a terminal
session or command-line window to run client commands.
The runclient.sh|bat script
runs the simple create, retrieve, update, and delete (CRUD) client
and starts the specified operation. The runclient.sh|bat script
is run with the following parameters:
./runclient.sh commandvalue1value2
runclient.bat commandvalue1value2
For command, use one of the following options:
Specify as i to insert value2 into
data grid with key value1
Specify as u to update object that is keyed
by value1 to value2
Specify as d to delete object that is keyed
by value1
Specify as g to retrieve and display object
that is keyed by value1
Add data to the data grid.
Important: If your system is using double byte character sets
(DBCS), you might see garbled or corrupted text when you insert data
into the data grid with the runClient script. This
text can display in the output or in the cache. To work around this
issue, update the Java call in the runClient script
to include the -Xargencoding argument, and then
specify the DBCS as a Unicode character set. For example, use the
command: \u runClient i key\u2e81 Hello\2e84World
./runclient.sh i key1 helloWorld
runclient.bat i key1 helloWorld
Search and display the value:
./runclient.sh g key1
runclient.bat g key1
Update the value:
./runclient.sh u key1 goodbyeWorld
runclient.bat u key1 goodbyeWorld
Delete the value:
./runclient.sh d key1
runclient.bat d key1
Lesson checkpoint
Lessons learned
In this lesson, you
learned:
How to run the sample client application
to insert, get, update, and delete data from the data grid.