zillabyte 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDBhOWNkOTE4OTQxNmI2ZTU2YWQ3ZmE2MGRiYjg0MGZiMWZjNWEyZA==
4
+ ODM4NzMwNTkxNjJmOTJiMjJhYmNhNDdkNjgxMmU1MmI2YzlmOWNmYw==
5
5
  data.tar.gz: !binary |-
6
- NjRiY2ZlNmIzYzgwNzIyNjQ5OTY3MDRiY2M2MmRhNjZhZGYwY2YxMA==
6
+ MDNkZWM2M2JlOTE1MThhZmFhZTJiOTcxMzU4ZTgxNDVlYzc4ZjlmYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjljNmIxYjEwMTcyOWFhYzM0NGY0NmVhMzdkYWFkNzYyNjVmYzEyZjIzZDE4
10
- NGZiOTQ2YzhjMjgzOWFhOWMxOTIwMzgzOGNiMDBhZWJjZGE1OTEyNTRkNTZi
11
- NzllY2Q0YzZmM2U3NDUwNWMzN2ZiNzYzMjE4MDg5NDkyMGY2ZWU=
9
+ NGQzYjhmZWU1YWU1NTFjNWM3MjdlNzNjNTE5MjUzMWNiMmZjYzllODZkYzcz
10
+ YjgzZmU0NTg0YjRmMjU4OGI5YjY2ZTU2MWM1NTRlMDI2MjFmN2I1NGZmZjQx
11
+ NzAzZTAzYjM3MjM4YThjZDVlOWQ3ZjRjODBkYmMxYTQ4Yzk5ZDM=
12
12
  data.tar.gz: !binary |-
13
- YmJmNzY3NDQwMDdlOTQ1OTgyMGU2MDE5ZmIwMDE4MGU3NmRjMTEzYmNmNzU4
14
- YTdlYmIzMTdhZDY4MTVmNThhODlhNjRjMmJhNDhhOTc4ZTUzZjM0YTkxNmMw
15
- ZGFmY2QyN2VhNzVkN2YxZjk2MDFlNzRkYzZkMGY0ZjJmNDAzNzM=
13
+ YmM3MmVlMGFiNzYyYmMyZjU0YWVkY2QyYzg1NzM1OTZhODA1M2IxOTlmY2E1
14
+ MDQzYjAwZGQ2MzRmNmE5OTVmN2E3NDhiNjNkYmNkMGMyNmVhMTg0ODk5MWYx
15
+ MGI0Mzc1MWI1YmEwMGNlYzlkNmM2YWJhMWIwMDJmY2NlN2I4OTY=
@@ -36,8 +36,9 @@ class Zillabyte::Harness::Helper
36
36
  def self.check_name(operation, name, names)
37
37
  ee = "Error in \"#{operation}\" at \"name\": \n\t "
38
38
 
39
- if(!name.instance_of?(String) or name == "")
40
- msg = "#{ee}\"Name\" must be a non-empty STRING at \"#{name}\". Flows and simple_functions must have names!"
39
+ # \w matchs [a-zA-Z0-9_]
40
+ if(!name.instance_of?(String) or (name =~ /^\w+$/).nil?)
41
+ msg = "#{ee}\"Name\" must be a non-empty STRING with only alphanumeric and underscore characters at \"#{name}\". Flows and simple_functions must have names!"
41
42
  Zillabyte::Harness::Helper.print_error(msg)
42
43
  end
43
44
  if(names[name] and names[name] != "new" and names[name] != "sink" and operation != "new" and operation != "sink")
@@ -74,8 +75,8 @@ class Zillabyte::Harness::Helper
74
75
  msg = "#{ee}Invalid format for \"emits\" in #{e}. #{pp}"
75
76
  Zillabyte::Harness::Helper.print_error(msg)
76
77
  end
