concord-ruby 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/concord.rb +8 -0
- data/lib/gen-rb/bolt_constants.rb +4 -2
- data/lib/gen-rb/bolt_pipe_service.rb +86 -0
- data/lib/gen-rb/bolt_proxy_service.rb +0 -58
- data/lib/gen-rb/bolt_types.rb +5 -1
- data/lib/gen-rb/computation_service.rb +57 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2ffe085917dfecfe9fc1249559d06edbd5dd9c2
|
4
|
+
data.tar.gz: 7c46b8cbcba7d02119c71dd236a5d2ce4901b7e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939a37012c904a64a5a2185df3191e4ed7a40edede1482bf575cc4c1cce0f6020fd7300241a95a58a764878eadf5a54c91c39a27e62de154479dfd37a6930f4e
|
7
|
+
data.tar.gz: 38547a11550f0e365caf263e5457753b6be8599b85d9f1297e5bceaab0dfb4fab716bb97ae66af21e0aafafb9f9abffaa9b97f5d016d63fb277d224d5a15da90
|
data/lib/concord.rb
CHANGED
@@ -166,6 +166,14 @@ module Concord
|
|
166
166
|
ctx.transaction
|
167
167
|
end
|
168
168
|
|
169
|
+
# The class destructor, use this method to perform any cleanup before the
|
170
|
+
# proxy kills the process this instance resides in.
|
171
|
+
def destroy
|
172
|
+
log_failure do
|
173
|
+
handler.destroy
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
169
177
|
# @return [Concord::Thrift::ComputationMetadata] The user-defined computation metadata.
|
170
178
|
def boltMetadata
|
171
179
|
metadata = nil
|
@@ -23,12 +23,14 @@ module Concord
|
|
23
23
|
|
24
24
|
KDatabasePath = %q"/tmp"
|
25
25
|
|
26
|
-
KDatabaseEntryTTL = 43200
|
27
|
-
|
28
26
|
KDefaultBatchSize = 2048
|
29
27
|
|
30
28
|
KDefaultTraceSampleEveryN = 1024
|
31
29
|
|
30
|
+
KPrincipalMonitoringName = %q"principal"
|
31
|
+
|
32
|
+
KDispatcherMonitoringName = %q"dispatcher"
|
33
|
+
|
32
34
|
KPrincipalComputationName = %q"principal_computation"
|
33
35
|
|
34
36
|
KIncomingMessageQueueTopic = %q"incoming"
|
@@ -0,0 +1,86 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'bolt_types'
|
9
|
+
|
10
|
+
module Concord
|
11
|
+
module Thrift
|
12
|
+
module BoltPipeService
|
13
|
+
class Client
|
14
|
+
include ::Thrift::Client
|
15
|
+
|
16
|
+
def dispatchRecords(records)
|
17
|
+
send_dispatchRecords(records)
|
18
|
+
recv_dispatchRecords()
|
19
|
+
end
|
20
|
+
|
21
|
+
def send_dispatchRecords(records)
|
22
|
+
send_message('dispatchRecords', DispatchRecords_args, :records => records)
|
23
|
+
end
|
24
|
+
|
25
|
+
def recv_dispatchRecords()
|
26
|
+
result = receive_message(DispatchRecords_result)
|
27
|
+
raise result.e unless result.e.nil?
|
28
|
+
return
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
class Processor
|
34
|
+
include ::Thrift::Processor
|
35
|
+
|
36
|
+
def process_dispatchRecords(seqid, iprot, oprot)
|
37
|
+
args = read_args(iprot, DispatchRecords_args)
|
38
|
+
result = DispatchRecords_result.new()
|
39
|
+
begin
|
40
|
+
@handler.dispatchRecords(args.records)
|
41
|
+
rescue ::Concord::Thrift::BoltError => e
|
42
|
+
result.e = e
|
43
|
+
end
|
44
|
+
write_result(result, oprot, 'dispatchRecords', seqid)
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
50
|
+
|
51
|
+
class DispatchRecords_args
|
52
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
53
|
+
RECORDS = 1
|
54
|
+
|
55
|
+
FIELDS = {
|
56
|
+
RECORDS => {:type => ::Thrift::Types::LIST, :name => 'records', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Record}}
|
57
|
+
}
|
58
|
+
|
59
|
+
def struct_fields; FIELDS; end
|
60
|
+
|
61
|
+
def validate
|
62
|
+
end
|
63
|
+
|
64
|
+
::Thrift::Struct.generate_accessors self
|
65
|
+
end
|
66
|
+
|
67
|
+
class DispatchRecords_result
|
68
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
69
|
+
E = 1
|
70
|
+
|
71
|
+
FIELDS = {
|
72
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
73
|
+
}
|
74
|
+
|
75
|
+
def struct_fields; FIELDS; end
|
76
|
+
|
77
|
+
def validate
|
78
|
+
end
|
79
|
+
|
80
|
+
::Thrift::Struct.generate_accessors self
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
@@ -29,21 +29,6 @@ module Concord
|
|
29
29
|
return
|
30
30
|
end
|
31
31
|
|
32
|
-
def dispatchRecords(records)
|
33
|
-
send_dispatchRecords(records)
|
34
|
-
recv_dispatchRecords()
|
35
|
-
end
|
36
|
-
|
37
|
-
def send_dispatchRecords(records)
|
38
|
-
send_message('dispatchRecords', DispatchRecords_args, :records => records)
|
39
|
-
end
|
40
|
-
|
41
|
-
def recv_dispatchRecords()
|
42
|
-
result = receive_message(DispatchRecords_result)
|
43
|
-
raise result.e unless result.e.nil?
|
44
|
-
return
|
45
|
-
end
|
46
|
-
|
47
32
|
def updateSchedulerAddress(e)
|
48
33
|
send_updateSchedulerAddress(e)
|
49
34
|
recv_updateSchedulerAddress()
|
@@ -82,17 +67,6 @@ module Concord
|
|
82
67
|
write_result(result, oprot, 'updateTopology', seqid)
|
83
68
|
end
|
84
69
|
|
85
|
-
def process_dispatchRecords(seqid, iprot, oprot)
|
86
|
-
args = read_args(iprot, DispatchRecords_args)
|
87
|
-
result = DispatchRecords_result.new()
|
88
|
-
begin
|
89
|
-
@handler.dispatchRecords(args.records)
|
90
|
-
rescue ::Concord::Thrift::BoltError => e
|
91
|
-
result.e = e
|
92
|
-
end
|
93
|
-
write_result(result, oprot, 'dispatchRecords', seqid)
|
94
|
-
end
|
95
|
-
|
96
70
|
def process_updateSchedulerAddress(seqid, iprot, oprot)
|
97
71
|
args = read_args(iprot, UpdateSchedulerAddress_args)
|
98
72
|
result = UpdateSchedulerAddress_result.new()
|
@@ -146,38 +120,6 @@ module Concord
|
|
146
120
|
::Thrift::Struct.generate_accessors self
|
147
121
|
end
|
148
122
|
|
149
|
-
class DispatchRecords_args
|
150
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
151
|
-
RECORDS = 1
|
152
|
-
|
153
|
-
FIELDS = {
|
154
|
-
RECORDS => {:type => ::Thrift::Types::LIST, :name => 'records', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Record}}
|
155
|
-
}
|
156
|
-
|
157
|
-
def struct_fields; FIELDS; end
|
158
|
-
|
159
|
-
def validate
|
160
|
-
end
|
161
|
-
|
162
|
-
::Thrift::Struct.generate_accessors self
|
163
|
-
end
|
164
|
-
|
165
|
-
class DispatchRecords_result
|
166
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
167
|
-
E = 1
|
168
|
-
|
169
|
-
FIELDS = {
|
170
|
-
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
171
|
-
}
|
172
|
-
|
173
|
-
def struct_fields; FIELDS; end
|
174
|
-
|
175
|
-
def validate
|
176
|
-
end
|
177
|
-
|
178
|
-
::Thrift::Struct.generate_accessors self
|
179
|
-
end
|
180
|
-
|
181
123
|
class UpdateSchedulerAddress_args
|
182
124
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
183
125
|
E = 1
|
data/lib/gen-rb/bolt_types.rb
CHANGED
@@ -136,6 +136,7 @@ module Concord
|
|
136
136
|
SCHEDULER = 4
|
137
137
|
PROXY = 5
|
138
138
|
CLIENT = 6
|
139
|
+
ROUTER = 14
|
139
140
|
EXECNAME = 7
|
140
141
|
FOLDER = 8
|
141
142
|
COMPUTATIONALIASNAME = 9
|
@@ -151,6 +152,7 @@ module Concord
|
|
151
152
|
SCHEDULER => {:type => ::Thrift::Types::STRUCT, :name => 'scheduler', :class => ::Concord::Thrift::Endpoint},
|
152
153
|
PROXY => {:type => ::Thrift::Types::STRUCT, :name => 'proxy', :class => ::Concord::Thrift::Endpoint},
|
153
154
|
CLIENT => {:type => ::Thrift::Types::STRUCT, :name => 'client', :class => ::Concord::Thrift::Endpoint},
|
155
|
+
ROUTER => {:type => ::Thrift::Types::STRUCT, :name => 'router', :class => ::Concord::Thrift::Endpoint},
|
154
156
|
EXECNAME => {:type => ::Thrift::Types::STRING, :name => 'execName'},
|
155
157
|
FOLDER => {:type => ::Thrift::Types::STRING, :name => 'folder'},
|
156
158
|
COMPUTATIONALIASNAME => {:type => ::Thrift::Types::STRING, :name => 'computationAliasName'},
|
@@ -358,6 +360,7 @@ module Concord
|
|
358
360
|
TASKHELPER = 6
|
359
361
|
FORCEUPDATEBINARY = 7
|
360
362
|
SLUG = 8
|
363
|
+
FORCEPULLCONTAINER = 9
|
361
364
|
|
362
365
|
FIELDS = {
|
363
366
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
@@ -367,7 +370,8 @@ module Concord
|
|
367
370
|
DISK => {:type => ::Thrift::Types::I64, :name => 'disk', :default => 10240},
|
368
371
|
TASKHELPER => {:type => ::Thrift::Types::STRUCT, :name => 'taskHelper', :class => ::Concord::Thrift::ExecutorTaskInfoHelper},
|
369
372
|
FORCEUPDATEBINARY => {:type => ::Thrift::Types::BOOL, :name => 'forceUpdateBinary'},
|
370
|
-
SLUG => {:type => ::Thrift::Types::STRING, :name => 'slug', :binary => true}
|
373
|
+
SLUG => {:type => ::Thrift::Types::STRING, :name => 'slug', :binary => true},
|
374
|
+
FORCEPULLCONTAINER => {:type => ::Thrift::Types::BOOL, :name => 'forcePullContainer', :default => true}
|
371
375
|
}
|
372
376
|
|
373
377
|
def struct_fields; FIELDS; end
|
@@ -29,6 +29,21 @@ module Concord
|
|
29
29
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'init failed: unknown result')
|
30
30
|
end
|
31
31
|
|
32
|
+
def destroy()
|
33
|
+
send_destroy()
|
34
|
+
recv_destroy()
|
35
|
+
end
|
36
|
+
|
37
|
+
def send_destroy()
|
38
|
+
send_message('destroy', Destroy_args)
|
39
|
+
end
|
40
|
+
|
41
|
+
def recv_destroy()
|
42
|
+
result = receive_message(Destroy_result)
|
43
|
+
raise result.e unless result.e.nil?
|
44
|
+
return
|
45
|
+
end
|
46
|
+
|
32
47
|
def boltProcessRecords(records)
|
33
48
|
send_boltProcessRecords(records)
|
34
49
|
return recv_boltProcessRecords()
|
@@ -93,6 +108,17 @@ module Concord
|
|
93
108
|
write_result(result, oprot, 'init', seqid)
|
94
109
|
end
|
95
110
|
|
111
|
+
def process_destroy(seqid, iprot, oprot)
|
112
|
+
args = read_args(iprot, Destroy_args)
|
113
|
+
result = Destroy_result.new()
|
114
|
+
begin
|
115
|
+
@handler.destroy()
|
116
|
+
rescue ::Concord::Thrift::BoltError => e
|
117
|
+
result.e = e
|
118
|
+
end
|
119
|
+
write_result(result, oprot, 'destroy', seqid)
|
120
|
+
end
|
121
|
+
|
96
122
|
def process_boltProcessRecords(seqid, iprot, oprot)
|
97
123
|
args = read_args(iprot, BoltProcessRecords_args)
|
98
124
|
result = BoltProcessRecords_result.new()
|
@@ -163,6 +189,37 @@ module Concord
|
|
163
189
|
::Thrift::Struct.generate_accessors self
|
164
190
|
end
|
165
191
|
|
192
|
+
class Destroy_args
|
193
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
194
|
+
|
195
|
+
FIELDS = {
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
def struct_fields; FIELDS; end
|
200
|
+
|
201
|
+
def validate
|
202
|
+
end
|
203
|
+
|
204
|
+
::Thrift::Struct.generate_accessors self
|
205
|
+
end
|
206
|
+
|
207
|
+
class Destroy_result
|
208
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
209
|
+
E = 1
|
210
|
+
|
211
|
+
FIELDS = {
|
212
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
213
|
+
}
|
214
|
+
|
215
|
+
def struct_fields; FIELDS; end
|
216
|
+
|
217
|
+
def validate
|
218
|
+
end
|
219
|
+
|
220
|
+
::Thrift::Struct.generate_accessors self
|
221
|
+
end
|
222
|
+
|
166
223
|
class BoltProcessRecords_args
|
167
224
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
168
225
|
RECORDS = 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concord-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cole Brown
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/gen-rb/mutable_ephemeral_state_service.rb
|
56
56
|
- lib/gen-rb/bolt_manager_service.rb
|
57
57
|
- lib/gen-rb/bolt_proxy_service.rb
|
58
|
+
- lib/gen-rb/bolt_pipe_service.rb
|
58
59
|
- lib/concord/utils.rb
|
59
60
|
homepage: https://github.com/concord/concord-ruby
|
60
61
|
licenses:
|