Tag Archives: Admin Tool

Voldemort Admin Tool

original:https://github.com/voldemort/voldemort/wiki/Voldemort-Admin-tool

The Voldemort admin tool allows you to run administrative commands such as streaming and migrating partitions , changing metadata e.g., adding new machines to the cluster or adding new stores.

COMMANDS SUPPORTED

CHANGE METADATA

1) Get metadata from all nodes
./bin/voldemort-admin-tool.sh —get-metadata [metadata-key] —url [url]
2) Get metadata from a particular node
./bin/voldemort-admin-tool.sh —get-metadata [metadata-key] —url [url] —node [node-id]
3) Get metadata from a particular node and store to a directory
./bin/voldemort-admin-tool.sh —get-metadata [metadata-key] —url [url] —node [node-id] —outdir [directory]
4) Set metadata on all nodes
./bin/voldemort-admin-tool.sh —set-metadata [metadata-key] —set-metadata-value [metadata-value] —url [url]
5) Set metadata for a particular node
./bin/voldemort-admin-tool.sh —set-metadata [metadata-key] —set-metadata-value [metadata-value] —url [url] —node [node-id]
6) Check if metadata is same on all nodes
./bin/voldemort-admin-tool.sh —check-metadata [metadata-key] —url [url]
7) Clear rebalancing metadata ( server.state & rebalancing.steal.info.key ) on all node
./bin/voldemort-admin-tool.sh —clear-rebalancing-metadata —url [url]
8) Clear rebalancing metadata ( server.state & rebalancing.steal.info.key ) on a particular node
./bin/voldemort-admin-tool.sh —clear-rebalancing-metadata —url [url] —node [node-id]

ADD / DELETE STORES

1) Add store(s) on all nodes
./bin/voldemort-admin-tool.sh —add-stores [xml file with store(s) to add] —url [url]
2) Add store(s) on a single node
./bin/voldemort-admin-tool.sh —add-stores [xml file with store(s) to add] —url [url] —node [node-id]
3) Delete store on all nodes
./bin/voldemort-admin-tool.sh —delete-store [store-name] —url [url]
4) Delete store on a single node
./bin/voldemort-admin-tool.sh —delete-store [store-name] —url [url] —node [node-id]
5) Delete the contents of the store on all nodes
./bin/voldemort-admin-tool.sh —truncate [store-name] —url [url]
6) Delete the contents of the store on a single node
./bin/voldemort-admin-tool.sh —truncate [store-name] —url [url] —node [node-id]
7) Delete the contents of some partitions on a single node
./bin/voldemort-admin-tool.sh —delete-partitions [comma-separated list of partitions] —url [url] —node [node-id]
8) Delete the contents of some partitions ( of some stores ) on a single node
./bin/voldemort-admin-tool.sh —delete-partitions [comma-separated list of partitions] —url [url] —node [node-id] —stores [comma-separated list of store names]

STREAM DATA

1) Fetch keys from a set of partitions [ all stores ] on a node ( binary dump )
./bin/voldemort-admin-tool.sh —fetch-keys [comma-separated list of partitions with no space] —url [url] —node [node-id]
2) Fetch keys from a set of partitions [ all stores ] on a node ( ascii enabled )
./bin/voldemort-admin-tool.sh —fetch-keys [comma-separated list of partitions with no space] —url [url] —node [node-id] —ascii
3) Fetch entries from a set of partitions [ all stores ] on a node ( binary dump )
./bin/voldemort-admin-tool.sh —fetch-entries [comma-separated list of partitions with no space] —url [url] —node [node-id]
4) Fetch entries from a set of partitions [ all stores ] on a node ( ascii enabled )
./bin/voldemort-admin-tool.sh —fetch-entries [comma-separated list of partitions with no space] —url [url] —node [node-id] —ascii
5) Fetch entries from a set of partitions [ all stores ] on a node ( ascii enabled ) and output to a folder
./bin/voldemort-admin-tool.sh —fetch-entries [comma-separated list of partitions with no space] —url [url] —node [node-id] —ascii —outdir [directory]
6) Fetch entries from a set of partitions and some stores on a node ( ascii enabled )
./bin/voldemort-admin-tool.sh —fetch-entries [comma-separated list of partitions with no space] —url [url] —node [node-id] —ascii —stores [comma-separated list of store names]
7) Fetch all keys on a particular node
./bin/voldemort-admin-tool.sh —fetch-keys —url [url] —node [node-id]
8) Fetch all entries on a particular node
./bin/voldemort-admin-tool.sh —fetch-entries —url [url] —node [node-id]
9) Update entries for a set of stores using the output from a binary dump fetch entries
./bin/voldemort-admin-tool.sh —update-entries [folder path from output of —fetch-entries —outdir] —url [url] —node [node-id] —stores [comma-separated list of store names]

READ-ONLY OPERATIONS

1) Retrieve metadata information of read-only data for a particular node and all stores
./bin/voldemort-admin-tool.sh —ro-metadata [current | max | storage-format] —url [url] —node [node-id]
2) Retrieve metadata information of read-only data for all nodes and a set of store
./bin/voldemort-admin-tool.sh —ro-metadata [current | max | storage-format] —url [url] —stores [comma-separated list of store names]

OTHERS

1) Restore a particular node completely from its replicas
./bin/voldemort-admin-tool.sh —restore —url [url] —node [node-id]
2) Restore a particular node completely from its replicas ( with increased parallelism – 10 )
./bin/voldemort-admin-tool.sh —restore 10 —url [url] —node [node-id]
3) Generates the key distribution on a per node basis [ both store wise and overall ]
./bin/voldemort-admin-tool.sh —key-distribution —url [url]