quandl_cassandra 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecbbec59ff95db44ef21b1e70b4cc4e8ea352163
4
- data.tar.gz: a46c4b25bbd0521cd8f359758d99fab2d94664c0
3
+ metadata.gz: 5fbb24fa9c17d9297a69788b91e16f2bfe5d04ef
4
+ data.tar.gz: fbd7d1d238a56ebcdecb6d520b30cc0dcbf5b011
5
5
  SHA512:
6
- metadata.gz: 23392112980f4dbf08c5a58d7c78f29016348fc6ac76f6f33ac7b6be77102562473fe99a0648de5dc27e7a29ce44e65d3646b0ddf1ea076b8c46b5379d44ef89
7
- data.tar.gz: b05ea8b751cf31792fbe89a0da1d4616250ba5940ef6118fc23d3a0539f1ca8737cb8b70e4d59718b376e0de11e2d637736b9ce3d7cb14a1e155ae2521c3fc20
6
+ metadata.gz: 53675199c920cb9fa40749cfcbb62bd5be28e53e2eb157ea748a8caab81e55371b4e89508263f792659c5048b068e6e1f424d25babd0b06de2256ebfb3d547c6
7
+ data.tar.gz: d886dcb2fc3ae6517cd82366f6a33f405887cad03cf816d408c8e3496193670a9e419873b3c7d51af026b12c5ccf2a478d39db91fec3fe6470c99cc6e44f1f09
data/UPGRADE.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.1.3
2
+
3
+ * refactor batch#insert to batch#execute
4
+
5
+
1
6
  ## 1.1.2
2
7
 
3
8
  * add strategy name?
@@ -1,4 +1,4 @@
1
- module Quandl::Cassandra::Batch::Insert
1
+ module Quandl::Cassandra::Batch::Execute
2
2
 
3
3
  extend ActiveSupport::Concern
4
4
 
@@ -7,8 +7,8 @@ module Quandl::Cassandra::Batch::Insert
7
7
  # Quandl::Cassandra::Batch.insert(rows) do |id, type, time, value|
8
8
  # "INSERT INTO columns (id, type, time, value) VALUES (#{id}, '#{type}', #{time}, #{value})"
9
9
  # end
10
- def insert(rows, &block)
11
- insert_in_batches(rows, &block)
10
+ def execute(rows, &block)
11
+ execute_in_batches(rows, &block)
12
12
  end
13
13
 
14
14
  def batch_size
@@ -18,15 +18,15 @@ module Quandl::Cassandra::Batch::Insert
18
18
 
19
19
  protected
20
20
 
21
- def insert_in_batches_with_threads(rows, &block)
21
+ def execute_in_batches_with_threads(rows, &block)
22
22
  # split rows into groups by rows_per_thread
23
23
  threads = rows.each_slice( rows_per_thread(rows) ).map do |rows_slice|
24
- Thread.start{ insert_in_batches(rows_slice, &block) }
24
+ Thread.start{ execute_in_batches(rows_slice, &block) }
25
25
  end
26
26
  threads.each(&:join)
27
27
  end
28
28
 
29
- def insert_in_batches(rows, &block)
29
+ def execute_in_batches(rows, &block)
30
30
  futures = []
31
31
  rows.each_slice( batch_size ).each do |rows_slice|
32
32
  statements = rows_slice.collect{|row| block.call( *row ) }
@@ -1,9 +1,9 @@
1
1
  require 'quandl/cassandra/batch/logging'
2
- require 'quandl/cassandra/batch/insert'
2
+ require 'quandl/cassandra/batch/execute'
3
3
 
4
4
  class Quandl::Cassandra::Batch
5
5
 
6
- include Quandl::Cassandra::Batch::Insert
6
+ include Quandl::Cassandra::Batch::Execute
7
7
  include Quandl::Cassandra::Batch::Logging if defined?(QUANDL_LOGGER) && QUANDL_LOGGER == true
8
8
 
9
9
  end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Cassandra
3
- VERSION = '1.1.2'
3
+ VERSION = '1.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_cassandra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
@@ -189,7 +189,7 @@ files:
189
189
  - lib/quandl/cassandra/base/schema.rb
190
190
  - lib/quandl/cassandra/base/scoping.rb
191
191
  - lib/quandl/cassandra/batch.rb
192
- - lib/quandl/cassandra/batch/insert.rb
192
+ - lib/quandl/cassandra/batch/execute.rb
193
193
  - lib/quandl/cassandra/batch/logging.rb
194
194
  - lib/quandl/cassandra/configuration.rb
195
195
  - lib/quandl/cassandra/error.rb