SnappyData is a high performance in-memory data platform for mixed workload applications. Built on Apache Spark, SnappyData provides a unified programming model for streaming, transactions, machine learning and SQL Analytics in a single cluster. SnappyData unifies real time data sources with external data sources that have a Spark connector. SnappyData is 100% compatible with Apache Spark and is Open Sourced with an Apache V2 license.
Start a basic cluster with one data node, one lead and one locator
$ docker run -itd --net=host --name snappydata snappydatainc/snappydata start all
For Mac OS
Run the following command to start SnappyData Cluster on Mac OS:
docker run -d --name=snappydata -p 4040:4040 -p 1527:1527 -p 1528:1528 snappydatainc/snappydata start all -J-Dgemfirexd.hostname-for-clients=<Machine_IP/Public_IP>
-J-Dgemfirexd.hostname-for-clients parameter sets the IP Address or Host name that this server listens on for client connections.
Note: It may take some time for this command to complete execution.
Check the Docker Process
$ docker ps -a
Check the Docker Logs
Run the following command to view the logs of the container process.
$ docker logs snappydata starting sshd service Starting sshd: [ OK ] Starting SnappyData Locator using peer discovery on: localhost Starting DRDA server for SnappyData at address localhost/127.0.0.1 Logs generated in /opt/snappydata/work/localhost-locator-1/snappylocator.log SnappyData Locator pid: 110 status: running Starting SnappyData Server using locators for peer discovery: localhost:10334 Starting DRDA server for SnappyData at address localhost/127.0.0.1 Logs generated in /opt/snappydata/work/localhost-server-1/snappyserver.log SnappyData Server pid: 266 status: running Distributed system now has 2 members. Other members: localhost(110:locator)<v0>:63369 Starting SnappyData Leader using locators for peer discovery: localhost:10334 Logs generated in /opt/snappydata/work/localhost-lead-1/snappyleader.log SnappyData Leader pid: 440 status: running Distributed system now has 3 members. Other members: 192.168.1.130(266:datastore)<v1>:47290, localhost(110:locator)<v0>:63369
The query results display Distributed system now has 3 members.
Connect SnappyData with the Command Line Client
$ docker exec -it snappydata ./bin/snappy-shell
Connect Client on port “1527”
$ snappy> connect client 'localhost:1527';
snappy> show connections; CONNECTION0* - jdbc:gemfirexd://localhost/ * = current connection
For more details about SnappyData docker image see Snappy Cloud Tools