zillabyte 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ruby/lib/zillabyte/harness/app.rb +1 -0
- data/ruby/lib/zillabyte/harness/each.rb +5 -1
- data/ruby/lib/zillabyte/harness/filter.rb +5 -1
- data/ruby/lib/zillabyte/harness/group_by.rb +5 -1
- data/ruby/lib/zillabyte/harness/helper.rb +19 -1
- data/ruby/lib/zillabyte/harness/injected_component.rb +1 -1
- data/ruby/lib/zillabyte/harness/join.rb +0 -1
- data/ruby/lib/zillabyte/harness/live_delegator.rb +0 -1
- data/ruby/lib/zillabyte/harness/sink.rb +1 -1
- data/ruby/lib/zillabyte/harness/stream.rb +16 -0
- data/ruby/lib/zillabyte/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTA5ZjU3OWVjMTMzYzVmOWFiNDhhNTM1OTg2ODM4NWQ4MDlmMDFmNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTY4Y2MxNmVlZjBkNDEyZDg2ZTcyODgzNWZmOGVmZDJmMDFjOTg0Mw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDgxM2IyNTlhNmY3MGQ2MjdlYmU1ZTEzMWJhYTFlMzYxZjdiYjNjNjNkNzU1
|
10
|
+
NGIyNGY3MDllY2U0NjczNTJlODEwNTcwYTI5ZTI2NTQxNDY3Mzc2YTQwZTkz
|
11
|
+
MmRiYmZlMTg4YmJkMjhiNTdkODJlNDUyOGY4OTE1YmIwNTJiMmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDZkOTljYzc2Y2Q4YTYyMjg3OTY0ODVhNmJjZDYwYWJhMzU5MjBjYTgwZGQ3
|
14
|
+
NjQ0OTZlN2Y1ZmQ4Y2E0ZTBjNmJiODhkZTVlYTU2OTVkNzdkYzJjMDYzYjZi
|
15
|
+
YTBkMWM0MGY1NzBhNTYzMTc0ZmNiZjE5YzcxM2IwNWRmY2Q2NzQ=
|
@@ -43,6 +43,7 @@ class Zillabyte::Harness::App < Zillabyte::Harness::Base
|
|
43
43
|
else
|
44
44
|
node_hash["end_cycle_policy"] = h._end_cycle_policy
|
45
45
|
end
|
46
|
+
|
46
47
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_info_file)
|
47
48
|
elsif(@_options[:command] == :execute and @_options[:name] == h._name)
|
48
49
|
pipe_name = @_options[:pipe]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Zillabyte::Harness::Each
|
2
|
-
attr_accessor :_name, :_type, :_emits, :_output_format, :_prepare, :_execute
|
2
|
+
attr_accessor :_name, :_type, :_emits, :_output_format, :_parallelism, :_prepare, :_execute
|
3
3
|
|
4
4
|
def initialize()
|
5
5
|
@_name = "each_"+Zillabyte::Harness::Counter.get()
|
@@ -19,6 +19,10 @@ class Zillabyte::Harness::Each
|
|
19
19
|
@_output_format = v
|
20
20
|
end
|
21
21
|
|
22
|
+
def parallelism(v)
|
23
|
+
@_parallelism = v
|
24
|
+
end
|
25
|
+
|
22
26
|
def prepare(&block)
|
23
27
|
@_prepare = block
|
24
28
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Zillabyte::Harness::Filter
|
2
|
-
attr_accessor :_name, :_type, :_emits, :_prepare, :_keep
|
2
|
+
attr_accessor :_name, :_type, :_emits, :_parallelism, :_prepare, :_keep
|
3
3
|
|
4
4
|
def initialize()
|
5
5
|
@_name = "filter_"+Zillabyte::Harness::Counter.get()
|
@@ -13,6 +13,10 @@ class Zillabyte::Harness::Filter
|
|
13
13
|
def emits(*v)
|
14
14
|
@_emits = *v
|
15
15
|
end
|
16
|
+
|
17
|
+
def parallelism(v)
|
18
|
+
@_parallelism = v
|
19
|
+
end
|
16
20
|
|
17
21
|
def prepare(&block)
|
18
22
|
@_prepare = block
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Zillabyte::Harness::GroupBy
|
2
|
-
attr_accessor :_name, :_type, :_group_by, :_emits, :_begin_group, :_aggregate, :_end_group
|
2
|
+
attr_accessor :_name, :_type, :_group_by, :_emits, :_parallelism, :_begin_group, :_aggregate, :_end_group
|
3
3
|
|
4
4
|
def initialize(*v)
|
5
5
|
@_name = "group_by_"+Zillabyte::Harness::Counter.get()
|
@@ -14,6 +14,10 @@ class Zillabyte::Harness::GroupBy
|
|
14
14
|
def emits(*v)
|
15
15
|
@_emits = *v
|
16
16
|
end
|
17
|
+
|
18
|
+
def parallelism(v)
|
19
|
+
@_parallelism = v
|
20
|
+
end
|
17
21
|
|
18
22
|
def begin_group(&block)
|
19
23
|
@_begin_group = block
|
@@ -153,7 +153,13 @@ class Zillabyte::Harness::Helper
|
|
153
153
|
if filter._emits.size != 1
|
154
154
|
msg = "#{ee}A \"filter\" must emit a single stream. #{pp}"
|
155
155
|
Zillabyte::Harness::Helper.print_error(msg)
|
156
|
+
end
|
157
|
+
|
158
|
+
if filter._parallelism && filter._parallelism.to_i <= 0
|
159
|
+
msg = "Parallelism for component_source must be positive integer"
|
160
|
+
Zillabyte::Harness::Helper.print_error(msg)
|
156
161
|
end
|
162
|
+
|
157
163
|
if !filter._keep
|
158
164
|
msg = "#{ee}A \"filter\" must contain a \"keep\" block. #{pp}"
|
159
165
|
Zillabyte::Harness::Helper.print_error(msg)
|
@@ -164,6 +170,11 @@ class Zillabyte::Harness::Helper
|
|
164
170
|
ee = "Error in \"each\": \n\t "
|
165
171
|
pp = @@_print_check_each
|
166
172
|
|
173
|
+
if each._parallelism && each._parallelism.to_i <= 0
|
174
|
+
msg = "Parallelism for each must be positive integer"
|
175
|
+
Zillabyte::Harness::Helper.print_error(msg)
|
176
|
+
end
|
177
|
+
|
167
178
|
if !each._execute
|
168
179
|
msg = "#{ee}An \"each\" must contain an \"execute\" block. #{pp}"
|
169
180
|
Zillabyte::Harness::Helper.print_error(msg)
|
@@ -180,6 +191,12 @@ class Zillabyte::Harness::Helper
|
|
180
191
|
msg = "#{ee} A \"group_by\" must contain a non-empty \"group_by\" clause. #{pp}"
|
181
192
|
Zillabyte::Harness::Helper.print_error(msg)
|
182
193
|
end
|
194
|
+
|
195
|
+
if group_by._parallelism && group_by._parallelism.to_i <= 0
|
196
|
+
msg = "Parallelism for group_by must be positive integer"
|
197
|
+
Zillabyte::Harness::Helper.print_error(msg)
|
198
|
+
end
|
199
|
+
|
183
200
|
group_by._group_by.each do |field|
|
184
201
|
if(!(field.is_a?(String) or field.is_a?(Symbol)) or (field =~ /^\w+$/).nil?)
|
185
202
|
msg = "#{ee}Field names must be non-empty STRINGS with only alphanumeric and underscore characters at \"#{field}\"."
|
@@ -256,6 +273,7 @@ class Zillabyte::Harness::Helper
|
|
256
273
|
|
257
274
|
name = sink._name
|
258
275
|
columns = sink._columns
|
276
|
+
|
259
277
|
if(!name)
|
260
278
|
msg = "#{ee}Relation name must be specified! #{pp}"
|
261
279
|
Zillabyte::Harness::Helper.print_error(msg)
|
@@ -335,7 +353,7 @@ class Zillabyte::Harness::Helper
|
|
335
353
|
if(columns.empty?)
|
336
354
|
msg = "#{ee}Must be at least one output field to \"#{node._name}\". #{pp}"
|
337
355
|
Zillabyte::Harness::Helper.print_error(msg)
|
338
|
-
end
|
356
|
+
end
|
339
357
|
|
340
358
|
columns.each do |col|
|
341
359
|
cname = col.keys[0]
|
@@ -34,7 +34,12 @@ class Zillabyte::Harness::Stream
|
|
34
34
|
@_app._nodes << h
|
35
35
|
|
36
36
|
if(@_app._options[:command] == :info)
|
37
|
+
|
37
38
|
node_hash = {"name" => h._name, "type" => h._type, "output_format" => h._output_format}
|
39
|
+
if (h._parallelism)
|
40
|
+
node_hash["parallelism"] = h._parallelism
|
41
|
+
end
|
42
|
+
|
38
43
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_app._info_file)
|
39
44
|
arc_hash = {"name" => @_name, "origin" => @_previous_node_name, "dest" => h._name}
|
40
45
|
Zillabyte::Harness::Helper.write_arc_to_file(arc_hash, @_app._info_file)
|
@@ -72,7 +77,12 @@ class Zillabyte::Harness::Stream
|
|
72
77
|
@_app._nodes << h
|
73
78
|
|
74
79
|
if(@_app._options[:command] == :info)
|
80
|
+
|
75
81
|
node_hash = {"name" => h._name, "type" => h._type}
|
82
|
+
if (h._parallelism)
|
83
|
+
node_hash["parallelism"] = h._parallelism
|
84
|
+
end
|
85
|
+
|
76
86
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_app._info_file)
|
77
87
|
arc_hash = {"name" => @_name, "origin" => @_previous_node_name, "dest" => h._name}
|
78
88
|
Zillabyte::Harness::Helper.write_arc_to_file(arc_hash, @_app._info_file)
|
@@ -110,6 +120,10 @@ class Zillabyte::Harness::Stream
|
|
110
120
|
|
111
121
|
# Info..
|
112
122
|
node_hash = {"name" => h._name, "type" => h._type, "group_by" => h._group_by}
|
123
|
+
if(h._parallelism)
|
124
|
+
node_hash["parallelism"] = h._parallelism
|
125
|
+
end
|
126
|
+
|
113
127
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_app._info_file)
|
114
128
|
arc_hash = {"name" => @_name, "origin" => @_previous_node_name, "dest" => h._name}
|
115
129
|
Zillabyte::Harness::Helper.write_arc_to_file(arc_hash, @_app._info_file)
|
@@ -163,6 +177,7 @@ class Zillabyte::Harness::Stream
|
|
163
177
|
"lhs_fields" => h._lhs_fields,
|
164
178
|
"rhs_fields" => h._rhs_fields,
|
165
179
|
"join_type" => h._join_type}
|
180
|
+
|
166
181
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_app._info_file)
|
167
182
|
arc_hash1 = {"name" => @_name, "origin" => @_previous_node_name, "dest" => h._name, "left" => 1}
|
168
183
|
Zillabyte::Harness::Helper.write_arc_to_file(arc_hash1, @_app._info_file)
|
@@ -221,6 +236,7 @@ class Zillabyte::Harness::Stream
|
|
221
236
|
@_app._nodes << h
|
222
237
|
if(@_app._options[:command] == :info)
|
223
238
|
node_hash = {"name" => h._name, "type" => h._type, "columns" => h._columns, "relation" => h._relation || h._name, "scope" => h._scope}
|
239
|
+
|
224
240
|
Zillabyte::Harness::Helper.write_node_to_file(node_hash, @_app._info_file)
|
225
241
|
arc_hash = {"name" => @_name, "origin" => @_previous_node_name, "dest" => h._name}
|
226
242
|
Zillabyte::Harness::Helper.write_arc_to_file(arc_hash, @_app._info_file)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillabyte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zillabyte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.6
|
55
55
|
description: The Official Zillabyte Gem
|
56
56
|
email:
|
57
57
|
- gem@zillabyte.com
|