These are chat archives for atomix/atomix

30th
Oct 2018
coopci
@coopci
Oct 30 2018 04:02
Is there a really working raft example? I copied the conf from https://atomix.io/docs/latest/user-manual/introduction/architectures/ and Atomix atomix = new Atomix(conf); gives me this exception: Exception in thread "main" io.atomix.utils.config.ConfigurationException: Unknown properties present in configuration: cluster.multicastEnabled
at io.atomix.core.utils.config.PolymorphicConfigMapper.checkRemainingProperties(PolymorphicConfigMapper.java:100)
at io.atomix.utils.config.ConfigMapper.map(ConfigMapper.java:176)
at io.atomix.utils.config.ConfigMapper.getValue(ConfigMapper.java:322)
at io.atomix.utils.config.ConfigMapper.mapSetters(ConfigMapper.java:210)
at io.atomix.utils.config.ConfigMapper.map(ConfigMapper.java:171)
at io.atomix.utils.config.ConfigMapper.map(ConfigMapper.java:134)
at io.atomix.utils.config.ConfigMapper.loadFiles(ConfigMapper.java:92)
at io.atomix.core.Atomix.config(Atomix.java:314)
at io.atomix.core.Atomix.<init>(Atomix.java:479)
at io.atomix.core.Atomix.<init>(Atomix.java:467)
at io.atomix.core.Atomix.<init>(Atomix.java:463)
at atomix3.examples.raftcs.Raft.start(Raft.java:10)
at atomix3.examples.raftcs.Raft1.main(Raft1.java:10)
I'm using 3.0.6
Atomix atomix = new Atomix(conf);
coopci
@coopci
Oct 30 2018 05:16
Seems this works
# The cluster configuration defines how nodes discover and communicate with one another
cluster {
node {
    id: ${atomix.node.id}
    address: ${atomix.node.address}
  }
}

cluster.discovery {
  type: bootstrap
  nodes.1 {
    id: raft-1
    address: "localhost:8701"
  }
  nodes.2 {
    id: raft-2
    address: "localhost:8702"
  }
  nodes.3 {
    id: raft-3
    address: "localhost:8703"
  }
}

# The management group coordinates higher level partition groups and is required
# This node configures only a management group and no partition groups since it's
# used only for partition/primitive management
management-group {
  type: raft # Use the Raft consensus protocol for system management
  partitions: 1 # Use only a single partition
  members: [raft-1, raft-2, raft-3] # Raft requires a static membership list
  storage: {
      directory: ${atomix.raft.dir}
  }
}

# Configure a Raft partition group named "raft"
partition-groups.raft {
  type: raft # Use the Raft consensus protocol for this group
  partitions: 7 # Configure the group with 7 partitions
  members: [raft-1, raft-2, raft-3] # Raft requires a static membership list
  storage: {
      directory: ${atomix.raft.data.dir}
  }
}
Jordan Halterman
@kuujo
Oct 30 2018 08:44
@coopci interested in submitting a PR?
https://github.com/atomix/atomix.github.io
coopci
@coopci
Oct 30 2018 08:45
Sure, after I make the code neater.
Jordan Halterman
@kuujo
Oct 30 2018 08:45
The docs are outdated and not yet versioned
:+1:
We really need a complete config reference that’s accurate. Just need to sit down and do it one day