Notizen
Deploy a new Datacenter
Inhalt der Notizen (1)
Seite 1
The CLI command used to deploy a datacenter:
plan deploy-zone -name -rf -type {primary|secosnday}
This command deploys a new zone to the store. Creates a primary zone if -type is not specified.
DeployDatacenterPlan:
Parameters passed: Topology topology, String datacenterName, int rf, DatacenterType datacenterType
Step 1: Validate the replicationFactor. Make sure 0
Step 2: Check if the datacenter with the name already exists. If yes check if rf and type match. If they don't match, throw an exception.
If the datacenter does not exist, create one using the following command:
Datacenter datacenter = Datacenter.newInstance(datacenterName, rf, datacenterType);
Add this new datacenter to the topology (if this is a new datacenter).
Step 3: Obtain the datacenterId from the datacenter (created or existing datacenter).
Obtain the current parameter using: DatacenterParams dcParams = parameters.get(datacenterId)
If the datacenter was created, construct new params: DatacenterParams dcParams = new DatacenterParams(datacenterId, datacenterName)
After the task (DeployDatacenter.java) is completed, check if the topology has changed using topoSequenceNumber.
Save the topology and the params persistently into the admin database.
Topology packaged inside Realized topology and saved. DeploymentInfo is also packaged along in the RealizedTopology. DeploymentInfo contains the plan name, plan Id, Candidate Name and Plan start time.
P.S. The task DeployDatacenter.java task does nothing. It just returns State.SUCCEEDED.
Informationen
- Beschreibung
- NoSQL Database Notiz am Deploy a new Datacenter, erstellt von Preetam Shetty am 07/07/2015.
- Erstellt von
- Preetam Shetty
- Aufrufe
- 2
- Tags
- Bewertung