Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
64942fca
Commit
64942fca
authored
Feb 27, 2013
by
antirez
Browse files
redis-trib help.
parent
d45d1841
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
64942fca
...
@@ -599,6 +599,11 @@ class RedisTrib
...
@@ -599,6 +599,11 @@ class RedisTrib
puts
"Send CLUSTER MEET to node
#{
new
}
to make it join the cluster."
puts
"Send CLUSTER MEET to node
#{
new
}
to make it join the cluster."
new
.
r
.
cluster
(
"meet"
,
first
[
:host
],
first
[
:port
])
new
.
r
.
cluster
(
"meet"
,
first
[
:host
],
first
[
:port
])
end
end
def
help_cluster_cmd
show_help
exit
0
end
end
end
COMMANDS
=
{
COMMANDS
=
{
...
@@ -606,17 +611,22 @@ COMMANDS={
...
@@ -606,17 +611,22 @@ COMMANDS={
"check"
=>
[
"check_cluster_cmd"
,
2
,
"host:port"
],
"check"
=>
[
"check_cluster_cmd"
,
2
,
"host:port"
],
"fix"
=>
[
"fix_cluster_cmd"
,
2
,
"host:port"
],
"fix"
=>
[
"fix_cluster_cmd"
,
2
,
"host:port"
],
"reshard"
=>
[
"reshard_cluster_cmd"
,
2
,
"host:port"
],
"reshard"
=>
[
"reshard_cluster_cmd"
,
2
,
"host:port"
],
"addnode"
=>
[
"addnode_cluster_cmd"
,
3
,
"new_host:new_port existing_host:existing_port"
]
"addnode"
=>
[
"addnode_cluster_cmd"
,
3
,
"new_host:new_port existing_host:existing_port"
],
"help"
=>
[
"help_cluster_cmd"
,
1
,
"(show this help)"
]
}
}
# Sanity check
def
show_help
if
ARGV
.
length
==
0
puts
"Usage: redis-trib <command> <arguments ...>"
puts
"Usage: redis-trib <command> <arguments ...>"
puts
puts
COMMANDS
.
each
{
|
k
,
v
|
COMMANDS
.
each
{
|
k
,
v
|
puts
"
#{
k
.
ljust
(
10
)
}
#{
v
[
2
]
}
"
puts
"
#{
k
.
ljust
(
10
)
}
#{
v
[
2
]
}
"
}
}
puts
puts
end
# Sanity check
if
ARGV
.
length
==
0
show_help
exit
1
exit
1
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment