tree: d733e53f9540c2cd72eb7892514302a304b3d34f [path history] [tgz]
  1. .gitignore
  2. README.md
  3. scripts/
  4. src/
replicated/README.md

Geode replicated region example

This is a simple example that demonstrates putting values into a replicated region, checking the size, and retrieving the values.

This example assumes you have installed Java and Geode.

Steps

  1. From the geode-examples/replicated directory, build the example and run unit tests

     $ ../gradlew build
    
  2. Next start the locator and two servers

     $ gfsh run --file=scripts/start.gfsh
    
  3. Run the example to create entries in the region

     $ ../gradlew run
    
  4. Kill one of the servers

     $ gfsh -e "connect --locator=127.0.0.1[10334]" -e "stop server --name=server1"
    
  5. Run a gfsh query, and notice that all the entries are still available due to replication

     $ gfsh -e "connect --locator=127.0.0.1[10334]" -e "query --query='select e.key from /example-region.entries e'"
    
  6. Shut down the system:

     $ gfsh run --file=scripts/stop.gfsh