gizzmo 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/gizzmo.gemspec +2 -2
- data/lib/gizzard/thrift.rb +21 -21
- data/lib/gizzmo.rb +5 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/gizzmo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gizzmo}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kyle Maxwell"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-18}
|
13
13
|
s.default_executable = %q{gizzmo}
|
14
14
|
s.description = %q{Gizzmo is a command-line client for managing gizzard clusters.}
|
15
15
|
s.email = %q{kmaxwell@twitter.com}
|
data/lib/gizzard/thrift.rb
CHANGED
@@ -126,37 +126,37 @@ module Gizzard
|
|
126
126
|
|
127
127
|
class ShardManager < GizzmoService
|
128
128
|
thrift_method :create_shard, void, field(:shard, struct(ShardInfo), 1), :throws => exception(ShardException)
|
129
|
-
thrift_method :delete_shard, void, field(:id, struct(ShardId), 1)
|
130
|
-
thrift_method :get_shard, struct(ShardInfo), field(:id, struct(ShardId), 1)
|
129
|
+
thrift_method :delete_shard, void, field(:id, struct(ShardId), 1), :throws => exception(ShardException)
|
130
|
+
thrift_method :get_shard, struct(ShardInfo), field(:id, struct(ShardId), 1), :throws => exception(ShardException)
|
131
131
|
|
132
|
-
thrift_method :add_link, void, field(:up_id, struct(ShardId), 1), field(:down_id, struct(ShardId), 2), field(:weight, i32, 3)
|
133
|
-
thrift_method :remove_link, void, field(:up_id, struct(ShardId), 1), field(:down_id, struct(ShardId), 2)
|
132
|
+
thrift_method :add_link, void, field(:up_id, struct(ShardId), 1), field(:down_id, struct(ShardId), 2), field(:weight, i32, 3), :throws => exception(ShardException)
|
133
|
+
thrift_method :remove_link, void, field(:up_id, struct(ShardId), 1), field(:down_id, struct(ShardId), 2), :throws => exception(ShardException)
|
134
134
|
|
135
|
-
thrift_method :list_upward_links, list(struct(LinkInfo)), field(:id, struct(ShardId), 1)
|
136
|
-
thrift_method :list_downward_links, list(struct(LinkInfo)), field(:id, struct(ShardId), 1)
|
135
|
+
thrift_method :list_upward_links, list(struct(LinkInfo)), field(:id, struct(ShardId), 1), :throws => exception(ShardException)
|
136
|
+
thrift_method :list_downward_links, list(struct(LinkInfo)), field(:id, struct(ShardId), 1), :throws => exception(ShardException)
|
137
137
|
|
138
|
-
thrift_method :get_child_shards_of_class, list(struct(ShardInfo)), field(:parent_id, struct(ShardId), 1), field(:class_name, string, 2)
|
138
|
+
thrift_method :get_child_shards_of_class, list(struct(ShardInfo)), field(:parent_id, struct(ShardId), 1), field(:class_name, string, 2), :throws => exception(ShardException)
|
139
139
|
|
140
|
-
thrift_method :mark_shard_busy, void, field(:id, struct(ShardId), 1), field(:busy, i32, 2)
|
141
|
-
thrift_method :copy_shard, void, field(:source_id, struct(ShardId), 1), field(:destination_id, struct(ShardId), 2)
|
140
|
+
thrift_method :mark_shard_busy, void, field(:id, struct(ShardId), 1), field(:busy, i32, 2), :throws => exception(ShardException)
|
141
|
+
thrift_method :copy_shard, void, field(:source_id, struct(ShardId), 1), field(:destination_id, struct(ShardId), 2), :throws => exception(ShardException)
|
142
142
|
|
143
|
-
thrift_method :set_forwarding, void, field(:forwarding, struct(Forwarding), 1)
|
144
|
-
thrift_method :replace_forwarding, void, field(:old_id, struct(ShardId), 1), field(:new_id, struct(ShardId), 2)
|
145
|
-
thrift_method :remove_forwarding, void, field(:forwarding, struct(Forwarding), 1)
|
143
|
+
thrift_method :set_forwarding, void, field(:forwarding, struct(Forwarding), 1), :throws => exception(ShardException)
|
144
|
+
thrift_method :replace_forwarding, void, field(:old_id, struct(ShardId), 1), field(:new_id, struct(ShardId), 2), :throws => exception(ShardException)
|
145
|
+
thrift_method :remove_forwarding, void, field(:forwarding, struct(Forwarding), 1), :throws => exception(ShardException)
|
146
146
|
|
147
|
-
thrift_method :get_forwarding, struct(Forwarding), field(:table_id, i32, 1), field(:base_id, i64, 2)
|
148
|
-
thrift_method :get_forwarding_for_shard, struct(Forwarding), field(:shard_id, struct(ShardId), 1)
|
147
|
+
thrift_method :get_forwarding, struct(Forwarding), field(:table_id, i32, 1), field(:base_id, i64, 2), :throws => exception(ShardException)
|
148
|
+
thrift_method :get_forwarding_for_shard, struct(Forwarding), field(:shard_id, struct(ShardId), 1), :throws => exception(ShardException)
|
149
149
|
|
150
|
-
thrift_method :get_forwardings, list(struct(Forwarding))
|
151
|
-
thrift_method :reload_forwardings, void
|
150
|
+
thrift_method :get_forwardings, list(struct(Forwarding)), :throws => exception(ShardException)
|
151
|
+
thrift_method :reload_forwardings, void, :throws => exception(ShardException)
|
152
152
|
|
153
|
-
thrift_method :find_current_forwarding, struct(ShardInfo), field(:table_id, i32, 1), field(:id, i64, 2)
|
153
|
+
thrift_method :find_current_forwarding, struct(ShardInfo), field(:table_id, i32, 1), field(:id, i64, 2), :throws => exception(ShardException)
|
154
154
|
|
155
|
-
thrift_method :shards_for_hostname, list(struct(ShardInfo)), field(:hostname, string, 1)
|
156
|
-
thrift_method :get_busy_shards, list(struct(ShardInfo))
|
157
|
-
thrift_method :list_hostnames, list(string)
|
155
|
+
thrift_method :shards_for_hostname, list(struct(ShardInfo)), field(:hostname, string, 1), :throws => exception(ShardException)
|
156
|
+
thrift_method :get_busy_shards, list(struct(ShardInfo)), :throws => exception(ShardException)
|
157
|
+
thrift_method :list_hostnames, list(string), :throws => exception(ShardException)
|
158
158
|
|
159
|
-
thrift_method :rebuild_schema, void
|
159
|
+
thrift_method :rebuild_schema, void, :throws => exception(ShardException)
|
160
160
|
end
|
161
161
|
|
162
162
|
class JobManager < GizzmoService
|
data/lib/gizzmo.rb
CHANGED
@@ -96,8 +96,12 @@ subcommands = {
|
|
96
96
|
opts.banner = "Usage: #{zero} addforwarding TABLE_ID BASE_ID SHARD_ID"
|
97
97
|
separators(opts, DOC_STRINGS["addforwarding"])
|
98
98
|
end,
|
99
|
+
'currentforwarding' => OptionParser.new do |opts|
|
100
|
+
opts.banner = "Usage: #{zero} currentforwarding SOURCE_ID [ANOTHER_SOURCE_ID...]"
|
101
|
+
separators(opts, DOC_STRINGS["addforwarding"])
|
102
|
+
end,
|
99
103
|
'forwardings' => OptionParser.new do |opts|
|
100
|
-
opts.banner = "Usage: #{zero}
|
104
|
+
opts.banner = "Usage: #{zero} forwardings [options]"
|
101
105
|
separators(opts, DOC_STRINGS["forwardings"])
|
102
106
|
|
103
107
|
opts.on("-t", "--tables=IDS", "Show only the specified table ids (comma separated)") do |table_ids|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kyle Maxwell
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-08-18 00:00:00 -07:00
|
18
18
|
default_executable: gizzmo
|
19
19
|
dependencies: []
|
20
20
|
|