Closed hvandenb closed 8 years ago
Found what the issue was, the heartbeat was being used as the id, error on the calling side.
Cool sorry i lost track of this, how are you using the library?
Cool sorry i lost track of this, how are you using the library?
I'm writing a distributed application that needs to discover other members. I did noticed that I fixed the issue on the calling side, e.g. when adding the seed members. Below is the code how I'm using it. However, I noticed that the heartbeat = 0 when the LocalGossipMember gets established. I'm tracking that down as well.
GossipSettings gossipSettings = new GossipSettings();
List<HostAndPort> seeds = buildEndpointList(settings.getSeeds(), ClusterConstants.DEFAULT_GOSSIP_PORT);
seedMembers = Lists.newArrayListWithCapacity(seeds.size());
seedMembers.clear();
for (HostAndPort hap : seeds) {
seedMembers.add(new RemoteGossipMember(hap.getHostText(),
hap.getPort(),
Node.generateId(hap.getHostText(), hap.getPort()),
settings.getHeartBeat()));
}
I have the following initialization code where I specify a timeout of 20. However, when I look at the logs the heartbeat always stays at 0 and it never continue to check if the other nodes come back.
Here is the log