awx-zipline-ai 0.0.32__py3-none-any.whl

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.
Files changed (96) hide show
  1. __init__.py +0 -0
  2. agent/__init__.py +1 -0
  3. agent/constants.py +15 -0
  4. agent/ttypes.py +1684 -0
  5. ai/__init__.py +0 -0
  6. ai/chronon/__init__.py +0 -0
  7. ai/chronon/airflow_helpers.py +248 -0
  8. ai/chronon/cli/__init__.py +0 -0
  9. ai/chronon/cli/compile/__init__.py +0 -0
  10. ai/chronon/cli/compile/column_hashing.py +336 -0
  11. ai/chronon/cli/compile/compile_context.py +173 -0
  12. ai/chronon/cli/compile/compiler.py +183 -0
  13. ai/chronon/cli/compile/conf_validator.py +742 -0
  14. ai/chronon/cli/compile/display/__init__.py +0 -0
  15. ai/chronon/cli/compile/display/class_tracker.py +102 -0
  16. ai/chronon/cli/compile/display/compile_status.py +95 -0
  17. ai/chronon/cli/compile/display/compiled_obj.py +12 -0
  18. ai/chronon/cli/compile/display/console.py +3 -0
  19. ai/chronon/cli/compile/display/diff_result.py +111 -0
  20. ai/chronon/cli/compile/fill_templates.py +35 -0
  21. ai/chronon/cli/compile/parse_configs.py +134 -0
  22. ai/chronon/cli/compile/parse_teams.py +242 -0
  23. ai/chronon/cli/compile/serializer.py +109 -0
  24. ai/chronon/cli/compile/version_utils.py +42 -0
  25. ai/chronon/cli/git_utils.py +145 -0
  26. ai/chronon/cli/logger.py +59 -0
  27. ai/chronon/constants.py +3 -0
  28. ai/chronon/group_by.py +692 -0
  29. ai/chronon/join.py +580 -0
  30. ai/chronon/logger.py +23 -0
  31. ai/chronon/model.py +40 -0
  32. ai/chronon/query.py +126 -0
  33. ai/chronon/repo/__init__.py +39 -0
  34. ai/chronon/repo/aws.py +284 -0
  35. ai/chronon/repo/cluster.py +136 -0
  36. ai/chronon/repo/compile.py +62 -0
  37. ai/chronon/repo/constants.py +164 -0
  38. ai/chronon/repo/default_runner.py +269 -0
  39. ai/chronon/repo/explore.py +418 -0
  40. ai/chronon/repo/extract_objects.py +134 -0
  41. ai/chronon/repo/gcp.py +586 -0
  42. ai/chronon/repo/gitpython_utils.py +15 -0
  43. ai/chronon/repo/hub_runner.py +261 -0
  44. ai/chronon/repo/hub_uploader.py +109 -0
  45. ai/chronon/repo/init.py +60 -0
  46. ai/chronon/repo/join_backfill.py +119 -0
  47. ai/chronon/repo/run.py +296 -0
  48. ai/chronon/repo/serializer.py +133 -0
  49. ai/chronon/repo/team_json_utils.py +46 -0
  50. ai/chronon/repo/utils.py +481 -0
  51. ai/chronon/repo/zipline.py +35 -0
  52. ai/chronon/repo/zipline_hub.py +277 -0
  53. ai/chronon/resources/__init__.py +0 -0
  54. ai/chronon/resources/gcp/__init__.py +0 -0
  55. ai/chronon/resources/gcp/group_bys/__init__.py +0 -0
  56. ai/chronon/resources/gcp/group_bys/test/__init__.py +0 -0
  57. ai/chronon/resources/gcp/group_bys/test/data.py +30 -0
  58. ai/chronon/resources/gcp/joins/__init__.py +0 -0
  59. ai/chronon/resources/gcp/joins/test/__init__.py +0 -0
  60. ai/chronon/resources/gcp/joins/test/data.py +26 -0
  61. ai/chronon/resources/gcp/sources/__init__.py +0 -0
  62. ai/chronon/resources/gcp/sources/test/__init__.py +0 -0
  63. ai/chronon/resources/gcp/sources/test/data.py +26 -0
  64. ai/chronon/resources/gcp/teams.py +58 -0
  65. ai/chronon/source.py +86 -0
  66. ai/chronon/staging_query.py +226 -0
  67. ai/chronon/types.py +58 -0
  68. ai/chronon/utils.py +510 -0
  69. ai/chronon/windows.py +48 -0
  70. awx_zipline_ai-0.0.32.dist-info/METADATA +197 -0
  71. awx_zipline_ai-0.0.32.dist-info/RECORD +96 -0
  72. awx_zipline_ai-0.0.32.dist-info/WHEEL +5 -0
  73. awx_zipline_ai-0.0.32.dist-info/entry_points.txt +2 -0
  74. awx_zipline_ai-0.0.32.dist-info/top_level.txt +4 -0
  75. gen_thrift/__init__.py +0 -0
  76. gen_thrift/api/__init__.py +1 -0
  77. gen_thrift/api/constants.py +15 -0
  78. gen_thrift/api/ttypes.py +3754 -0
  79. gen_thrift/common/__init__.py +1 -0
  80. gen_thrift/common/constants.py +15 -0
  81. gen_thrift/common/ttypes.py +1814 -0
  82. gen_thrift/eval/__init__.py +1 -0
  83. gen_thrift/eval/constants.py +15 -0
  84. gen_thrift/eval/ttypes.py +660 -0
  85. gen_thrift/fetcher/__init__.py +1 -0
  86. gen_thrift/fetcher/constants.py +15 -0
  87. gen_thrift/fetcher/ttypes.py +127 -0
  88. gen_thrift/hub/__init__.py +1 -0
  89. gen_thrift/hub/constants.py +15 -0
  90. gen_thrift/hub/ttypes.py +1109 -0
  91. gen_thrift/observability/__init__.py +1 -0
  92. gen_thrift/observability/constants.py +15 -0
  93. gen_thrift/observability/ttypes.py +2355 -0
  94. gen_thrift/planner/__init__.py +1 -0
  95. gen_thrift/planner/constants.py +15 -0
  96. gen_thrift/planner/ttypes.py +1967 -0
