tapsoob 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapsoob/data_stream.rb +9 -9
- data/lib/tapsoob/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df630c020c82bdc3e12cbf14883d23a1c9efb92561093b308ab358d53bc8221a
|
4
|
+
data.tar.gz: 5d9e232534db5ac1d40b200f337a8de61d0abe9acd4c2382abe87bd1a7b4cf16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8958025c1339c8625d490533922e838de87cb72daa1cfba8c1800be9cfd99602b9f18de4097ae44c581ed15ff016c1ff99a1d201d3fe7c87ad28b521386cc3c
|
7
|
+
data.tar.gz: 4db6c30969608e6b12b22375c361d4f70679f07ba919d6db81afa42cdb8b742c9d8db59c317f1207f862215a59783390aee0d874d91669280e5b085bec69a52c
|
data/lib/tapsoob/data_stream.rb
CHANGED
@@ -72,7 +72,7 @@ module Tapsoob
|
|
72
72
|
# keep a record of the average chunksize within the first few hundred thousand records, after chunksize
|
73
73
|
# goes below 100 or maybe if offset is > 1000
|
74
74
|
def fetch_rows
|
75
|
-
state[:chunksize] = fetch_chunksize
|
75
|
+
#state[:chunksize] = fetch_chunksize
|
76
76
|
ds = table.order(*order_by).limit(state[:chunksize], state[:offset])
|
77
77
|
state[:size] = table.count
|
78
78
|
log.debug "DataStream#fetch_rows SQL -> #{ds.sql}"
|
@@ -86,7 +86,7 @@ module Tapsoob
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def fetch_file(dump_path)
|
89
|
-
state[:chunksize] = fetch_chunksize
|
89
|
+
#state[:chunksize] = fetch_chunksize
|
90
90
|
ds = JSON.parse(File.read(File.join(dump_path, "data", "#{table_name}.json")))
|
91
91
|
state[:size] = ds["data"].size
|
92
92
|
log.debug "DataStream#fetch_file"
|
@@ -104,13 +104,13 @@ module Tapsoob
|
|
104
104
|
20
|
105
105
|
end
|
106
106
|
|
107
|
-
def fetch_chunksize
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
end
|
107
|
+
#def fetch_chunksize
|
108
|
+
# chunksize = state[:chunksize]
|
109
|
+
# return chunksize if state[:num_chunksize] < max_chunksize_training
|
110
|
+
# return chunksize if state[:avg_chunksize] == 0
|
111
|
+
# return chunksize if state[:error]
|
112
|
+
# state[:avg_chunksize] > chunksize ? state[:avg_chunksize] : chunksize
|
113
|
+
#end
|
114
114
|
|
115
115
|
def update_chunksize_stats
|
116
116
|
return if state[:num_chunksize] >= max_chunksize_training
|
data/lib/tapsoob/version.rb
CHANGED