Created
May 5, 2015 09:25
-
-
Save iliapolo/3337299ce89db0f95087 to your computer and use it in GitHub Desktop.
Rebalancing an elastic space
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
Admin admin = new AdminFactory().addGroup("elip-xap").createAdmin(); | |
GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne(); | |
ElasticSpaceDeployment deployment = new ElasticSpaceDeployment("mySpace"); | |
// deploy a 3,1 cluster. | |
// this should be default use just 2 containers | |
deployment.memoryCapacityPerContainer(768, MemoryUnit.MEGABYTES); | |
deployment.maxMemoryCapacity(4608, MemoryUnit.MEGABYTES); | |
gsm.deploy(deployment); | |
// scale to 3 containers (3 machines - each with 2GB) | |
admin.getProcessingUnits().waitFor("mySpace").scale(new ManualCapacityScaleConfigurer(). | |
memoryCapacity(2304, MemoryUnit.MEGABYTES).create()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment