Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

multi-dc-basic #115

Merged
merged 6 commits into from
Jul 8, 2015
Merged

multi-dc-basic #115

merged 6 commits into from
Jul 8, 2015

Conversation

dmitrypekar
Copy link
Contributor

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.

LOGGER.info(taskIdMarker, "Building cassandra-rackdc.properties");

final Properties props = new Properties();
props.put("dc", "DC1");
props.put("rack", "RAC1");
RackDc rackDc = serverConfig.getRackDc();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this final.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@BenWhitehead
Copy link
Contributor

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!

@dmitrypekar
Copy link
Contributor Author

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.

@dmitrypekar dmitrypekar closed this Jul 8, 2015
@dmitrypekar dmitrypekar reopened this Jul 8, 2015
@BenWhitehead
Copy link
Contributor

Thanks @dmitrypekar.

BenWhitehead added a commit that referenced this pull request Jul 8, 2015
@BenWhitehead BenWhitehead merged commit 9912b5b into mesosphere-backup:master Jul 8, 2015
@keithchambers
Copy link
Contributor

+1 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants