Last active
December 17, 2015 11:49
-
-
Save sscarduzio/5604879 to your computer and use it in GitHub Desktop.
vert.x cluster shared data not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vertx run test.js -cluster | |
Starting clustering... | |
No cluster-host specified so using address 192.168.1.11 | |
1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vertx run test.js -cluster | |
Starting clustering... | |
No cluster-host specified so using address 192.168.1.10 | |
Prefer IPv4 stack is true. | |
Picked Address[192.168.1.10]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true | |
[192.168.1.10]:5701 [dev] Hazelcast Community Edition 2.5.1 (20130427) starting at Address[192.168.1.10]:5701 | |
[192.168.1.10]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com | |
[192.168.1.10]:5701 [dev] Address[192.168.1.10]:5701 is STARTING | |
[192.168.1.10]:5701 [dev] Connecting to master node: Address[192.168.1.11]:5701 | |
[192.168.1.10]:5701 [dev] 53264 accepted socket connection from /192.168.1.11:5701 | |
[192.168.1.10]:5701 [dev] | |
Members [2] { | |
Member [192.168.1.11]:5701 | |
Member [192.168.1.10]:5701 this | |
} | |
[192.168.1.10]:5701 [dev] Address[192.168.1.10]:5701 is STARTED | |
1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Both nodes output is "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hared_data = require('shared_data'); | |
console = require('console'); | |
map = shared_data.getMap('testmap'); | |
tstamp = new Date(); | |
map.put(tstamp.getTime(), 'hello'); | |
console.log(map.size()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment