mongo_mapper_parallel 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/mongo_mapper_parallel.rb +5 -4
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGIyOWFkODAzMGM2OWUxMmY5MDg0ODk2MmJhMDBlNGUyZGFhZDdlYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDVmZDhiNGNhZmJhODJhY2QzYjhjZTY3OGUyMjcyMmQxOWQ2NmVjOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODUwYjQ4ZTA3ZTM2MThkODg0OGVjNTMxNzBhNTY4NzgwM2Y0N2Q2ZmE3NzY1
|
10
|
+
NTc2M2RmN2U3YWNkYzU4MzliYTk0NWFhM2E0ZDdiYmIwZTk4YzQ0OWNiODFm
|
11
|
+
Yjg0MmM0NGI3MGMwZjYyOWIwOWY3YjRjN2I3ZGJlNWU4OGEwZDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWVhNGI5MGQ1MGVjMDI2ZjBjMWE5OWRmMWUxYTk2NGZlZjNhNDNmYTFhM2M4
|
14
|
+
MzU5OWUyYWUwNTRiOTRmY2QxMGRmZTYwZGIzNzRkZWQzZTI4NDJiNDJlNjYx
|
15
|
+
YmM5YTRkMWVkMWJjOTY0ZDA0OWM4MzE5ZmU2YmY0NmRlMGE1NWE=
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# @title Mongo Mapper Parallel
|
2
2
|
# @author Jonathan Raiman
|
3
|
-
require 'parallel'
|
4
|
-
require 'colorize'
|
5
|
-
require 'mongo_mapper'
|
3
|
+
require 'parallel' # for parallel processing
|
4
|
+
require 'colorize' # for colored output
|
5
|
+
require 'mongo_mapper' # for access to collections.
|
6
|
+
require 'jraiman_progressbar' # to display progress
|
6
7
|
|
7
8
|
class MongoMapperParallel
|
8
9
|
# runs distributed computation over a Mongo collection
|
@@ -97,7 +98,7 @@ class MongoMapperParallel
|
|
97
98
|
total = @split_keys.length
|
98
99
|
Parallel.each_with_index(@split_keys) do |section,k|
|
99
100
|
if !section.completed then section.compile end
|
100
|
-
|
101
|
+
JRProgressBar.show(k,total)
|
101
102
|
end
|
102
103
|
puts "Success".green
|
103
104
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_mapper_parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Raiman
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jraiman_progressbar
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Mongo Mapper Parallel can perform MapReduce-like operations on an entire
|
56
70
|
collection in parallel. This is a non-blocking operation, so the scripts can invoke
|
57
71
|
database methods (db.collection.update, db.collection.insert, etc...) at blazing
|
@@ -84,7 +98,8 @@ requirements:
|
|
84
98
|
- MongoDB, 2.4+
|
85
99
|
- mongo_mapper
|
86
100
|
- colorize
|
87
|
-
-
|
101
|
+
- parallel
|
102
|
+
- jraiman_progressbar
|
88
103
|
rubyforge_project:
|
89
104
|
rubygems_version: 2.1.10
|
90
105
|
signing_key:
|