GoConqr has a new look! Let us know what you think.

Notes

Deploy a new Datacenter

Preetam Shetty NoSQL Database English 1 page

Content of the notes (1)

Page 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.

Information

Description
NoSQL Database Note on Deploy a new Datacenter, created by Preetam Shetty on 07/07/2015.
Created by
Preetam Shetty
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?