Giter Club home page Giter Club logo

gemfiredocker's Introduction

Instructions to setup two node gemfire cluster to test function execution on partitioned data

Docker image Setup

To Run Gemfire Cluster

  • ./gradlew clean compileJava jar
  • ./startCluster.sh
  • To ssh into specific containers, run following commands
  • e.g. ssh into server2.
    • docker exec -it server2 /bin/bash
  • To execute function on the server, do following
    • Open the project in IntelliJ

    • Run com.demobank.gemfire.functions.DataSeeder

      This will setup a set of transactions for two different dates and accounts. This makes sure that data is available on both the servers.

    • Run com.demobank.gemfire.functions.RemoteTransactionSearchTest

      At this point the test just runs a function to get all the transactions for given accounts and dates.

To test network partition.

  • ssh into server2 and install and use tc to put network latency of 16 seconds.
  • docker exec -it server2 /bin/bash
  • bash-4.4# apk add iproute2
  • bash-4.4# tc qdisc add dev eth0 root netem delay 16000ms
  • bash-4.4# tc -s qdisc
  • Wait for some time. Monitor server2 and locator1 logs. Locator will not receive heart beat
  • and will remove server2 from view, server2 will shutdown but will have reconnect thread running.
  • Now remove network latency by following command
  • bash-4.4# tc qdisc del dev eth0 root netem
  • Observe network queue clearing up.
  • bash-4.4# tc -s qdisc
  • Observe server2 logs. It reconnects to cluster and gets all the new configuration from locator including deployed jars

TBD. To test sync between two separate clusters (for Multi DC setup)

gemfiredocker's People

Contributors

unmeshjoshi avatar poonamas avatar

Stargazers

Rahul Baphana avatar

Watchers

 avatar James Cloos avatar Srinivasan Ragothaman avatar

Forkers

prasanna

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.