-
Notifications
You must be signed in to change notification settings - Fork 68
multi-dc-basic #115
multi-dc-basic #115
Conversation
LOGGER.info(taskIdMarker, "Building cassandra-rackdc.properties"); | ||
|
||
final Properties props = new Properties(); | ||
props.put("dc", "DC1"); | ||
props.put("rack", "RAC1"); | ||
RackDc rackDc = serverConfig.getRackDc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this final
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -67,6 +67,9 @@ message CassandraFrameworkConfiguration { | |||
* target number of seed nodes. | |||
*/ | |||
optional int32 targetNumberOfSeeds = 9; | |||
|
|||
/** Default rack/dc info */ | |||
optional RackDc defaultRackDc = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this property into the CassandraConfigRole
message so that it is part of defaultConfigRole
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this has been moved, please also update io.mesosphere.mesos.frameworks.cassandra.scheduler.util.JaxRsUtils#writeConfigRole to write the default rack and dc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
One small change. Also, please add some unit/integration tests to make sure the default works and that it is properly overridden when a node as a specific value. Thanks! |
Added UT for PersistentCassandraFrameworkConfiguration.getDefaultRackDc. Regarding node overriding of rackDc - I think, it doesn't need a test, because actually we do not have "overriding" mechanism. We just copy those attribute initially and after that CassandraNode maintains its own rackDc. |
Thanks @dmitrypekar. |
+1 ! |
Hey,
I've added basic part of multi dc support, that we have negotiated recently.
Now rack & dc could be specified per node using REST API.
After node restart the executor uses those info to create 'cassandra-rackdc.properties' file.
Please review & merge.