You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ma...@apache.org on 2016/06/20 16:00:21 UTC

[1/5] incubator-geode git commit: GEODE-1531: Improve README.md for replicated example

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-33 4b6200d0f -> d67bf627c


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/d2ec280d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d2ec280d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d2ec280d

Branch: refs/heads/feature/GEODE-33
Commit: d2ec280df6d3feacccdb5dba4a114ef086a71717
Parents: 4b6200d
Author: Karen Miller <km...@pivotal.io>
Authored: Wed Jun 15 14:34:37 2016 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Wed Jun 15 14:34:37 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/d2ec280d/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


[3/5] incubator-geode git commit: Merge #158 into feature/GEODE-33 GEODE-1530: geode-examples setEnv.sh script needs to export path

Posted by ma...@apache.org.
Merge #158 into feature/GEODE-33
GEODE-1530: geode-examples setEnv.sh script needs to export path

Without an export of the path, using the GEODE_HOME env variable,
the scripts/startAll.sh script will pick up the first gfsh in the
path that it finds.

Also updated the scripts/stopAll.sh script to run the setEnv.sh
script, so that stopAll.sh uses the correct gfsh.


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

Branch: refs/heads/feature/GEODE-33
Commit: e24a47110fb504cf4b2980305ab492e23d70a361
Parents: 4b6200d
Author: Karen Miller <km...@pivotal.io>
Authored: Wed Jun 15 11:07:03 2016 -0700
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Jun 20 08:59:47 2016 -0700

----------------------------------------------------------------------
 geode-examples/replicated/scripts/setEnv.sh  | 5 ++++-
 geode-examples/replicated/scripts/stopAll.sh | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e24a4711/geode-examples/replicated/scripts/setEnv.sh
----------------------------------------------------------------------
diff --git a/geode-examples/replicated/scripts/setEnv.sh b/geode-examples/replicated/scripts/setEnv.sh
index 77784ff..3cc1549 100755
--- a/geode-examples/replicated/scripts/setEnv.sh
+++ b/geode-examples/replicated/scripts/setEnv.sh
@@ -21,4 +21,7 @@
 
 ## check if gfsh script is accessible and print version
 : ${GEODE_HOME/bin/gfsh?"gfsh doesn't seem to be available. Please check $GEODE_HOME"}
-echo "Geode version: `$GEODE_HOME/bin/gfsh version`"
\ No newline at end of file
+echo "Geode version: `$GEODE_HOME/bin/gfsh version`"
+
+## prefer GEODE_HOME for finding gfsh
+export PATH=$GEODE_HOME/bin:$PATH

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e24a4711/geode-examples/replicated/scripts/stopAll.sh
----------------------------------------------------------------------
diff --git a/geode-examples/replicated/scripts/stopAll.sh b/geode-examples/replicated/scripts/stopAll.sh
index 4d792de..d2fb2be 100755
--- a/geode-examples/replicated/scripts/stopAll.sh
+++ b/geode-examples/replicated/scripts/stopAll.sh
@@ -19,4 +19,6 @@ set -e
 
 cd `dirname $0`
 
+. ./setEnv.sh
+
 gfsh -e "connect" -e "shutdown --include-locators=true"


[4/5] incubator-geode git commit: Merge #159 into feature/GEODE-33

Posted by ma...@apache.org.
Merge #159 into feature/GEODE-33


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

Branch: refs/heads/feature/GEODE-33
Commit: f371995ebc0ed075342a1ae41ed8dde8189c97c3
Parents: e24a471 d2ec280
Author: William Markito <wm...@pivotal.io>
Authored: Mon Jun 20 08:56:07 2016 -0700
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Jun 20 08:59:47 2016 -0700

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



[5/5] incubator-geode git commit: Merge #160 into feature/GEODE-33

Posted by ma...@apache.org.
Merge #160 into feature/GEODE-33


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

Branch: refs/heads/feature/GEODE-33
Commit: d67bf627c096e025cb0f7db7af49a6cfbc30bc06
Parents: f371995 21d30ab
Author: William Markito <wm...@pivotal.io>
Authored: Mon Jun 20 08:57:16 2016 -0700
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Jun 20 08:59:47 2016 -0700

----------------------------------------------------------------------
 geode-examples/README.md | 86 ++++++++++++++++++++++---------------------
 1 file changed, 44 insertions(+), 42 deletions(-)
----------------------------------------------------------------------



[2/5] incubator-geode git commit: GEODE-1525: Examples README.md should set env variable GEODE-1523: Improve examples README.md markdown

Posted by ma...@apache.org.
GEODE-1525: Examples README.md should set env variable
GEODE-1523: Improve examples README.md markdown

This PR fixes addresses both GEODE-1525 and GEODE-1523, as they
both change the contents of the same file: geode-examples/README.md.

- Each example will likely use a scripts/setEnv.sh script to set
  the path to gfsh. The script depends on a GEODE_HOME environment
  variable, so this top level of instructions for setting up
  the examples now tells the user to set a GEODE_HOME env variable
  directly after the installation.

- Implement a more strict markdown that displays correctly for a
  wide variety of markdown implementations.

- Put in links for the 3 references.

- Improve the prose.


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

Branch: refs/heads/feature/GEODE-33
Commit: 21d30ab92d2a2146207186a690eb5a36d42e7059
Parents: 4b6200d
Author: Karen Miller <km...@pivotal.io>
Authored: Wed Jun 15 15:30:03 2016 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Wed Jun 15 15:30:03 2016 -0700