agent/ttypes.py ADDED
@@ -0,0 +1,1684 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.22.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+ # options string: py
7
+ #
8
+
9
+ from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
10
+ from thrift.protocol.TProtocol import TProtocolException
11
+ from thrift.TRecursive import fix_spec
12
+ from uuid import UUID
13
+
14
+ import sys
15
+ import gen_thrift.common.ttypes
16
+
17
+ from thrift.transport import TTransport
18
+ all_structs = []
19
+
20
+
21
+ class YarnJobType(object):
22
+ SPARK = 0
23
+ FLINK = 1
24
+
25
+ _VALUES_TO_NAMES = {
26
+ 0: "SPARK",
27
+ 1: "FLINK",
28
+ }
29
+
30
+ _NAMES_TO_VALUES = {
31
+ "SPARK": 0,
32
+ "FLINK": 1,
33
+ }
34
+
35
+
36
+ class JobStatusType(object):
37
+ UNKNOWN = 0
38
+ PENDING = 1
39
+ RUNNING = 2
40
+ SUCCEEDED = 3
41
+ FAILED = 4
42
+ CANCELLED = 5
43
+
44
+ _VALUES_TO_NAMES = {
45
+ 0: "UNKNOWN",
46
+ 1: "PENDING",
47
+ 2: "RUNNING",
48
+ 3: "SUCCEEDED",
49
+ 4: "FAILED",
50
+ 5: "CANCELLED",
51
+ }
52
+
53
+ _NAMES_TO_VALUES = {
54
+ "UNKNOWN": 0,
55
+ "PENDING": 1,
56
+ "RUNNING": 2,
57
+ "SUCCEEDED": 3,
58
+ "FAILED": 4,
59
+ "CANCELLED": 5,
60
+ }
61
+
62
+
63
+ class YarnAutoScalingSpec(object):
64
+ """
65
+ Attributes:
66
+ - minInstances
67
+ - maxInstances
68
+ - scaleUpFactor
69
+ - scaleDownFactor
70
+ - cooldownPeriod
71
+
72
+ """
73
+ thrift_spec = None
74
+
75
+
76
+ def __init__(self, minInstances = None, maxInstances = None, scaleUpFactor = None, scaleDownFactor = None, cooldownPeriod = None,):
77
+ self.minInstances = minInstances
78
+ self.maxInstances = maxInstances
79
+ self.scaleUpFactor = scaleUpFactor
80
+ self.scaleDownFactor = scaleDownFactor
81
+ self.cooldownPeriod = cooldownPeriod
82
+
83
+ def read(self, iprot):
84
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
85
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
86
+ return
87
+ iprot.readStructBegin()
88
+ while True:
89
+ (fname, ftype, fid) = iprot.readFieldBegin()
90
+ if ftype == TType.STOP:
91
+ break
92
+ if fid == 1:
93
+ if ftype == TType.I32:
94
+ self.minInstances = iprot.readI32()
95
+ else:
96
+ iprot.skip(ftype)
97
+ elif fid == 2:
98
+ if ftype == TType.I32:
99
+ self.maxInstances = iprot.readI32()
100
+ else:
101
+ iprot.skip(ftype)
102
+ elif fid == 3:
103
+ if ftype == TType.DOUBLE:
104
+ self.scaleUpFactor = iprot.readDouble()
105
+ else:
106
+ iprot.skip(ftype)
107
+ elif fid == 4:
108
+ if ftype == TType.DOUBLE:
109
+ self.scaleDownFactor = iprot.readDouble()
110
+ else:
111
+ iprot.skip(ftype)
112
+ elif fid == 5:
113
+ if ftype == TType.STRING:
114
+ self.cooldownPeriod = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
115
+ else:
116
+ iprot.skip(ftype)
117
+ else:
118
+ iprot.skip(ftype)
119
+ iprot.readFieldEnd()
120
+ iprot.readStructEnd()
121
+
122
+ def write(self, oprot):
123
+ self.validate()
124
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
125
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
126
+ return
127
+ oprot.writeStructBegin('YarnAutoScalingSpec')
128
+ if self.minInstances is not None:
129
+ oprot.writeFieldBegin('minInstances', TType.I32, 1)
130
+ oprot.writeI32(self.minInstances)
131
+ oprot.writeFieldEnd()
132
+ if self.maxInstances is not None:
133
+ oprot.writeFieldBegin('maxInstances', TType.I32, 2)
134
+ oprot.writeI32(self.maxInstances)
135
+ oprot.writeFieldEnd()
136
+ if self.scaleUpFactor is not None:
137
+ oprot.writeFieldBegin('scaleUpFactor', TType.DOUBLE, 3)
138
+ oprot.writeDouble(self.scaleUpFactor)
139
+ oprot.writeFieldEnd()
140
+ if self.scaleDownFactor is not None:
141
+ oprot.writeFieldBegin('scaleDownFactor', TType.DOUBLE, 4)
142
+ oprot.writeDouble(self.scaleDownFactor)
143
+ oprot.writeFieldEnd()
144
+ if self.cooldownPeriod is not None:
145
+ oprot.writeFieldBegin('cooldownPeriod', TType.STRING, 5)
146
+ oprot.writeString(self.cooldownPeriod.encode('utf-8') if sys.version_info[0] == 2 else self.cooldownPeriod)
147
+ oprot.writeFieldEnd()
148
+ oprot.writeFieldStop()
149
+ oprot.writeStructEnd()
150
+
151
+ def validate(self):
152
+ return
153
+
154
+ def __repr__(self):
155
+ L = ['%s=%r' % (key, value)
156
+ for key, value in self.__dict__.items()]
157
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
158
+
159
+ def __eq__(self, other):
160
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
161
+
162
+ def __ne__(self, other):
163
+ return not (self == other)
164
+
165
+
166
+ class YarnClusterSpec(object):
167
+ """
168
+ Attributes:
169
+ - clusterName
170
+ - hostType
171
+ - hostCount
172
+ - masterHostType
173
+ - yarnOfferingVersion
174
+ - networkPolicy
175
+ - autoScalingSpec
176
+
177
+ """
178
+ thrift_spec = None
179
+
180
+
181
+ def __init__(self, clusterName = None, hostType = None, hostCount = None, masterHostType = None, yarnOfferingVersion = None, networkPolicy = None, autoScalingSpec = None,):
182
+ self.clusterName = clusterName
183
+ self.hostType = hostType
184
+ self.hostCount = hostCount
185
+ self.masterHostType = masterHostType
186
+ self.yarnOfferingVersion = yarnOfferingVersion
187
+ self.networkPolicy = networkPolicy
188
+ self.autoScalingSpec = autoScalingSpec
189
+
190
+ def read(self, iprot):
191
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
192
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
193
+ return
194
+ iprot.readStructBegin()
195
+ while True:
196
+ (fname, ftype, fid) = iprot.readFieldBegin()
197
+ if ftype == TType.STOP:
198
+ break
199
+ if fid == 1:
200
+ if ftype == TType.STRING:
201
+ self.clusterName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
202
+ else:
203
+ iprot.skip(ftype)
204
+ elif fid == 2:
205
+ if ftype == TType.STRING:
206
+ self.hostType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
207
+ else:
208
+ iprot.skip(ftype)
209
+ elif fid == 3:
210
+ if ftype == TType.I32:
211
+ self.hostCount = iprot.readI32()
212
+ else:
213
+ iprot.skip(ftype)
214
+ elif fid == 4:
215
+ if ftype == TType.STRING:
216
+ self.masterHostType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
217
+ else:
218
+ iprot.skip(ftype)
219
+ elif fid == 10:
220
+ if ftype == TType.STRING:
221
+ self.yarnOfferingVersion = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
222
+ else:
223
+ iprot.skip(ftype)
224
+ elif fid == 20:
225
+ if ftype == TType.STRING:
226
+ self.networkPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
227
+ else:
228
+ iprot.skip(ftype)
229
+ elif fid == 30:
230
+ if ftype == TType.STRUCT:
231
+ self.autoScalingSpec = YarnAutoScalingSpec()
232
+ self.autoScalingSpec.read(iprot)
233
+ else:
234
+ iprot.skip(ftype)
235
+ else:
236
+ iprot.skip(ftype)
237
+ iprot.readFieldEnd()
238
+ iprot.readStructEnd()
239
+
240
+ def write(self, oprot):
241
+ self.validate()
242
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
243
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
244
+ return
245
+ oprot.writeStructBegin('YarnClusterSpec')
246
+ if self.clusterName is not None:
247
+ oprot.writeFieldBegin('clusterName', TType.STRING, 1)
248
+ oprot.writeString(self.clusterName.encode('utf-8') if sys.version_info[0] == 2 else self.clusterName)
249
+ oprot.writeFieldEnd()
250
+ if self.hostType is not None:
251
+ oprot.writeFieldBegin('hostType', TType.STRING, 2)
252
+ oprot.writeString(self.hostType.encode('utf-8') if sys.version_info[0] == 2 else self.hostType)
253
+ oprot.writeFieldEnd()
254
+ if self.hostCount is not None:
255
+ oprot.writeFieldBegin('hostCount', TType.I32, 3)
256
+ oprot.writeI32(self.hostCount)
257
+ oprot.writeFieldEnd()
258
+ if self.masterHostType is not None:
259
+ oprot.writeFieldBegin('masterHostType', TType.STRING, 4)
260
+ oprot.writeString(self.masterHostType.encode('utf-8') if sys.version_info[0] == 2 else self.masterHostType)
261
+ oprot.writeFieldEnd()
262
+ if self.yarnOfferingVersion is not None:
263
+ oprot.writeFieldBegin('yarnOfferingVersion', TType.STRING, 10)
264
+ oprot.writeString(self.yarnOfferingVersion.encode('utf-8') if sys.version_info[0] == 2 else self.yarnOfferingVersion)
265
+ oprot.writeFieldEnd()
266
+ if self.networkPolicy is not None:
267
+ oprot.writeFieldBegin('networkPolicy', TType.STRING, 20)
268
+ oprot.writeString(self.networkPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.networkPolicy)
269
+ oprot.writeFieldEnd()
270
+ if self.autoScalingSpec is not None:
271
+ oprot.writeFieldBegin('autoScalingSpec', TType.STRUCT, 30)
272
+ self.autoScalingSpec.write(oprot)
273
+ oprot.writeFieldEnd()
274
+ oprot.writeFieldStop()
275
+ oprot.writeStructEnd()
276
+
277
+ def validate(self):
278
+ return
279
+
280
+ def __repr__(self):
281
+ L = ['%s=%r' % (key, value)
282
+ for key, value in self.__dict__.items()]
283
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
284
+
285
+ def __eq__(self, other):
286
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
287
+
288
+ def __ne__(self, other):
289
+ return not (self == other)
290
+
291
+
292
+ class YarnJob(object):
293
+ """
294
+ Attributes:
295
+ - appName
296
+ - jobType
297
+ - argsList
298
+ - env
299
+ - conf
300
+ - fileWithContents
301
+ - chrononVersion
302
+ - clusterSpec
303
+
304
+ """
305
+ thrift_spec = None
306
+
307
+
308
+ def __init__(self, appName = None, jobType = None, argsList = None, env = None, conf = None, fileWithContents = None, chrononVersion = None, clusterSpec = None,):
309
+ self.appName = appName
310
+ self.jobType = jobType
311
+ self.argsList = argsList
312
+ self.env = env
313
+ self.conf = conf
314
+ self.fileWithContents = fileWithContents
315
+ self.chrononVersion = chrononVersion
316
+ self.clusterSpec = clusterSpec
317
+
318
+ def read(self, iprot):
319
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
320
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
321
+ return
322
+ iprot.readStructBegin()
323
+ while True:
324
+ (fname, ftype, fid) = iprot.readFieldBegin()
325
+ if ftype == TType.STOP:
326
+ break
327
+ if fid == 1:
328
+ if ftype == TType.STRING:
329
+ self.appName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
330
+ else:
331
+ iprot.skip(ftype)
332
+ elif fid == 2:
333
+ if ftype == TType.I32:
334
+ self.jobType = iprot.readI32()
335
+ else:
336
+ iprot.skip(ftype)
337
+ elif fid == 10:
338
+ if ftype == TType.LIST:
339
+ self.argsList = []
340
+ (_etype3, _size0) = iprot.readListBegin()
341
+ for _i4 in range(_size0):
342
+ _elem5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
343
+ self.argsList.append(_elem5)
344
+ iprot.readListEnd()
345
+ else:
346
+ iprot.skip(ftype)
347
+ elif fid == 11:
348
+ if ftype == TType.MAP:
349
+ self.env = {}
350
+ (_ktype7, _vtype8, _size6) = iprot.readMapBegin()
351
+ for _i10 in range(_size6):
352
+ _key11 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
353
+ _val12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
354
+ self.env[_key11] = _val12
355
+ iprot.readMapEnd()
356
+ else:
357
+ iprot.skip(ftype)
358
+ elif fid == 12:
359
+ if ftype == TType.MAP:
360
+ self.conf = {}
361
+ (_ktype14, _vtype15, _size13) = iprot.readMapBegin()
362
+ for _i17 in range(_size13):
363
+ _key18 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
364
+ _val19 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
365
+ self.conf[_key18] = _val19
366
+ iprot.readMapEnd()
367
+ else:
368
+ iprot.skip(ftype)
369
+ elif fid == 13:
370
+ if ftype == TType.MAP:
371
+ self.fileWithContents = {}
372
+ (_ktype21, _vtype22, _size20) = iprot.readMapBegin()
373
+ for _i24 in range(_size20):
374
+ _key25 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
375
+ _val26 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
376
+ self.fileWithContents[_key25] = _val26
377
+ iprot.readMapEnd()
378
+ else:
379
+ iprot.skip(ftype)
380
+ elif fid == 20:
381
+ if ftype == TType.STRING:
382
+ self.chrononVersion = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
383
+ else:
384
+ iprot.skip(ftype)
385
+ elif fid == 21:
386
+ if ftype == TType.STRUCT:
387
+ self.clusterSpec = YarnClusterSpec()
388
+ self.clusterSpec.read(iprot)
389
+ else:
390
+ iprot.skip(ftype)
391
+ else:
392
+ iprot.skip(ftype)
393
+ iprot.readFieldEnd()
394
+ iprot.readStructEnd()
395
+
396
+ def write(self, oprot):
397
+ self.validate()
398
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
399
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
400
+ return
401
+ oprot.writeStructBegin('YarnJob')
402
+ if self.appName is not None:
403
+ oprot.writeFieldBegin('appName', TType.STRING, 1)
404
+ oprot.writeString(self.appName.encode('utf-8') if sys.version_info[0] == 2 else self.appName)
405
+ oprot.writeFieldEnd()
406
+ if self.jobType is not None:
407
+ oprot.writeFieldBegin('jobType', TType.I32, 2)
408
+ oprot.writeI32(self.jobType)
409
+ oprot.writeFieldEnd()
410
+ if self.argsList is not None:
411
+ oprot.writeFieldBegin('argsList', TType.LIST, 10)
412
+ oprot.writeListBegin(TType.STRING, len(self.argsList))
413
+ for iter27 in self.argsList:
414
+ oprot.writeString(iter27.encode('utf-8') if sys.version_info[0] == 2 else iter27)
415
+ oprot.writeListEnd()
416
+ oprot.writeFieldEnd()
417
+ if self.env is not None:
418
+ oprot.writeFieldBegin('env', TType.MAP, 11)
419
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.env))
420
+ for kiter28, viter29 in self.env.items():
421
+ oprot.writeString(kiter28.encode('utf-8') if sys.version_info[0] == 2 else kiter28)
422
+ oprot.writeString(viter29.encode('utf-8') if sys.version_info[0] == 2 else viter29)
423
+ oprot.writeMapEnd()
424
+ oprot.writeFieldEnd()
425
+ if self.conf is not None:
426
+ oprot.writeFieldBegin('conf', TType.MAP, 12)
427
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.conf))
428
+ for kiter30, viter31 in self.conf.items():
429
+ oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30)
430
+ oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31)
431
+ oprot.writeMapEnd()
432
+ oprot.writeFieldEnd()
433
+ if self.fileWithContents is not None:
434
+ oprot.writeFieldBegin('fileWithContents', TType.MAP, 13)
435
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.fileWithContents))
436
+ for kiter32, viter33 in self.fileWithContents.items():
437
+ oprot.writeString(kiter32.encode('utf-8') if sys.version_info[0] == 2 else kiter32)
438
+ oprot.writeString(viter33.encode('utf-8') if sys.version_info[0] == 2 else viter33)
439
+ oprot.writeMapEnd()
440
+ oprot.writeFieldEnd()
441
+ if self.chrononVersion is not None:
442
+ oprot.writeFieldBegin('chrononVersion', TType.STRING, 20)
443
+ oprot.writeString(self.chrononVersion.encode('utf-8') if sys.version_info[0] == 2 else self.chrononVersion)
444
+ oprot.writeFieldEnd()
445
+ if self.clusterSpec is not None:
446
+ oprot.writeFieldBegin('clusterSpec', TType.STRUCT, 21)
447
+ self.clusterSpec.write(oprot)
448
+ oprot.writeFieldEnd()
449
+ oprot.writeFieldStop()
450
+ oprot.writeStructEnd()
451
+
452
+ def validate(self):
453
+ return
454
+
455
+ def __repr__(self):
456
+ L = ['%s=%r' % (key, value)
457
+ for key, value in self.__dict__.items()]
458
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
459
+
460
+ def __eq__(self, other):
461
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
462
+
463
+ def __ne__(self, other):
464
+ return not (self == other)
465
+
466
+
467
+ class KvWrite(object):
468
+ """
469
+ Attributes:
470
+ - key
471
+ - value
472
+ - timestamp
473
+
474
+ """
475
+ thrift_spec = None
476
+
477
+
478
+ def __init__(self, key = None, value = None, timestamp = None,):
479
+ self.key = key
480
+ self.value = value
481
+ self.timestamp = timestamp
482
+
483
+ def read(self, iprot):
484
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
485
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
486
+ return
487
+ iprot.readStructBegin()
488
+ while True:
489
+ (fname, ftype, fid) = iprot.readFieldBegin()
490
+ if ftype == TType.STOP:
491
+ break
492
+ if fid == 1:
493
+ if ftype == TType.STRING:
494
+ self.key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
495
+ else:
496
+ iprot.skip(ftype)
497
+ elif fid == 2:
498
+ if ftype == TType.STRING:
499
+ self.value = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
500
+ else:
501
+ iprot.skip(ftype)
502
+ elif fid == 3:
503
+ if ftype == TType.STRING:
504
+ self.timestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
505
+ else:
506
+ iprot.skip(ftype)
507
+ else:
508
+ iprot.skip(ftype)
509
+ iprot.readFieldEnd()
510
+ iprot.readStructEnd()
511
+
512
+ def write(self, oprot):
513
+ self.validate()
514
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
515
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
516
+ return
517
+ oprot.writeStructBegin('KvWrite')
518
+ if self.key is not None:
519
+ oprot.writeFieldBegin('key', TType.STRING, 1)
520
+ oprot.writeString(self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key)
521
+ oprot.writeFieldEnd()
522
+ if self.value is not None:
523
+ oprot.writeFieldBegin('value', TType.STRING, 2)
524
+ oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value)
525
+ oprot.writeFieldEnd()
526
+ if self.timestamp is not None:
527
+ oprot.writeFieldBegin('timestamp', TType.STRING, 3)
528
+ oprot.writeString(self.timestamp.encode('utf-8') if sys.version_info[0] == 2 else self.timestamp)
529
+ oprot.writeFieldEnd()
530
+ oprot.writeFieldStop()
531
+ oprot.writeStructEnd()
532
+
533
+ def validate(self):
534
+ return
535
+
536
+ def __repr__(self):
537
+ L = ['%s=%r' % (key, value)
538
+ for key, value in self.__dict__.items()]
539
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
540
+
541
+ def __eq__(self, other):
542
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
543
+
544
+ def __ne__(self, other):
545
+ return not (self == other)
546
+
547
+
548
+ class KvWriteJob(object):
549
+ """
550
+ Attributes:
551
+ - scope
552
+ - dataset
553
+ - table
554
+ - writes
555
+
556
+ """
557
+ thrift_spec = None
558
+
559
+
560
+ def __init__(self, scope = None, dataset = None, table = None, writes = None,):
561
+ self.scope = scope
562
+ self.dataset = dataset
563
+ self.table = table
564
+ self.writes = writes
565
+
566
+ def read(self, iprot):
567
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
568
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
569
+ return
570
+ iprot.readStructBegin()
571
+ while True:
572
+ (fname, ftype, fid) = iprot.readFieldBegin()
573
+ if ftype == TType.STOP:
574
+ break
575
+ if fid == 1:
576
+ if ftype == TType.STRING:
577
+ self.scope = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
578
+ else:
579
+ iprot.skip(ftype)
580
+ elif fid == 2:
581
+ if ftype == TType.STRING:
582
+ self.dataset = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
583
+ else:
584
+ iprot.skip(ftype)
585
+ elif fid == 3:
586
+ if ftype == TType.STRING:
587
+ self.table = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
588
+ else:
589
+ iprot.skip(ftype)
590
+ elif fid == 4:
591
+ if ftype == TType.LIST:
592
+ self.writes = []
593
+ (_etype37, _size34) = iprot.readListBegin()
594
+ for _i38 in range(_size34):
595
+ _elem39 = KvWrite()
596
+ _elem39.read(iprot)
597
+ self.writes.append(_elem39)
598
+ iprot.readListEnd()
599
+ else:
600
+ iprot.skip(ftype)
601
+ else:
602
+ iprot.skip(ftype)
603
+ iprot.readFieldEnd()
604
+ iprot.readStructEnd()
605
+
606
+ def write(self, oprot):
607
+ self.validate()
608
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
609
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
610
+ return
611
+ oprot.writeStructBegin('KvWriteJob')
612
+ if self.scope is not None:
613
+ oprot.writeFieldBegin('scope', TType.STRING, 1)
614
+ oprot.writeString(self.scope.encode('utf-8') if sys.version_info[0] == 2 else self.scope)
615
+ oprot.writeFieldEnd()
616
+ if self.dataset is not None:
617
+ oprot.writeFieldBegin('dataset', TType.STRING, 2)
618
+ oprot.writeString(self.dataset.encode('utf-8') if sys.version_info[0] == 2 else self.dataset)
619
+ oprot.writeFieldEnd()
620
+ if self.table is not None:
621
+ oprot.writeFieldBegin('table', TType.STRING, 3)
622
+ oprot.writeString(self.table.encode('utf-8') if sys.version_info[0] == 2 else self.table)
623
+ oprot.writeFieldEnd()
624
+ if self.writes is not None:
625
+ oprot.writeFieldBegin('writes', TType.LIST, 4)
626
+ oprot.writeListBegin(TType.STRUCT, len(self.writes))
627
+ for iter40 in self.writes:
628
+ iter40.write(oprot)
629
+ oprot.writeListEnd()
630
+ oprot.writeFieldEnd()
631
+ oprot.writeFieldStop()
632
+ oprot.writeStructEnd()
633
+
634
+ def validate(self):
635
+ return
636
+
637
+ def __repr__(self):
638
+ L = ['%s=%r' % (key, value)
639
+ for key, value in self.__dict__.items()]
640
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
641
+
642
+ def __eq__(self, other):
643
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
644
+
645
+ def __ne__(self, other):
646
+ return not (self == other)
647
+
648
+
649
+ class PartitionListingJob(object):
650
+ """
651
+ Attributes:
652
+ - scope
653
+ - dataset
654
+ - table
655
+ - partitionColumn
656
+ - extraPartitionFilters
657
+
658
+ """
659
+ thrift_spec = None
660
+
661
+
662
+ def __init__(self, scope = None, dataset = None, table = None, partitionColumn = None, extraPartitionFilters = None,):
663
+ self.scope = scope
664
+ self.dataset = dataset
665
+ self.table = table
666
+ self.partitionColumn = partitionColumn
667
+ self.extraPartitionFilters = extraPartitionFilters
668
+
669
+ def read(self, iprot):
670
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
671
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
672
+ return
673
+ iprot.readStructBegin()
674
+ while True:
675
+ (fname, ftype, fid) = iprot.readFieldBegin()
676
+ if ftype == TType.STOP:
677
+ break
678
+ if fid == 1:
679
+ if ftype == TType.STRING:
680
+ self.scope = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
681
+ else:
682
+ iprot.skip(ftype)
683
+ elif fid == 2:
684
+ if ftype == TType.STRING:
685
+ self.dataset = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
686
+ else:
687
+ iprot.skip(ftype)
688
+ elif fid == 3:
689
+ if ftype == TType.STRING:
690
+ self.table = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
691
+ else:
692
+ iprot.skip(ftype)
693
+ elif fid == 4:
694
+ if ftype == TType.STRING:
695
+ self.partitionColumn = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
696
+ else:
697
+ iprot.skip(ftype)
698
+ elif fid == 5:
699
+ if ftype == TType.LIST:
700
+ self.extraPartitionFilters = []
701
+ (_etype44, _size41) = iprot.readListBegin()
702
+ for _i45 in range(_size41):
703
+ _elem46 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
704
+ self.extraPartitionFilters.append(_elem46)
705
+ iprot.readListEnd()
706
+ else:
707
+ iprot.skip(ftype)
708
+ else:
709
+ iprot.skip(ftype)
710
+ iprot.readFieldEnd()
711
+ iprot.readStructEnd()
712
+
713
+ def write(self, oprot):
714
+ self.validate()
715
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
716
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
717
+ return
718
+ oprot.writeStructBegin('PartitionListingJob')
719
+ if self.scope is not None:
720
+ oprot.writeFieldBegin('scope', TType.STRING, 1)
721
+ oprot.writeString(self.scope.encode('utf-8') if sys.version_info[0] == 2 else self.scope)
722
+ oprot.writeFieldEnd()
723
+ if self.dataset is not None:
724
+ oprot.writeFieldBegin('dataset', TType.STRING, 2)
725
+ oprot.writeString(self.dataset.encode('utf-8') if sys.version_info[0] == 2 else self.dataset)
726
+ oprot.writeFieldEnd()
727
+ if self.table is not None:
728
+ oprot.writeFieldBegin('table', TType.STRING, 3)
729
+ oprot.writeString(self.table.encode('utf-8') if sys.version_info[0] == 2 else self.table)
730
+ oprot.writeFieldEnd()
731
+ if self.partitionColumn is not None:
732
+ oprot.writeFieldBegin('partitionColumn', TType.STRING, 4)
733
+ oprot.writeString(self.partitionColumn.encode('utf-8') if sys.version_info[0] == 2 else self.partitionColumn)
734
+ oprot.writeFieldEnd()
735
+ if self.extraPartitionFilters is not None:
736
+ oprot.writeFieldBegin('extraPartitionFilters', TType.LIST, 5)
737
+ oprot.writeListBegin(TType.STRING, len(self.extraPartitionFilters))
738
+ for iter47 in self.extraPartitionFilters:
739
+ oprot.writeString(iter47.encode('utf-8') if sys.version_info[0] == 2 else iter47)
740
+ oprot.writeListEnd()
741
+ oprot.writeFieldEnd()
742
+ oprot.writeFieldStop()
743
+ oprot.writeStructEnd()
744
+
745
+ def validate(self):
746
+ return
747
+
748
+ def __repr__(self):
749
+ L = ['%s=%r' % (key, value)
750
+ for key, value in self.__dict__.items()]
751
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
752
+
753
+ def __eq__(self, other):
754
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
755
+
756
+ def __ne__(self, other):
757
+ return not (self == other)
758
+
759
+
760
+ class JobBase(object):
761
+ """
762
+ Attributes:
763
+ - yarnJob
764
+ - kvWriteJob
765
+ - partitionListingJob
766
+
767
+ """
768
+ thrift_spec = None
769
+
770
+
771
+ def __init__(self, yarnJob = None, kvWriteJob = None, partitionListingJob = None,):
772
+ self.yarnJob = yarnJob
773
+ self.kvWriteJob = kvWriteJob
774
+ self.partitionListingJob = partitionListingJob
775
+
776
+ def read(self, iprot):
777
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
778
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
779
+ return
780
+ iprot.readStructBegin()
781
+ while True:
782
+ (fname, ftype, fid) = iprot.readFieldBegin()
783
+ if ftype == TType.STOP:
784
+ break
785
+ if fid == 1:
786
+ if ftype == TType.STRUCT:
787
+ self.yarnJob = YarnJob()
788
+ self.yarnJob.read(iprot)
789
+ else:
790
+ iprot.skip(ftype)
791
+ elif fid == 2:
792
+ if ftype == TType.STRUCT:
793
+ self.kvWriteJob = KvWriteJob()
794
+ self.kvWriteJob.read(iprot)
795
+ else:
796
+ iprot.skip(ftype)
797
+ elif fid == 3:
798
+ if ftype == TType.STRUCT:
799
+ self.partitionListingJob = PartitionListingJob()
800
+ self.partitionListingJob.read(iprot)
801
+ else:
802
+ iprot.skip(ftype)
803
+ else:
804
+ iprot.skip(ftype)
805
+ iprot.readFieldEnd()
806
+ iprot.readStructEnd()
807
+
808
+ def write(self, oprot):
809
+ self.validate()
810
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
811
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
812
+ return
813
+ oprot.writeStructBegin('JobBase')
814
+ if self.yarnJob is not None:
815
+ oprot.writeFieldBegin('yarnJob', TType.STRUCT, 1)
816
+ self.yarnJob.write(oprot)
817
+ oprot.writeFieldEnd()
818
+ if self.kvWriteJob is not None:
819
+ oprot.writeFieldBegin('kvWriteJob', TType.STRUCT, 2)
820
+ self.kvWriteJob.write(oprot)
821
+ oprot.writeFieldEnd()
822
+ if self.partitionListingJob is not None:
823
+ oprot.writeFieldBegin('partitionListingJob', TType.STRUCT, 3)
824
+ self.partitionListingJob.write(oprot)
825
+ oprot.writeFieldEnd()
826
+ oprot.writeFieldStop()
827
+ oprot.writeStructEnd()
828
+
829
+ def validate(self):
830
+ return
831
+
832
+ def __repr__(self):
833
+ L = ['%s=%r' % (key, value)
834
+ for key, value in self.__dict__.items()]
835
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
836
+
837
+ def __eq__(self, other):
838
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
839
+
840
+ def __ne__(self, other):
841
+ return not (self == other)
842
+
843
+
844
+ class Job(object):
845
+ """
846
+ Attributes:
847
+ - jobInfo
848
+ - jobUnion
849
+ - statusReportInterval
850
+ - maxRetries
851
+
852
+ """
853
+ thrift_spec = None
854
+
855
+
856
+ def __init__(self, jobInfo = None, jobUnion = None, statusReportInterval = None, maxRetries = None,):
857
+ self.jobInfo = jobInfo
858
+ self.jobUnion = jobUnion
859
+ self.statusReportInterval = statusReportInterval
860
+ self.maxRetries = maxRetries
861
+
862
+ def read(self, iprot):
863
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
864
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
865
+ return
866
+ iprot.readStructBegin()
867
+ while True:
868
+ (fname, ftype, fid) = iprot.readFieldBegin()
869
+ if ftype == TType.STOP:
870
+ break
871
+ if fid == 1:
872
+ if ftype == TType.STRUCT:
873
+ self.jobInfo = JobInfo()
874
+ self.jobInfo.read(iprot)
875
+ else:
876
+ iprot.skip(ftype)
877
+ elif fid == 2:
878
+ if ftype == TType.STRUCT:
879
+ self.jobUnion = JobBase()
880
+ self.jobUnion.read(iprot)
881
+ else:
882
+ iprot.skip(ftype)
883
+ elif fid == 3:
884
+ if ftype == TType.I32:
885
+ self.statusReportInterval = iprot.readI32()
886
+ else:
887
+ iprot.skip(ftype)
888
+ elif fid == 4:
889
+ if ftype == TType.I32:
890
+ self.maxRetries = iprot.readI32()
891
+ else:
892
+ iprot.skip(ftype)
893
+ else:
894
+ iprot.skip(ftype)
895
+ iprot.readFieldEnd()
896
+ iprot.readStructEnd()
897
+
898
+ def write(self, oprot):
899
+ self.validate()
900
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
901
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
902
+ return
903
+ oprot.writeStructBegin('Job')
904
+ if self.jobInfo is not None:
905
+ oprot.writeFieldBegin('jobInfo', TType.STRUCT, 1)
906
+ self.jobInfo.write(oprot)
907
+ oprot.writeFieldEnd()
908
+ if self.jobUnion is not None:
909
+ oprot.writeFieldBegin('jobUnion', TType.STRUCT, 2)
910
+ self.jobUnion.write(oprot)
911
+ oprot.writeFieldEnd()
912
+ if self.statusReportInterval is not None:
913
+ oprot.writeFieldBegin('statusReportInterval', TType.I32, 3)
914
+ oprot.writeI32(self.statusReportInterval)
915
+ oprot.writeFieldEnd()
916
+ if self.maxRetries is not None:
917
+ oprot.writeFieldBegin('maxRetries', TType.I32, 4)
918
+ oprot.writeI32(self.maxRetries)
919
+ oprot.writeFieldEnd()
920
+ oprot.writeFieldStop()
921
+ oprot.writeStructEnd()
922
+
923
+ def validate(self):
924
+ return
925
+
926
+ def __repr__(self):
927
+ L = ['%s=%r' % (key, value)
928
+ for key, value in self.__dict__.items()]
929
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
930
+
931
+ def __eq__(self, other):
932
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
933
+
934
+ def __ne__(self, other):
935
+ return not (self == other)
936
+
937
+
938
+ class JobListGetRequest(object):
939
+ """
940
+ Attributes:
941
+ - topicId
942
+
943
+ """
944
+ thrift_spec = None
945
+
946
+
947
+ def __init__(self, topicId = None,):
948
+ self.topicId = topicId
949
+
950
+ def read(self, iprot):
951
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
952
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
953
+ return
954
+ iprot.readStructBegin()
955
+ while True:
956
+ (fname, ftype, fid) = iprot.readFieldBegin()
957
+ if ftype == TType.STOP:
958
+ break
959
+ if fid == 1:
960
+ if ftype == TType.STRING:
961
+ self.topicId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
962
+ else:
963
+ iprot.skip(ftype)
964
+ else:
965
+ iprot.skip(ftype)
966
+ iprot.readFieldEnd()
967
+ iprot.readStructEnd()
968
+
969
+ def write(self, oprot):
970
+ self.validate()
971
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
972
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
973
+ return
974
+ oprot.writeStructBegin('JobListGetRequest')
975
+ if self.topicId is not None:
976
+ oprot.writeFieldBegin('topicId', TType.STRING, 1)
977
+ oprot.writeString(self.topicId.encode('utf-8') if sys.version_info[0] == 2 else self.topicId)
978
+ oprot.writeFieldEnd()
979
+ oprot.writeFieldStop()
980
+ oprot.writeStructEnd()
981
+
982
+ def validate(self):
983
+ return
984
+
985
+ def __repr__(self):
986
+ L = ['%s=%r' % (key, value)
987
+ for key, value in self.__dict__.items()]
988
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
989
+
990
+ def __eq__(self, other):
991
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
992
+
993
+ def __ne__(self, other):
994
+ return not (self == other)
995
+
996
+
997
+ class JobListResponse(object):
998
+ """
999
+ Attributes:
1000
+ - jobsToStart
1001
+ - jobsToStop
1002
+
1003
+ """
1004
+ thrift_spec = None
1005
+
1006
+
1007
+ def __init__(self, jobsToStart = None, jobsToStop = None,):
1008
+ self.jobsToStart = jobsToStart
1009
+ self.jobsToStop = jobsToStop
1010
+
1011
+ def read(self, iprot):
1012
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1013
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1014
+ return
1015
+ iprot.readStructBegin()
1016
+ while True:
1017
+ (fname, ftype, fid) = iprot.readFieldBegin()
1018
+ if ftype == TType.STOP:
1019
+ break
1020
+ if fid == 1:
1021
+ if ftype == TType.LIST:
1022
+ self.jobsToStart = []
1023
+ (_etype51, _size48) = iprot.readListBegin()
1024
+ for _i52 in range(_size48):
1025
+ _elem53 = Job()
1026
+ _elem53.read(iprot)
1027
+ self.jobsToStart.append(_elem53)
1028
+ iprot.readListEnd()
1029
+ else:
1030
+ iprot.skip(ftype)
1031
+ elif fid == 2:
1032
+ if ftype == TType.LIST:
1033
+ self.jobsToStop = []
1034
+ (_etype57, _size54) = iprot.readListBegin()
1035
+ for _i58 in range(_size54):
1036
+ _elem59 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
1037
+ self.jobsToStop.append(_elem59)
1038
+ iprot.readListEnd()
1039
+ else:
1040
+ iprot.skip(ftype)
1041
+ else:
1042
+ iprot.skip(ftype)
1043
+ iprot.readFieldEnd()
1044
+ iprot.readStructEnd()
1045
+
1046
+ def write(self, oprot):
1047
+ self.validate()
1048
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1049
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1050
+ return
1051
+ oprot.writeStructBegin('JobListResponse')
1052
+ if self.jobsToStart is not None:
1053
+ oprot.writeFieldBegin('jobsToStart', TType.LIST, 1)
1054
+ oprot.writeListBegin(TType.STRUCT, len(self.jobsToStart))
1055
+ for iter60 in self.jobsToStart:
1056
+ iter60.write(oprot)
1057
+ oprot.writeListEnd()
1058
+ oprot.writeFieldEnd()
1059
+ if self.jobsToStop is not None:
1060
+ oprot.writeFieldBegin('jobsToStop', TType.LIST, 2)
1061
+ oprot.writeListBegin(TType.STRING, len(self.jobsToStop))
1062
+ for iter61 in self.jobsToStop:
1063
+ oprot.writeString(iter61.encode('utf-8') if sys.version_info[0] == 2 else iter61)
1064
+ oprot.writeListEnd()
1065
+ oprot.writeFieldEnd()
1066
+ oprot.writeFieldStop()
1067
+ oprot.writeStructEnd()
1068
+
1069
+ def validate(self):
1070
+ return
1071
+
1072
+ def __repr__(self):
1073
+ L = ['%s=%r' % (key, value)
1074
+ for key, value in self.__dict__.items()]
1075
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1076
+
1077
+ def __eq__(self, other):
1078
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1079
+
1080
+ def __ne__(self, other):
1081
+ return not (self == other)
1082
+
1083
+
1084
+ class ResourceUsage(object):
1085
+ """
1086
+ Attributes:
1087
+ - vcoreSeconds
1088
+ - megaByteSeconds
1089
+ - cumulativeDiskWriteBytes
1090
+ - cumulativeDiskReadBytes
1091
+
1092
+ """
1093
+ thrift_spec = None
1094
+
1095
+
1096
+ def __init__(self, vcoreSeconds = None, megaByteSeconds = None, cumulativeDiskWriteBytes = None, cumulativeDiskReadBytes = None,):
1097
+ self.vcoreSeconds = vcoreSeconds
1098
+ self.megaByteSeconds = megaByteSeconds
1099
+ self.cumulativeDiskWriteBytes = cumulativeDiskWriteBytes
1100
+ self.cumulativeDiskReadBytes = cumulativeDiskReadBytes
1101
+
1102
+ def read(self, iprot):
1103
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1104
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1105
+ return
1106
+ iprot.readStructBegin()
1107
+ while True:
1108
+ (fname, ftype, fid) = iprot.readFieldBegin()
1109
+ if ftype == TType.STOP:
1110
+ break
1111
+ if fid == 1:
1112
+ if ftype == TType.I64:
1113
+ self.vcoreSeconds = iprot.readI64()
1114
+ else:
1115
+ iprot.skip(ftype)
1116
+ elif fid == 2:
1117
+ if ftype == TType.I64:
1118
+ self.megaByteSeconds = iprot.readI64()
1119
+ else:
1120
+ iprot.skip(ftype)
1121
+ elif fid == 3:
1122
+ if ftype == TType.I64:
1123
+ self.cumulativeDiskWriteBytes = iprot.readI64()
1124
+ else:
1125
+ iprot.skip(ftype)
1126
+ elif fid == 4:
1127
+ if ftype == TType.I64:
1128
+ self.cumulativeDiskReadBytes = iprot.readI64()
1129
+ else:
1130
+ iprot.skip(ftype)
1131
+ else:
1132
+ iprot.skip(ftype)
1133
+ iprot.readFieldEnd()
1134
+ iprot.readStructEnd()
1135
+
1136
+ def write(self, oprot):
1137
+ self.validate()
1138
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1139
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1140
+ return
1141
+ oprot.writeStructBegin('ResourceUsage')
1142
+ if self.vcoreSeconds is not None:
1143
+ oprot.writeFieldBegin('vcoreSeconds', TType.I64, 1)
1144
+ oprot.writeI64(self.vcoreSeconds)
1145
+ oprot.writeFieldEnd()
1146
+ if self.megaByteSeconds is not None:
1147
+ oprot.writeFieldBegin('megaByteSeconds', TType.I64, 2)
1148
+ oprot.writeI64(self.megaByteSeconds)
1149
+ oprot.writeFieldEnd()
1150
+ if self.cumulativeDiskWriteBytes is not None:
1151
+ oprot.writeFieldBegin('cumulativeDiskWriteBytes', TType.I64, 3)
1152
+ oprot.writeI64(self.cumulativeDiskWriteBytes)
1153
+ oprot.writeFieldEnd()
1154
+ if self.cumulativeDiskReadBytes is not None:
1155
+ oprot.writeFieldBegin('cumulativeDiskReadBytes', TType.I64, 4)
1156
+ oprot.writeI64(self.cumulativeDiskReadBytes)
1157
+ oprot.writeFieldEnd()
1158
+ oprot.writeFieldStop()
1159
+ oprot.writeStructEnd()
1160
+
1161
+ def validate(self):
1162
+ return
1163
+
1164
+ def __repr__(self):
1165
+ L = ['%s=%r' % (key, value)
1166
+ for key, value in self.__dict__.items()]
1167
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1168
+
1169
+ def __eq__(self, other):
1170
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1171
+
1172
+ def __ne__(self, other):
1173
+ return not (self == other)
1174
+
1175
+
1176
+ class YarnIncrementalJobStatus(object):
1177
+ """
1178
+ Attributes:
1179
+ - statusChangeTimes
1180
+ - resourceUsage
1181
+ - logsSinceLastPush
1182
+
1183
+ """
1184
+ thrift_spec = None
1185
+
1186
+
1187
+ def __init__(self, statusChangeTimes = None, resourceUsage = None, logsSinceLastPush = None,):
1188
+ self.statusChangeTimes = statusChangeTimes
1189
+ self.resourceUsage = resourceUsage
1190
+ self.logsSinceLastPush = logsSinceLastPush
1191
+
1192
+ def read(self, iprot):
1193
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1194
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1195
+ return
1196
+ iprot.readStructBegin()
1197
+ while True:
1198
+ (fname, ftype, fid) = iprot.readFieldBegin()
1199
+ if ftype == TType.STOP:
1200
+ break
1201
+ if fid == 1:
1202
+ if ftype == TType.MAP:
1203
+ self.statusChangeTimes = {}
1204
+ (_ktype63, _vtype64, _size62) = iprot.readMapBegin()
1205
+ for _i66 in range(_size62):
1206
+ _key67 = iprot.readI32()
1207
+ _val68 = iprot.readI64()
1208
+ self.statusChangeTimes[_key67] = _val68
1209
+ iprot.readMapEnd()
1210
+ else:
1211
+ iprot.skip(ftype)
1212
+ elif fid == 2:
1213
+ if ftype == TType.STRUCT:
1214
+ self.resourceUsage = ResourceUsage()
1215
+ self.resourceUsage.read(iprot)
1216
+ else:
1217
+ iprot.skip(ftype)
1218
+ elif fid == 3:
1219
+ if ftype == TType.LIST:
1220
+ self.logsSinceLastPush = []
1221
+ (_etype72, _size69) = iprot.readListBegin()
1222
+ for _i73 in range(_size69):
1223
+ _elem74 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
1224
+ self.logsSinceLastPush.append(_elem74)
1225
+ iprot.readListEnd()
1226
+ else:
1227
+ iprot.skip(ftype)
1228
+ else:
1229
+ iprot.skip(ftype)
1230
+ iprot.readFieldEnd()
1231
+ iprot.readStructEnd()
1232
+
1233
+ def write(self, oprot):
1234
+ self.validate()
1235
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1236
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1237
+ return
1238
+ oprot.writeStructBegin('YarnIncrementalJobStatus')
1239
+ if self.statusChangeTimes is not None:
1240
+ oprot.writeFieldBegin('statusChangeTimes', TType.MAP, 1)
1241
+ oprot.writeMapBegin(TType.I32, TType.I64, len(self.statusChangeTimes))
1242
+ for kiter75, viter76 in self.statusChangeTimes.items():
1243
+ oprot.writeI32(kiter75)
1244
+ oprot.writeI64(viter76)
1245
+ oprot.writeMapEnd()
1246
+ oprot.writeFieldEnd()
1247
+ if self.resourceUsage is not None:
1248
+ oprot.writeFieldBegin('resourceUsage', TType.STRUCT, 2)
1249
+ self.resourceUsage.write(oprot)
1250
+ oprot.writeFieldEnd()
1251
+ if self.logsSinceLastPush is not None:
1252
+ oprot.writeFieldBegin('logsSinceLastPush', TType.LIST, 3)
1253
+ oprot.writeListBegin(TType.STRING, len(self.logsSinceLastPush))
1254
+ for iter77 in self.logsSinceLastPush:
1255
+ oprot.writeString(iter77.encode('utf-8') if sys.version_info[0] == 2 else iter77)
1256
+ oprot.writeListEnd()
1257
+ oprot.writeFieldEnd()
1258
+ oprot.writeFieldStop()
1259
+ oprot.writeStructEnd()
1260
+
1261
+ def validate(self):
1262
+ return
1263
+
1264
+ def __repr__(self):
1265
+ L = ['%s=%r' % (key, value)
1266
+ for key, value in self.__dict__.items()]
1267
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1268
+
1269
+ def __eq__(self, other):
1270
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1271
+
1272
+ def __ne__(self, other):
1273
+ return not (self == other)
1274
+
1275
+
1276
+ class JobInfo(object):
1277
+ """
1278
+ Attributes:
1279
+ - jobId
1280
+ - currentStatus
1281
+ - yarnIncrementalStatus
1282
+
1283
+ """
1284
+ thrift_spec = None
1285
+
1286
+
1287
+ def __init__(self, jobId = None, currentStatus = None, yarnIncrementalStatus = None,):
1288
+ self.jobId = jobId
1289
+ self.currentStatus = currentStatus
1290
+ self.yarnIncrementalStatus = yarnIncrementalStatus
1291
+
1292
+ def read(self, iprot):
1293
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1294
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1295
+ return
1296
+ iprot.readStructBegin()
1297
+ while True:
1298
+ (fname, ftype, fid) = iprot.readFieldBegin()
1299
+ if ftype == TType.STOP:
1300
+ break
1301
+ if fid == 1:
1302
+ if ftype == TType.STRING:
1303
+ self.jobId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
1304
+ else:
1305
+ iprot.skip(ftype)
1306
+ elif fid == 2:
1307
+ if ftype == TType.I32:
1308
+ self.currentStatus = iprot.readI32()
1309
+ else:
1310
+ iprot.skip(ftype)
1311
+ elif fid == 10:
1312
+ if ftype == TType.STRUCT:
1313
+ self.yarnIncrementalStatus = YarnIncrementalJobStatus()
1314
+ self.yarnIncrementalStatus.read(iprot)
1315
+ else:
1316
+ iprot.skip(ftype)
1317
+ else:
1318
+ iprot.skip(ftype)
1319
+ iprot.readFieldEnd()
1320
+ iprot.readStructEnd()
1321
+
1322
+ def write(self, oprot):
1323
+ self.validate()
1324
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1325
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1326
+ return
1327
+ oprot.writeStructBegin('JobInfo')
1328
+ if self.jobId is not None:
1329
+ oprot.writeFieldBegin('jobId', TType.STRING, 1)
1330
+ oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId)
1331
+ oprot.writeFieldEnd()
1332
+ if self.currentStatus is not None:
1333
+ oprot.writeFieldBegin('currentStatus', TType.I32, 2)
1334
+ oprot.writeI32(self.currentStatus)
1335
+ oprot.writeFieldEnd()
1336
+ if self.yarnIncrementalStatus is not None:
1337
+ oprot.writeFieldBegin('yarnIncrementalStatus', TType.STRUCT, 10)
1338
+ self.yarnIncrementalStatus.write(oprot)
1339
+ oprot.writeFieldEnd()
1340
+ oprot.writeFieldStop()
1341
+ oprot.writeStructEnd()
1342
+
1343
+ def validate(self):
1344
+ return
1345
+
1346
+ def __repr__(self):
1347
+ L = ['%s=%r' % (key, value)
1348
+ for key, value in self.__dict__.items()]
1349
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1350
+
1351
+ def __eq__(self, other):
1352
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1353
+
1354
+ def __ne__(self, other):
1355
+ return not (self == other)
1356
+
1357
+
1358
+ class PartitionListingPutRequest(object):
1359
+ """
1360
+ Attributes:
1361
+ - partitions
1362
+ - errors
1363
+
1364
+ """
1365
+ thrift_spec = None
1366
+
1367
+
1368
+ def __init__(self, partitions = None, errors = None,):
1369
+ self.partitions = partitions
1370
+ self.errors = errors
1371
+
1372
+ def read(self, iprot):
1373
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1374
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1375
+ return
1376
+ iprot.readStructBegin()
1377
+ while True:
1378
+ (fname, ftype, fid) = iprot.readFieldBegin()
1379
+ if ftype == TType.STOP:
1380
+ break
1381
+ if fid == 1:
1382
+ if ftype == TType.MAP:
1383
+ self.partitions = {}
1384
+ (_ktype79, _vtype80, _size78) = iprot.readMapBegin()
1385
+ for _i82 in range(_size78):
1386
+ _key83 = PartitionListingJob()
1387
+ _key83.read(iprot)
1388
+ _val84 = []
1389
+ (_etype88, _size85) = iprot.readListBegin()
1390
+ for _i89 in range(_size85):
1391
+ _elem90 = gen_thrift.common.ttypes.DateRange()
1392
+ _elem90.read(iprot)
1393
+ _val84.append(_elem90)
1394
+ iprot.readListEnd()
1395
+ self.partitions[_key83] = _val84
1396
+ iprot.readMapEnd()
1397
+ else:
1398
+ iprot.skip(ftype)
1399
+ elif fid == 2:
1400
+ if ftype == TType.MAP:
1401
+ self.errors = {}
1402
+ (_ktype92, _vtype93, _size91) = iprot.readMapBegin()
1403
+ for _i95 in range(_size91):
1404
+ _key96 = PartitionListingJob()
1405
+ _key96.read(iprot)
1406
+ _val97 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
1407
+ self.errors[_key96] = _val97
1408
+ iprot.readMapEnd()
1409
+ else:
1410
+ iprot.skip(ftype)
1411
+ else:
1412
+ iprot.skip(ftype)
1413
+ iprot.readFieldEnd()
1414
+ iprot.readStructEnd()
1415
+
1416
+ def write(self, oprot):
1417
+ self.validate()
1418
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1419
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1420
+ return
1421
+ oprot.writeStructBegin('PartitionListingPutRequest')
1422
+ if self.partitions is not None:
1423
+ oprot.writeFieldBegin('partitions', TType.MAP, 1)
1424
+ oprot.writeMapBegin(TType.STRUCT, TType.LIST, len(self.partitions))
1425
+ for kiter98, viter99 in self.partitions.items():
1426
+ kiter98.write(oprot)
1427
+ oprot.writeListBegin(TType.STRUCT, len(viter99))
1428
+ for iter100 in viter99:
1429
+ iter100.write(oprot)
1430
+ oprot.writeListEnd()
1431
+ oprot.writeMapEnd()
1432
+ oprot.writeFieldEnd()
1433
+ if self.errors is not None:
1434
+ oprot.writeFieldBegin('errors', TType.MAP, 2)
1435
+ oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.errors))
1436
+ for kiter101, viter102 in self.errors.items():
1437
+ kiter101.write(oprot)
1438
+ oprot.writeString(viter102.encode('utf-8') if sys.version_info[0] == 2 else viter102)
1439
+ oprot.writeMapEnd()
1440
+ oprot.writeFieldEnd()
1441
+ oprot.writeFieldStop()
1442
+ oprot.writeStructEnd()
1443
+
1444
+ def validate(self):
1445
+ return
1446
+
1447
+ def __repr__(self):
1448
+ L = ['%s=%r' % (key, value)
1449
+ for key, value in self.__dict__.items()]
1450
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1451
+
1452
+ def __eq__(self, other):
1453
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1454
+
1455
+ def __ne__(self, other):
1456
+ return not (self == other)
1457
+
1458
+
1459
+ class JobInfoPutRequest(object):
1460
+ """
1461
+ Attributes:
1462
+ - jobStatuses
1463
+
1464
+ """
1465
+ thrift_spec = None
1466
+
1467
+
1468
+ def __init__(self, jobStatuses = None,):
1469
+ self.jobStatuses = jobStatuses
1470
+
1471
+ def read(self, iprot):
1472
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
1473
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
1474
+ return
1475
+ iprot.readStructBegin()
1476
+ while True:
1477
+ (fname, ftype, fid) = iprot.readFieldBegin()
1478
+ if ftype == TType.STOP:
1479
+ break
1480
+ if fid == 1:
1481
+ if ftype == TType.LIST:
1482
+ self.jobStatuses = []
1483
+ (_etype106, _size103) = iprot.readListBegin()
1484
+ for _i107 in range(_size103):
1485
+ _elem108 = JobInfo()
1486
+ _elem108.read(iprot)
1487
+ self.jobStatuses.append(_elem108)
1488
+ iprot.readListEnd()
1489
+ else:
1490
+ iprot.skip(ftype)
1491
+ else:
1492
+ iprot.skip(ftype)
1493
+ iprot.readFieldEnd()
1494
+ iprot.readStructEnd()
1495
+
1496
+ def write(self, oprot):
1497
+ self.validate()
1498
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
1499
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
1500
+ return
1501
+ oprot.writeStructBegin('JobInfoPutRequest')
1502
+ if self.jobStatuses is not None:
1503
+ oprot.writeFieldBegin('jobStatuses', TType.LIST, 1)
1504
+ oprot.writeListBegin(TType.STRUCT, len(self.jobStatuses))
1505
+ for iter109 in self.jobStatuses:
1506
+ iter109.write(oprot)
1507
+ oprot.writeListEnd()
1508
+ oprot.writeFieldEnd()
1509
+ oprot.writeFieldStop()
1510
+ oprot.writeStructEnd()
1511
+
1512
+ def validate(self):
1513
+ return
1514
+
1515
+ def __repr__(self):
1516
+ L = ['%s=%r' % (key, value)
1517
+ for key, value in self.__dict__.items()]
1518
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1519
+
1520
+ def __eq__(self, other):
1521
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1522
+
1523
+ def __ne__(self, other):
1524
+ return not (self == other)
1525
+ all_structs.append(YarnAutoScalingSpec)
1526
+ YarnAutoScalingSpec.thrift_spec = (
1527
+ None, # 0
1528
+ (1, TType.I32, 'minInstances', None, None, ), # 1
1529
+ (2, TType.I32, 'maxInstances', None, None, ), # 2
1530
+ (3, TType.DOUBLE, 'scaleUpFactor', None, None, ), # 3
1531
+ (4, TType.DOUBLE, 'scaleDownFactor', None, None, ), # 4
1532
+ (5, TType.STRING, 'cooldownPeriod', 'UTF8', None, ), # 5
1533
+ )
1534
+ all_structs.append(YarnClusterSpec)
1535
+ YarnClusterSpec.thrift_spec = (
1536
+ None, # 0
1537
+ (1, TType.STRING, 'clusterName', 'UTF8', None, ), # 1
1538
+ (2, TType.STRING, 'hostType', 'UTF8', None, ), # 2
1539
+ (3, TType.I32, 'hostCount', None, None, ), # 3
1540
+ (4, TType.STRING, 'masterHostType', 'UTF8', None, ), # 4
1541
+ None, # 5
1542
+ None, # 6
1543
+ None, # 7
1544
+ None, # 8
1545
+ None, # 9
1546
+ (10, TType.STRING, 'yarnOfferingVersion', 'UTF8', None, ), # 10
1547
+ None, # 11
1548
+ None, # 12
1549
+ None, # 13
1550
+ None, # 14
1551
+ None, # 15
1552
+ None, # 16
1553
+ None, # 17
1554
+ None, # 18
1555
+ None, # 19
1556
+ (20, TType.STRING, 'networkPolicy', 'UTF8', None, ), # 20
1557
+ None, # 21
1558
+ None, # 22
1559
+ None, # 23
1560
+ None, # 24
1561
+ None, # 25
1562
+ None, # 26
1563
+ None, # 27
1564
+ None, # 28
1565
+ None, # 29
1566
+ (30, TType.STRUCT, 'autoScalingSpec', [YarnAutoScalingSpec, None], None, ), # 30
1567
+ )
1568
+ all_structs.append(YarnJob)
1569
+ YarnJob.thrift_spec = (
1570
+ None, # 0
1571
+ (1, TType.STRING, 'appName', 'UTF8', None, ), # 1
1572
+ (2, TType.I32, 'jobType', None, None, ), # 2
1573
+ None, # 3
1574
+ None, # 4
1575
+ None, # 5
1576
+ None, # 6
1577
+ None, # 7
1578
+ None, # 8
1579
+ None, # 9
1580
+ (10, TType.LIST, 'argsList', (TType.STRING, 'UTF8', False), None, ), # 10
1581
+ (11, TType.MAP, 'env', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 11
1582
+ (12, TType.MAP, 'conf', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 12
1583
+ (13, TType.MAP, 'fileWithContents', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 13
1584
+ None, # 14
1585
+ None, # 15
1586
+ None, # 16
1587
+ None, # 17
1588
+ None, # 18
1589
+ None, # 19
1590
+ (20, TType.STRING, 'chrononVersion', 'UTF8', None, ), # 20
1591
+ (21, TType.STRUCT, 'clusterSpec', [YarnClusterSpec, None], None, ), # 21
1592
+ )
1593
+ all_structs.append(KvWrite)
1594
+ KvWrite.thrift_spec = (
1595
+ None, # 0
1596
+ (1, TType.STRING, 'key', 'UTF8', None, ), # 1
1597
+ (2, TType.STRING, 'value', 'UTF8', None, ), # 2
1598
+ (3, TType.STRING, 'timestamp', 'UTF8', None, ), # 3
1599
+ )
1600
+ all_structs.append(KvWriteJob)
1601
+ KvWriteJob.thrift_spec = (
1602
+ None, # 0
1603
+ (1, TType.STRING, 'scope', 'UTF8', None, ), # 1
1604
+ (2, TType.STRING, 'dataset', 'UTF8', None, ), # 2
1605
+ (3, TType.STRING, 'table', 'UTF8', None, ), # 3
1606
+ (4, TType.LIST, 'writes', (TType.STRUCT, [KvWrite, None], False), None, ), # 4
1607
+ )
1608
+ all_structs.append(PartitionListingJob)
1609
+ PartitionListingJob.thrift_spec = (
1610
+ None, # 0
1611
+ (1, TType.STRING, 'scope', 'UTF8', None, ), # 1
1612
+ (2, TType.STRING, 'dataset', 'UTF8', None, ), # 2
1613
+ (3, TType.STRING, 'table', 'UTF8', None, ), # 3
1614
+ (4, TType.STRING, 'partitionColumn', 'UTF8', None, ), # 4
1615
+ (5, TType.LIST, 'extraPartitionFilters', (TType.STRING, 'UTF8', False), None, ), # 5
1616
+ )
1617
+ all_structs.append(JobBase)
1618
+ JobBase.thrift_spec = (
1619
+ None, # 0
1620
+ (1, TType.STRUCT, 'yarnJob', [YarnJob, None], None, ), # 1
1621
+ (2, TType.STRUCT, 'kvWriteJob', [KvWriteJob, None], None, ), # 2
1622
+ (3, TType.STRUCT, 'partitionListingJob', [PartitionListingJob, None], None, ), # 3
1623
+ )
1624
+ all_structs.append(Job)
1625
+ Job.thrift_spec = (
1626
+ None, # 0
1627
+ (1, TType.STRUCT, 'jobInfo', [JobInfo, None], None, ), # 1
1628
+ (2, TType.STRUCT, 'jobUnion', [JobBase, None], None, ), # 2
1629
+ (3, TType.I32, 'statusReportInterval', None, None, ), # 3
1630
+ (4, TType.I32, 'maxRetries', None, None, ), # 4
1631
+ )
1632
+ all_structs.append(JobListGetRequest)
1633
+ JobListGetRequest.thrift_spec = (
1634
+ None, # 0
1635
+ (1, TType.STRING, 'topicId', 'UTF8', None, ), # 1
1636
+ )
1637
+ all_structs.append(JobListResponse)
1638
+ JobListResponse.thrift_spec = (
1639
+ None, # 0
1640
+ (1, TType.LIST, 'jobsToStart', (TType.STRUCT, [Job, None], False), None, ), # 1
1641
+ (2, TType.LIST, 'jobsToStop', (TType.STRING, 'UTF8', False), None, ), # 2
1642
+ )
1643
+ all_structs.append(ResourceUsage)
1644
+ ResourceUsage.thrift_spec = (
1645
+ None, # 0
1646
+ (1, TType.I64, 'vcoreSeconds', None, None, ), # 1
1647
+ (2, TType.I64, 'megaByteSeconds', None, None, ), # 2
1648
+ (3, TType.I64, 'cumulativeDiskWriteBytes', None, None, ), # 3
1649
+ (4, TType.I64, 'cumulativeDiskReadBytes', None, None, ), # 4
1650
+ )
1651
+ all_structs.append(YarnIncrementalJobStatus)
1652
+ YarnIncrementalJobStatus.thrift_spec = (
1653
+ None, # 0
1654
+ (1, TType.MAP, 'statusChangeTimes', (TType.I32, None, TType.I64, None, False), None, ), # 1
1655
+ (2, TType.STRUCT, 'resourceUsage', [ResourceUsage, None], None, ), # 2
1656
+ (3, TType.LIST, 'logsSinceLastPush', (TType.STRING, 'UTF8', False), None, ), # 3
1657
+ )
1658
+ all_structs.append(JobInfo)
1659
+ JobInfo.thrift_spec = (
1660
+ None, # 0
1661
+ (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1
1662
+ (2, TType.I32, 'currentStatus', None, None, ), # 2
1663
+ None, # 3
1664
+ None, # 4
1665
+ None, # 5
1666
+ None, # 6
1667
+ None, # 7
1668
+ None, # 8
1669
+ None, # 9
1670
+ (10, TType.STRUCT, 'yarnIncrementalStatus', [YarnIncrementalJobStatus, None], None, ), # 10
1671
+ )
1672
+ all_structs.append(PartitionListingPutRequest)
1673
+ PartitionListingPutRequest.thrift_spec = (
1674
+ None, # 0
1675
+ (1, TType.MAP, 'partitions', (TType.STRUCT, [PartitionListingJob, None], TType.LIST, (TType.STRUCT, [gen_thrift.common.ttypes.DateRange, None], False), False), None, ), # 1
1676
+ (2, TType.MAP, 'errors', (TType.STRUCT, [PartitionListingJob, None], TType.STRING, 'UTF8', False), None, ), # 2
1677
+ )
1678
+ all_structs.append(JobInfoPutRequest)
1679
+ JobInfoPutRequest.thrift_spec = (
1680
+ None, # 0
1681
+ (1, TType.LIST, 'jobStatuses', (TType.STRUCT, [JobInfo, None], False), None, ), # 1
1682
+ )
1683
+ fix_spec(all_structs)
1684
+ del all_structs