Skip to content

Commit

Permalink
logical_count: use "_" as separator instead of "@"
Browse files Browse the repository at this point in the history
Because "@" can't be used in `match_columns`.
  • Loading branch information
kou committed Feb 3, 2015
1 parent f615bc5 commit 99e467b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion plugins/sharding/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def run_body(input)
end

total = 0
context.database.each_table do |table|
context.database.each_table(:prefix => "#{logical_table}_") do |table|
total += table.size
end
output(total)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
register sharding/search
[[0,0.0,0.0],true]
table_create Logs@20150203 TABLE_NO_KEY
table_create Logs_20150203 TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Logs@20150203 timestamp COLUMN_SCALAR Time
column_create Logs_20150203 timestamp COLUMN_SCALAR Time
[[0,0.0,0.0],true]
table_create Logs@20150204 TABLE_NO_KEY
table_create Logs_20150204 TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Logs@20150204 timestamp COLUMN_SCALAR Time
column_create Logs_20150204 timestamp COLUMN_SCALAR Time
[[0,0.0,0.0],true]
table_create Logs@20150205 TABLE_NO_KEY
table_create Logs_20150205 TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Logs@20150205 timestamp COLUMN_SCALAR Time
column_create Logs_20150205 timestamp COLUMN_SCALAR Time
[[0,0.0,0.0],true]
load --table Logs@20150203
load --table Logs_20150203
[
{"timestamp": "2015-02-03 12:49:00"}
]
[[0,0.0,0.0],1]
load --table Logs@20150204
load --table Logs_20150204
[
{"timestamp": "2015-02-04 13:49:00"},
{"timestamp": "2015-02-04 13:50:00"}
]
[[0,0.0,0.0],2]
load --table Logs@20150205
load --table Logs_20150205
[
{"timestamp": "2015-02-05 13:49:00"},
{"timestamp": "2015-02-05 13:50:00"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
register sharding/search
#@on-error default

table_create Logs@20150203 TABLE_NO_KEY
column_create Logs@20150203 timestamp COLUMN_SCALAR Time
table_create Logs_20150203 TABLE_NO_KEY
column_create Logs_20150203 timestamp COLUMN_SCALAR Time

table_create Logs@20150204 TABLE_NO_KEY
column_create Logs@20150204 timestamp COLUMN_SCALAR Time
table_create Logs_20150204 TABLE_NO_KEY
column_create Logs_20150204 timestamp COLUMN_SCALAR Time

table_create Logs@20150205 TABLE_NO_KEY
column_create Logs@20150205 timestamp COLUMN_SCALAR Time
table_create Logs_20150205 TABLE_NO_KEY
column_create Logs_20150205 timestamp COLUMN_SCALAR Time

load --table Logs@20150203
load --table Logs_20150203
[
{"timestamp": "2015-02-03 12:49:00"}
]

load --table Logs@20150204
load --table Logs_20150204
[
{"timestamp": "2015-02-04 13:49:00"},
{"timestamp": "2015-02-04 13:50:00"}
]

load --table Logs@20150205
load --table Logs_20150205
[
{"timestamp": "2015-02-05 13:49:00"},
{"timestamp": "2015-02-05 13:50:00"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
register sharding/search
[[0,0.0,0.0],true]
table_create Logs@20150203 TABLE_NO_KEY
table_create Logs_20150203 TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Logs@20150203 timestamp COLUMN_SCALAR Time
column_create Logs_20150203 timestamp COLUMN_SCALAR Time
[[0,0.0,0.0],true]
load --table Logs@20150203
load --table Logs_20150203
[
{"timestamp": "2015-02-03 12:49:00"},
{"timestamp": "2015-02-03 12:50:00"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
register sharding/search
#@on-error default

table_create Logs@20150203 TABLE_NO_KEY
column_create Logs@20150203 timestamp COLUMN_SCALAR Time
table_create Logs_20150203 TABLE_NO_KEY
column_create Logs_20150203 timestamp COLUMN_SCALAR Time

load --table Logs@20150203
load --table Logs_20150203
[
{"timestamp": "2015-02-03 12:49:00"},
{"timestamp": "2015-02-03 12:50:00"},
Expand Down

0 comments on commit 99e467b

Please sign in to comment.