----------------------------------------------------------------------
 geode-examples/README.md | 86 ++++++++++++++++++++++---------------------
 1 file changed, 44 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21d30ab9/geode-examples/README.md
----------------------------------------------------------------------
diff --git a/geode-examples/README.md b/geode-examples/README.md
index 25a0dfc..edba63a 100644
--- a/geode-examples/README.md
+++ b/geode-examples/README.md
@@ -1,68 +1,70 @@
 # Apache Geode examples
 
-This is the home of Apache Geode examples that are bundled with the project. Contributions<sup>[2]</sup> and corrections are as usual welcome and if you have any suggestions come talk to us at [dev@geode.incubator.apache.org](mailto:dev@geode.incubator.apache.org) or just submit a [pull request](https://github.com/apache/incubator-geode/pull/new/develop).
+This is the home of Apache Geode examples that are bundled with the project. Contributions<sup>[2]</sup> and corrections are welcome. Please talk to us about your suggestions at [dev@geode.incubator.apache.org](mailto:dev@geode.incubator.apache.org) or submit a [pull request](https://github.com/apache/incubator-geode/pull/new/develop).
 
 ## Example requirements
 
 All examples:
- * Needs to be testable. (unit tests, integration tests or what's applicable) - Tests will ran through project CI.
- * Should be `Gradle` projects or part of existing ones. <sup>There could be a few exceptions here, but community should have consensus to accept</sup>
- * Have to follow code format & style from Apache Geode <sup>[1]</sup> guidelines.
- * Should contain a `README.md` file with step-by-step instruction on how to setup and run. (Diagrams give extra credits).
- * Donations need to be licensed through ASL 2.0 and contributors need to file an ICLA<sup>[3]</sup>
+
+*  Need to be testable. Use unit tests, integration tests or whatever is applicable. Tests will run through the project's CI.
+*  Should be `Gradle` projects or part of existing ones. There may be exceptions here, but the community should have a consensus to accept.
+*  Have to follow code format & style from Apache Geode <sup>[1]</sup> guidelines.
+*  Should contain a `README.md` file with step-by-step instruction on how to set up and run the example. *Diagrams give you extra credit.*
+*  Donations need to be licensed through ASL 2.0 and contributors need to file an ICLA<sup>[3]</sup>.
 
 ## Structure
 
-### Quick start & Installation
+### Installation and a Tutorial for Beginners
 
-  * [How to Install](http://geode.docs.pivotal.io/docs/getting_started/installation/install_standalone.html)
-  * [Apache Geode in 15 minutes or Less](http://geode.docs.pivotal.io/docs/getting_started/15_minute_quickstart_gfsh.html)
+*  [How to Install](http://geode.docs.pivotal.io/docs/getting_started/installation/install_standalone.html)
+*  Set a `GEODE_HOME` environment variable to point to the `bin` directory of the installation. For those that have built from source, this will be the `geode-assembly/build/install/apache-geode` directory.
+*  If desired run the tutorial: [Apache Geode in 15 minutes or Less](http://geode.docs.pivotal.io/docs/getting_started/15_minute_quickstart_gfsh.html)
 
 ### Basics
 
-  * [Replicated Region]()
-  * Partitioned Region
-  * Persistence
-  * OQL (Querying)
+*  [Replicated Region]()
+*  Partitioned Region
+*  Persistence
+*  OQL (Querying)
 
 ### Intermediate
 
-  * PDX & Serialization
-  * Functions
-  * CacheLoader & CacheWriter
-  * Listeners
-  * Async Event Queues
-  * Continuous Querying
-  * Transactions
-  * Eviction
-  * Expiration
-  * Overflow
-  * Security
-  * Off-heap
+*  PDX & Serialization
+*  Functions
+*  CacheLoader & CacheWriter
+*  Listeners
+*  Async Event Queues
+*  Continuous Querying
+*  Transactions
+*  Eviction
+*  Expiration
+*  Overflow
+*  Security
+*  Off-heap
 
 ### Advanced
 
-  * WAN Gateway
-  * Durable subscriptions
-  * Delta propagation
-  * Network partition detection
-  * D-lock
-  * Compression
-  * Resource manager
-  * PDX Advanced
+*  WAN Gateway
+*  Durable subscriptions
+*  Delta propagation
+*  Network partition detection
+*  D-lock
+*  Compression
+*  Resource manager
+*  PDX Advanced
 
 ### Use cases & integrations
 
- This section should have self contained little projects that illustrate a use case or integration with some other projects.
+This section has self-contained little projects that illustrate a use case or an integration with other projects.
 
-  * SpringBoot Application
-  * HTTP Session replication
-  * Redis
-  * Memcached
-  * Spark Connector
+*  SpringBoot Application
+*  HTTP Session replication
+*  Redis
+*  Memcached
+*  Spark Connector
 
 ## References
 
-- [1] - https://cwiki.apache.org/confluence/display/GEODE/Criteria+for+Code+Submissions
-- [2] - https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute
-- [3] - http://www.apache.org/licenses/#clas
+- [1]  [https://cwiki.apache.org/confluence/display/GEODE/Criteria+for+Code+Submissions](https://cwiki.apache.org/confluence/display/GEODE/Criteria+for+Code+Submissions)
+- [2]  [https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute](https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute)
+- [3]  [http://www.apache.org/licenses/#clas](http://www.apache.org/licenses/#clas)