77
- if(!e[0].instance_of?(String) or e[0] == "")
78
- msg = "#{ee}\"Emits\" #{nn} name must be a non-empty STRING in #{e}. #{pp}"
78
+ if(!e[0].instance_of?(String) or (e[0] =~ /^\w+$/).nil?)
79
+ msg = "#{ee}\"Emits\" #{nn} name must be a non-empty STRING with only alphanumeric and underscore characters in \"#{e}\". #{pp}"
79
80
  Zillabyte::Harness::Helper.print_error(msg)
80
81
  end
81
82
  if(current_op_streams[e[0]])
@@ -97,12 +98,16 @@ class Zillabyte::Harness::Helper
97
98
  Zillabyte::Harness::Helper.check_simple_function_emits(operation, e)
98
99
  else
99
100
  if(!e[1].instance_of?(Array))
100
- msg = "#{ee}Field names must be an ARRAY of STRINGS in stream #{e[0]}. #{pp}"
101
+ msg = "#{ee}Field names must be an ARRAY of STRINGS in stream \"#{e[0]}\". #{pp}"
101
102
  Zillabyte::Harness::Helper.print_error(msg)
102
103
  end
103
104
  e[1].each do |f|
104
- if(!f.instance_of?(String) or f == "")
105
- msg = "#{ee}Field names must be non-empty STRINGS in stream #{e[0]}. #{pp}"
105
+ if(!f.instance_of?(String) or (f =~ /^\w+$/).nil?)
106
+ msg = "#{ee}Field names must be non-empty STRINGS with only alphanumeric and underscore characters in stream \"#{e[0]}\". #{pp}"
107
+ Zillabyte::Harness::Helper.print_error(msg)
108
+ end
109
+ if(f =~ /^v[0-9]+$/i or @@meta_names.member?(f.downcase))
110
+ msg = "#{ee}\"v[number]\", \"id\", \"confidence\", \"since\" and \"source\" are special names in Zillabyte. Please name your field something else. #{pp}"
106
111
  Zillabyte::Harness::Helper.print_error(msg)
107
112
  end
108
113
  end
@@ -131,10 +136,6 @@ class Zillabyte::Harness::Helper
131
136
  msg = "#{ee}\"Consumes\" must be specified since a preceding \"each\", \"spout\" or \"aggregate\" emitted multiple streams. #{pp}"
132
137
  Zillabyte::Harness::Helper.print_error(msg)
133
138
  end
134
- if(!consumes.instance_of?(String) or consumes == "")
135
- msg = "#{ee}\"Consumes\" must be a non-empty STRING at #{consumes}. #{pp}"
136
- Zillabyte::Harness::Helper.print_error(msg)
137
- end
138
139
  if(!streams[consumes])
139
140
  msg = "#{ee}The stream \"#{consumes}\" specified in \"consumes\" does not exist! #{pp}"
140
141
  Zillabyte::Harness::Helper.print_error(msg)
@@ -227,8 +228,12 @@ class Zillabyte::Harness::Helper
227
228
  pp = @@_print_check_simple_function_emits
228
229
  end
229
230
 
230
- if(!cname.instance_of?(String) or cname == "")
231
- msg = "#{ee}Field names must be non-empty STRINGS in relation \"#{relation_name}\". #{pp}"
231
+ if(!cname.instance_of?(String) or (cname =~ /^\w+$/).nil?)
232
+ msg = "#{ee}Field names must be non-empty STRINGS with only alphanumeric and underscore characters in relation \"#{relation_name}\". #{pp}"
233
+ Zillabyte::Harness::Helper.print_error(msg)
234
+ end
235
+ if(cname =~ /^v[0-9]+$/i or @@meta_names.member?(cname.downcase))
236
+ msg = "#{ee}\"v[number]\", \"id\", \"confidence\", \"since\" and \"source\" are special names in Zillabyte. Please name your field something else. #{pp}"
232
237
  Zillabyte::Harness::Helper.print_error(msg)
233
238
  end
234
239
  if(!ctype.instance_of?(Symbol))
@@ -305,12 +310,13 @@ class Zillabyte::Harness::Helper
305
310
  \"Emits\" Syntax:
306
311
  - \"Emits\" must be a non-empty ARRAY.
307
312
  - Each element of \"emits\" must be an ARRAY of length = 2.
