geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark...@apache.org
Subject [05/11] incubator-geode git commit: GEODE-1531: Improve README.md for replicated example
Date Fri, 08 Jul 2016 19:47:36 GMT
GEODE-1531: Improve README.md for replicated example

- Improved the appearance of the markdown

- Added commands for how to kill a single server

- Added last step to run scripts/stopAll.sh so the system is
  shut down when the example ends, not leaving a locator and
  a server running

- Improved the prose describing what the example does


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b7c59650
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b7c59650
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b7c59650

Branch: refs/heads/develop
Commit: b7c5965043ad187aa31f2ed963fb56b4c62a5df9
Parents: bd75c73
Author: Karen Miller <kmiller@pivotal.io>
Authored: Wed Jun 15 14:34:37 2016 -0700
Committer: William Markito <wmarkito@pivotal.io>
Committed: Fri Jul 8 12:42:39 2016 -0700

----------------------------------------------------------------------
 geode-examples/replicated/README.md | 74 ++++++++++++++++++--------------
 1 file changed, 41 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b7c59650/geode-examples/replicated/README.md
----------------------------------------------------------------------
diff --git a/geode-examples/replicated/README.md b/geode-examples/replicated/README.md
index d6c0936..99ae753 100644
--- a/geode-examples/replicated/README.md
+++ b/geode-examples/replicated/README.md
@@ -1,39 +1,47 @@
 # Geode replicated region example
 
-This is one of the most basic examples for Geode. 
-It created a replicated region and insert a couple of entries and then print the number of
entries in the server.
+This is one of the most basic examples. 
+Two servers host a replicated region.
+The producer puts 50 entries into the replicated region. The consumer prints the number of
entries in the region.
 
 ## Steps
-1. Start servers
-```
-$ scripts/startAll.sh
-```
-1. Run producer
-```
-$ gradle run -Pmain=Producer
-...
-... 
-INFO: Done. Inserted 50 entries.
-```
-1. Run consumer
-```
-$ gradle run -Pmain=Consumer
-...
-...
-INFO: Done. 50 entries available on the server(s).
-```
-1. Kill a node
-```
-$ ???
-```
-1. Run the consumer a 2nd time
-``` 
-$ gradle run -Pmain=Consumer
-...
-...
-INFO: Done. 50 entries available on the server(s).
-```
-
-This example is a simple demonstration on basic APIs of Geode as well how to write tests
using mocks for Geode applications.
+1. From the ```geode-examples/replicated``` directory, start the locator and two servers:
+
+        $ scripts/startAll.sh
+
+2. Run the producer:
+
+        $ gradle run -Pmain=Producer
+        ...
+        ... 
+        INFO: Done. Inserted 50 entries.
+
+3. Run the consumer:
+
+        $ gradle run -Pmain=Consumer
+        ...
+        ...
+        INFO: Done. 50 entries available on the server(s).
+
+4. Kill one of the servers:
+
+        $ gfsh
+        ...
+        gfsh>connect
+        gfsh>stop server --name=server1
+        gfsh>quit
+
+5. Run the consumer a second time, and notice that all the entries are still available due
to replication: 
+
+        $ gradle run -Pmain=Consumer
+        ...
+        ...
+        INFO: Done. 50 entries available on the server(s).
+
+6. Shutdown the system:
+
+        $ scripts/stopAll.sh
+
+This example is a simple demonstration on basic APIs of Geode, as well how to write tests
using mocks for Geode applications.
 
 TODO: assume jUnit4


Mime
View raw message