ruby-druid 0.1.1 → 0.1.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/.gitignore CHANGED
@@ -3,3 +3,4 @@ Gemfile.lock
3
3
  ruby-druid-0.0.1.gem
4
4
  spec/test.json
5
5
  tmp/rspec_guard_result
6
+ pkg/
@@ -0,0 +1,5 @@
1
+ ### 0.1.1
2
+
3
+ * Zookeeper connection issues
4
+ * Fixed the issue where ZK connections weren't closed after the client was initialized. The new flow opens a connection to ZK then closes it once it has a list of data sources. To keep the connection open with ZK please use the options `zk_keepalive: true`
5
+ * Added Time Series query support. You can now use `.time_series(aggregations)` for time series based queries
data/README.md CHANGED
@@ -105,7 +105,7 @@ all row values by hashlike syntax (i.e. `row['dimension'])
105
105
 
106
106
  ### group_by
107
107
 
108
- Sets the dimensions to group the data.
108
+ https://github.com/metamx/druid/wiki/GroupByQuery - Sets the dimensions to group the data.
109
109
 
110
110
  `queryType` is set automatically to `groupBy`.
111
111
 
@@ -114,6 +114,14 @@ Sets the dimensions to group the data.
114
114
  Druid::Query.new('service/source').group_by([:dimension1, :dimension2])
115
115
  ```
116
116
 
117
+ ### time_series
118
+
119
+ https://github.com/metamx/druid/wiki/TimeseriesQuery - return an array of JSON objects where each object represents a value asked for by the timeseries query
120
+
121
+ ```ruby
122
+ Druid::Query.new('service/source').time_series([:aggregate1, :aggregate2])
123
+ ```
124
+
117
125
  ### long_sum
118
126
 
119
127
  ```ruby
@@ -17,9 +17,8 @@ module Druid
17
17
  uri = data_source_uri(query.source)
18
18
  raise "data source #{query.source} (currently) not available" unless uri
19
19
 
20
- req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'})
20
+ req = Net::HTTP::Post.new(uri.path, {'Content-Type' =>'application/json'})
21
21
  req.body = query.to_json
22
- puts req.body
23
22
 
24
23
  response = Net::HTTP.new(uri.host, uri.port).start do |http|
25
24
  http.read_timeout = TIMEOUT
@@ -61,6 +61,6 @@ module Druid
61
61
  client.query(@source)
62
62
  end
63
63
 
64
- def_delegators :query, :group_by, :sum, :long_sum, :postagg, :interval, :granularity, :filter, :time_series
64
+ def_delegators :query, :group_by, :sum, :long_sum, :double_sum, :postagg, :interval, :granularity, :filter, :time_series
65
65
  end
66
66
  end
@@ -2,7 +2,7 @@ require 'rake'
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'ruby-druid'
5
- gem.version = '0.1.1'
5
+ gem.version = '0.1.2'
6
6
  gem.date = '2013-08-01'
7
7
  gem.summary = 'Ruby client for druid'
8
8
  gem.description = 'Ruby client for metamx druid'
metadata CHANGED
@@ -1,43 +1,48 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-druid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - The LiquidM Team
8
- autorequire:
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
  date: 2013-08-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: zk
15
- requirement: !ruby/object:Gem::Requirement
16
+ version_requirements: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ! '>='
18
+ - - '>='
18
19
  - !ruby/object:Gem::Version
19
20
  version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ none: false
28
+ prerelease: false
29
+ type: :runtime
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rest-client
29
- requirement: !ruby/object:Gem::Requirement
32
+ version_requirements: !ruby/object:Gem::Requirement
30
33
  requirements:
31
- - - ! '>='
34
+ - - '>='
32
35
  - !ruby/object:Gem::Version
33
36
  version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirement: !ruby/object:Gem::Requirement
37
39
  requirements:
38
- - - ! '>='
40
+ - - '>='
39
41
  - !ruby/object:Gem::Version
40
42
  version: '0'
43
+ none: false
44
+ prerelease: false
45
+ type: :runtime
41
46
  description: Ruby client for metamx druid
42
47
  email: tech@liquidm.com
43
48
  executables: []
@@ -45,6 +50,7 @@ extensions: []
45
50
  extra_rdoc_files: []
46
51
  files:
47
52
  - .gitignore
53
+ - CHANGELOG.md
48
54
  - Gemfile
49
55
  - Guardfile
50
56
  - LICENSE
@@ -68,29 +74,31 @@ files:
68
74
  - spec/spec_helper.rb
69
75
  homepage: https://github.com/madvertise/ruby-druid
70
76
  licenses: []
71
- metadata: {}
72
- post_install_message:
77
+ post_install_message:
73
78
  rdoc_options: []
74
79
  require_paths:
75
80
  - lib
76
81
  required_ruby_version: !ruby/object:Gem::Requirement
77
82
  requirements:
78
- - - ! '>='
83
+ - - '>='
79
84
  - !ruby/object:Gem::Version
80
85
  version: '0'
86
+ none: false
81
87
  required_rubygems_version: !ruby/object:Gem::Requirement
82
88
  requirements:
83
- - - ! '>='
89
+ - - '>='
84
90
  - !ruby/object:Gem::Version
85
91
  version: '0'
92
+ none: false
86
93
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.0.5
89
- signing_key:
90
- specification_version: 4
94
+ rubyforge_project:
95
+ rubygems_version: 1.8.24
96
+ signing_key:
97
+ specification_version: 3
91
98
  summary: Ruby client for druid
92
99
  test_files:
93
100
  - spec/lib/client_spec.rb
94
101
  - spec/lib/query_spec.rb
95
102
  - spec/lib/zoo_handler_spec.rb
96
103
  - spec/spec_helper.rb
104
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjkxZmU4ODgzYmYwNzJhMTU1NDY4YjU1OGYzOTBhMmM2MzJjZDE2Ng==
5
- data.tar.gz: !binary |-
6
- ODQ3YWFlYThkNzQ0YWMwNjU3MTJjYjQ5Y2QzMjAxYTMyNTYwZjBiYQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZjVjOWJiZDEyNjA0ZDkwM2UzZTYyNDI5YTlkN2NkZjI5MmVjODBmNzg0Yjky
10
- MGExM2JkOTM1OTliYTA3NmE3Y2VmOTk1ODhmZDI4NTUxYmMwOGQwYTZkZTRh
11
- Njk1MzZhMTc5NmQ0OTQ4NmVjNjE4OWI0ZjE4M2M3Yzk4MDEwYmY=
12
- data.tar.gz: !binary |-
13
- MTkxZGFjYzAzNDk5NWZhY2FkM2E2ODYzNmY1MzkzZTE4M2U0MzFhMDViZWI0
14
- YmNhOTZiNzlhZWFlYWI2ZDRiOWY4NGE2NmQ1Y2I3OTljNjIyNWEwNzczYzRl
15
- MWZhZmQwZTA4OThiMjA4ODAyYjE0MDU0YzBjMzViY2I3ZTJjYzM=