308
- * The first element should be the unique stream name defined as a non-empty STRING.
313
+ * The first element should be the unique stream name defined as a non-empty STRING with only alphanumeric and underscore characters.
309
314
  * The second element should be an ARRAY of field names for that stream.
310
315
  e.g.
311
316
  \t emits = [ [ \"stream_1\", [ \"field_11\", \"field_12\", ... ] ],
312
317
  \t [ \"stream_2\", [ \"field_21\", \"field_22\", ... ] ] ] .
313
- - Stream and field names must all be non-empty STRINGS."
318
+ - Stream and field names must all be non-empty STRINGS with only alphanumeric and underscore characters.
319
+ - Field names cannot be \"v[number]\", \"id\", \"confidence\", \"since\" or \"source\" which are reserved Zillabyte names."
314
320
 
315
321
  @@_print_check_group_by = "\n
316
322
  \"Group_by\" Syntax:
@@ -322,11 +328,12 @@ consumed by the aggregation function."
322
328
  \"Emits\" Syntax:
323
329
  - \"Emits\" must be a non-empty ARRAY.
324
330
  - Each element of \"emits\" must be an ARRAY of length = 2.
325
- * The first element should be the unique relation name defined as a non-empty STRING.
331
+ * The first element should be the unique relation name defined as a non-empty STRING with only alphanumeric and underscore characters.
326
332
  * The second element should be an ARRAY of HASHES with field names and data types for that relation. e.g.
327
333
  \t emits = [ [ \"relation_1\", [ {\"field_11\" => \"type_11\"}, {\"field_12\" => \"type_12\"}, ... ] ],
328
334
  \t [ \"relation_2\", [ {\"field_21\" => \"type_21\"}, {\"field_22\" => \"type_22\"}, ... ] ] ] .
329
- - Relation and field names must all be non-empty STRINGS.
335
+ - Relation and field names must all be non-empty STRINGS with only alphanumeric and underscore characters.
336
+ - Field names cannot be \"v[number]\", \"id\", \"confidence\", \"since\" or \"source\" which are reserved Zillabyte names.
330
337
  - Field types must be SYMBOLS. The following types are allowed :string, :integer, :float, :double, and :boolean."
331
338
 
332
339
  @@_print_check_sink = "\n
@@ -345,8 +352,9 @@ consumed by the aggregation function."
345
352
  \t \t h.column \"field_1\" :type_1
346
353
  \t \t h.column \"field_2\" :type_2 ...
347
354
  \t end
348
- - \"Sink\" relation \"name\" must be specified as a non-empty STRING!
349
- - Field names must be non-empty STRINGS.
355
+ - \"Sink\" relation \"name\" must be specified as a non-empty STRING with only alphanumeric and underscore characters!
356
+ - Field names must be non-empty STRINGS with only alphanumeric or underscore characters.
357
+ - Field names cannot be \"v[number]\", \"id\", \"confidence\", \"since\" or \"source\" which are reserved Zillabyte names.
350
358
  - Field types must be SYMBOLS. The following types are allowed :string, :integer, :float, :double, and :boolean.
351
359
  - If there are multiple streams, \"consumes\" must be specified for each sink as a non-empty STRING!
352
360
  * \"Consumes\" is the name of a stream emitted by an \"each\" or a \"spout\" which the \"sink\" should save as a table.
@@ -378,4 +386,5 @@ consumed by the aggregation function."
378
386
  - If there are multiple streams, \"consumes\" must be specified as a non-empty STRING!
379
387
  * \"Consumes\" is the name of a stream emitted by a preceding \"each\", \"spout\" or \"aggregate\" which the current \"aggregate\" operates on."
380
388
 
389
+ @@meta_names=["id", "confidence", "since", "source"]
381
390
  end
@@ -1,3 +1,3 @@
1
1
  module Zillabyte
2
- VERSION = "0.0.13" unless defined?(VERSION)
2
+ VERSION = "0.0.14" unless defined?(VERSION)
3
3
  end
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.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-07 00:00:00.000000000 Z
11
+ date: 2014-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake