-
Notifications
You must be signed in to change notification settings - Fork 275
Basic Operations
ohze.net edited this page Jul 24, 2017
·
5 revisions
These are the most common operational task that need to be performed on Ambry.
java com.github.ambry.clustermap.PartitionManager --hardwareLayoutPath config/HardwareLayout.json --partitionLayoutPath config/PartitionLayout.json --operationType AddPartition --numberOfPartitionsToAdd 100 --numberOfReplicasPerDatacenter 3 --replicaCapacityInBytes 107374182400
java com.github.ambry.clustermap.PartitionManager --hardwareLayoutPath config/HardwareLayout.json --partitionLayoutPath config/PartitionLayout.json --operationType AddReplicas --partitionIdToAddReplicasTo 2 --numberOfReplicasPerDatacenter 3 --replicaCapacityInBytes 107374182400
To add new nodes to the cluster,
- Add new nodes to the hardware layout. This is a very simple edit of the hardware layout file to add more nodes.
- Use the AddPartition command and specify the number of partitions to be added to the new nodes.
This is similar to adding nodes with the only difference that we would need to add the entire datacenter to the hardware layout. Once the hardwarelayout is updated, one can simply add more partitions by using the addpartition command.
This would require manually editing the partition layout file and specifying READ_ONLY against all the partitions that needs to be made read only.
This would require the following steps -
- Add the new replicas using the AddReplica command
- Push the config to the cluster and start the servers
- Let the replicas catch up
- Remove the old replicas manually from the partition layout file
- Push the file to the cluster and manually delete the files for the replica from disk
java com.github.ambry.tools.admin.DumpData --hardwareLayoutPath config/HardwareLayout.json --partitionLayoutPath config/PartitionLayout.json --typeOfOperation DumpLog --logFileToDump partition1/log1 --outFile output/log1Dump
java com.github.ambry.tools.admin.DumData --hardwareLayoutPath config/HardwareLayout.json --partitionLayoutPath config/PartitionLayout.json --operationType DumpIndex --replicaRootDirectoy partition1/
java com.github.ambry.tools.admin.DumpData --hardwareLayoutPath config/HardwareLayout.json --partitionLayoutPath config/PartitionLayout.json --operationType DumpReplicatoken --fileToRead partition1/findToken
- Getting Started
- API
- Configuration
- Design
- Implementation
- Operations
- FAQ
- Project
- Future Work