orca-python 0.2.0__tar.gz → 0.4.0__tar.gz
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.
- {orca_python-0.2.0 → orca_python-0.4.0}/PKG-INFO +1 -1
- orca_python-0.4.0/orca/core/protobufs/python/service_pb2.py +165 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/service_pb2.pyi +55 -4
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/service_pb2_grpc.py +176 -0
- orca_python-0.4.0/orca_python/__init__.py +3 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca_python/main.py +33 -19
- {orca_python-0.2.0 → orca_python-0.4.0}/pyproject.toml +1 -1
- orca_python-0.2.0/orca/core/protobufs/python/service_pb2.py +0 -145
- orca_python-0.2.0/orca_python/__init__.py +0 -3
- {orca_python-0.2.0 → orca_python-0.4.0}/LICENSE +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/README.md +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/__init__.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/vendor/__init__.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/vendor/validate_pb2.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/vendor/validate_pb2.pyi +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/vendor/validate_pb2_grpc.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca_python/envs.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca_python/exceptions.py +0 -0
- {orca_python-0.2.0 → orca_python-0.4.0}/orca_python/py.typed +0 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
+
# source: service.proto
|
5
|
+
# Protobuf Python Version: 5.29.0
|
6
|
+
"""Generated protocol buffer code."""
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
11
|
+
from google.protobuf.internal import builder as _builder
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
14
|
+
5,
|
15
|
+
29,
|
16
|
+
0,
|
17
|
+
'',
|
18
|
+
'service.proto'
|
19
|
+
)
|
20
|
+
# @@protoc_insertion_point(imports)
|
21
|
+
|
22
|
+
_sym_db = _symbol_database.Default()
|
23
|
+
|
24
|
+
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
26
|
+
from vendor import validate_pb2 as vendor_dot_validate__pb2
|
27
|
+
|
28
|
+
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15vendor/validate.proto\"\xb9\x02\n\x06Window\x12\x1d\n\ttime_from\x18\x01 \x01(\x04\x42\n\xbaH\x07\x32\x02 \x00\xc8\x01\x01\x12\x17\n\x07time_to\x18\x02 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x01\x12 \n\x10window_type_name\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12#\n\x13window_type_version\x18\x04 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x16\n\x06origin\x18\x05 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12)\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct:m\xbaHj\x1ah\n\x0ewindow.time_to\x12\x36`time_to` must be greater than or equal to `time_from`\x1a\x1ethis.time_to >= this.time_from\"X\n\nWindowType\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1b\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\"\xa4\x01\n\x10WindowEmitStatus\x12\x34\n\x06status\x18\x01 \x01(\x0e\x32\x1c.WindowEmitStatus.StatusEnumB\x06\xbaH\x03\xc8\x01\x01\"Z\n\nStatusEnum\x12\x1b\n\x17NO_TRIGGERED_ALGORITHMS\x10\x00\x12\x18\n\x14PROCESSING_TRIGGERED\x10\x01\x12\x15\n\x11TRIGGERING_FAILED\x10\x02\"\x87\x01\n\x13\x41lgorithmDependency\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1e\n\x0eprocessor_name\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12!\n\x11processor_runtime\x18\x04 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\"\x90\x01\n\tAlgorithm\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12(\n\x0bwindow_type\x18\x03 \x01(\x0b\x32\x0b.WindowTypeB\x06\xbaH\x03\xc8\x01\x01\x12*\n\x0c\x64\x65pendencies\x18\x04 \x03(\x0b\x32\x14.AlgorithmDependency\"\x1c\n\nFloatArray\x12\x0e\n\x06values\x18\x01 \x03(\x02\"\xc7\x01\n\x06Result\x12%\n\x06status\x18\x01 \x01(\x0e\x32\r.ResultStatusB\x06\xbaH\x03\xc8\x01\x01\x12\x16\n\x0csingle_value\x18\x02 \x01(\x02H\x00\x12#\n\x0c\x66loat_values\x18\x03 \x01(\x0b\x32\x0b.FloatArrayH\x00\x12/\n\x0cstruct_value\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x19\n\ttimestamp\x18\x05 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01\x42\r\n\x0bresult_data\"\x98\x01\n\x15ProcessorRegistration\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07runtime\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1e\n\x0e\x63onnection_str\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x30\n\x14supported_algorithms\x18\x04 \x03(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\"\x96\x01\n\x0eProcessingTask\x12\x17\n\x07task_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12%\n\talgorithm\x18\x02 \x01(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06window\x18\x03 \x01(\x0b\x32\x07.WindowB\x06\xbaH\x03\xc8\x01\x01\x12#\n\x12\x64\x65pendency_results\x18\x04 \x03(\x0b\x32\x07.Result\"\x99\x01\n\x10\x45xecutionRequest\x12\x17\n\x07\x65xec_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06window\x18\x02 \x01(\x0b\x32\x07.WindowB\x06\xbaH\x03\xc8\x01\x01\x12+\n\x11\x61lgorithm_results\x18\x03 \x03(\x0b\x32\x10.AlgorithmResult\x12\x1e\n\nalgorithms\x18\x04 \x03(\x0b\x32\n.Algorithm\"^\n\x0f\x45xecutionResult\x12\x17\n\x07\x65xec_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x32\n\x10\x61lgorithm_result\x18\x03 \x01(\x0b\x32\x10.AlgorithmResultB\x06\xbaH\x03\xc8\x01\x01\"Y\n\x0f\x41lgorithmResult\x12%\n\talgorithm\x18\x01 \x01(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06result\x18\x02 \x01(\x0b\x32\x07.ResultB\x06\xbaH\x03\xc8\x01\x01\"+\n\x06Status\x12\x10\n\x08received\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"/\n\x12HealthCheckRequest\x12\x19\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01\"\xe3\x01\n\x13HealthCheckResponse\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32\x1b.HealthCheckResponse.StatusB\x06\xbaH\x03\xc8\x01\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x07metrics\x18\x03 \x01(\x0b\x32\x11.ProcessorMetrics\"b\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x12\n\x0eSTATUS_SERVING\x10\x01\x12\x18\n\x14STATUS_TRANSITIONING\x10\x02\x12\x16\n\x12STATUS_NOT_SERVING\x10\x03\"k\n\x10ProcessorMetrics\x12\x14\n\x0c\x61\x63tive_tasks\x18\x01 \x01(\x05\x12\x14\n\x0cmemory_bytes\x18\x02 \x01(\x03\x12\x13\n\x0b\x63pu_percent\x18\x03 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x04 \x01(\x03\"\x10\n\x0eWindowTypeRead\"+\n\x0bWindowTypes\x12\x1c\n\x07windows\x18\x01 \x03(\x0b\x32\x0b.WindowType\"\x10\n\x0e\x41lgorithmsRead\"+\n\nAlgorithms\x12\x1d\n\talgorithm\x18\x01 \x03(\x0b\x32\n.Algorithm\"\x10\n\x0eProcessorsRead\"b\n\nProcessors\x12(\n\tprocessor\x18\x01 \x03(\x0b\x32\x15.Processors.Processor\x1a*\n\tProcessor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07runtime\x18\x02 \x01(\t\"\x12\n\x10ResultsStatsRead\"\x1d\n\x0cResultsStats\x12\r\n\x05\x43ount\x18\x01 \x01(\x03*p\n\x0cResultStatus\x12 \n\x1cRESULT_STATUS_HANDLED_FAILED\x10\x00\x12\"\n\x1eRESULT_STATUS_UNHANDLED_FAILED\x10\x01\x12\x1a\n\x16RESULT_STATUS_SUCEEDED\x10\x02\x32\xb2\x02\n\x08OrcaCore\x12\x34\n\x11RegisterProcessor\x12\x16.ProcessorRegistration\x1a\x07.Status\x12(\n\nEmitWindow\x12\x07.Window\x1a\x11.WindowEmitStatus\x12\x30\n\x0fReadWindowTypes\x12\x0f.WindowTypeRead\x1a\x0c.WindowTypes\x12.\n\x0eReadAlgorithms\x12\x0f.AlgorithmsRead\x1a\x0b.Algorithms\x12.\n\x0eReadProcessors\x12\x0f.ProcessorsRead\x1a\x0b.Processors\x12\x34\n\x10ReadResultsStats\x12\x11.ResultsStatsRead\x1a\r.ResultsStats2\x82\x01\n\rOrcaProcessor\x12\x37\n\x0e\x45xecuteDagPart\x12\x11.ExecutionRequest\x1a\x10.ExecutionResult0\x01\x12\x38\n\x0bHealthCheck\x12\x13.HealthCheckRequest\x1a\x14.HealthCheckResponseB\'Z%github.com/predixus/orca/protobufs/gob\x06proto3')
|
30
|
+
|
31
|
+
_globals = globals()
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service_pb2', _globals)
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z%github.com/predixus/orca/protobufs/go'
|
37
|
+
_globals['_WINDOW'].fields_by_name['time_from']._loaded_options = None
|
38
|
+
_globals['_WINDOW'].fields_by_name['time_from']._serialized_options = b'\272H\0072\002 \000\310\001\001'
|
39
|
+
_globals['_WINDOW'].fields_by_name['time_to']._loaded_options = None
|
40
|
+
_globals['_WINDOW'].fields_by_name['time_to']._serialized_options = b'\272H\003\310\001\001'
|
41
|
+
_globals['_WINDOW'].fields_by_name['window_type_name']._loaded_options = None
|
42
|
+
_globals['_WINDOW'].fields_by_name['window_type_name']._serialized_options = b'\272H\003\310\001\001'
|
43
|
+
_globals['_WINDOW'].fields_by_name['window_type_version']._loaded_options = None
|
44
|
+
_globals['_WINDOW'].fields_by_name['window_type_version']._serialized_options = b'\272H\003\310\001\001'
|
45
|
+
_globals['_WINDOW'].fields_by_name['origin']._loaded_options = None
|
46
|
+
_globals['_WINDOW'].fields_by_name['origin']._serialized_options = b'\272H\003\310\001\001'
|
47
|
+
_globals['_WINDOW']._loaded_options = None
|
48
|
+
_globals['_WINDOW']._serialized_options = b'\272Hj\032h\n\016window.time_to\0226`time_to` must be greater than or equal to `time_from`\032\036this.time_to >= this.time_from'
|
49
|
+
_globals['_WINDOWTYPE'].fields_by_name['name']._loaded_options = None
|
50
|
+
_globals['_WINDOWTYPE'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
51
|
+
_globals['_WINDOWTYPE'].fields_by_name['version']._loaded_options = None
|
52
|
+
_globals['_WINDOWTYPE'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
53
|
+
_globals['_WINDOWTYPE'].fields_by_name['description']._loaded_options = None
|
54
|
+
_globals['_WINDOWTYPE'].fields_by_name['description']._serialized_options = b'\272H\003\310\001\001'
|
55
|
+
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._loaded_options = None
|
56
|
+
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
57
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['name']._loaded_options = None
|
58
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
59
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['version']._loaded_options = None
|
60
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
61
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_name']._loaded_options = None
|
62
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_name']._serialized_options = b'\272H\003\310\001\001'
|
63
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_runtime']._loaded_options = None
|
64
|
+
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_runtime']._serialized_options = b'\272H\003\310\001\001'
|
65
|
+
_globals['_ALGORITHM'].fields_by_name['name']._loaded_options = None
|
66
|
+
_globals['_ALGORITHM'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
67
|
+
_globals['_ALGORITHM'].fields_by_name['version']._loaded_options = None
|
68
|
+
_globals['_ALGORITHM'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
69
|
+
_globals['_ALGORITHM'].fields_by_name['window_type']._loaded_options = None
|
70
|
+
_globals['_ALGORITHM'].fields_by_name['window_type']._serialized_options = b'\272H\003\310\001\001'
|
71
|
+
_globals['_RESULT'].fields_by_name['status']._loaded_options = None
|
72
|
+
_globals['_RESULT'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
73
|
+
_globals['_RESULT'].fields_by_name['timestamp']._loaded_options = None
|
74
|
+
_globals['_RESULT'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
|
75
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['name']._loaded_options = None
|
76
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
77
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['runtime']._loaded_options = None
|
78
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['runtime']._serialized_options = b'\272H\003\310\001\001'
|
79
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['connection_str']._loaded_options = None
|
80
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['connection_str']._serialized_options = b'\272H\003\310\001\001'
|
81
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['supported_algorithms']._loaded_options = None
|
82
|
+
_globals['_PROCESSORREGISTRATION'].fields_by_name['supported_algorithms']._serialized_options = b'\272H\003\310\001\001'
|
83
|
+
_globals['_PROCESSINGTASK'].fields_by_name['task_id']._loaded_options = None
|
84
|
+
_globals['_PROCESSINGTASK'].fields_by_name['task_id']._serialized_options = b'\272H\003\310\001\001'
|
85
|
+
_globals['_PROCESSINGTASK'].fields_by_name['algorithm']._loaded_options = None
|
86
|
+
_globals['_PROCESSINGTASK'].fields_by_name['algorithm']._serialized_options = b'\272H\003\310\001\001'
|
87
|
+
_globals['_PROCESSINGTASK'].fields_by_name['window']._loaded_options = None
|
88
|
+
_globals['_PROCESSINGTASK'].fields_by_name['window']._serialized_options = b'\272H\003\310\001\001'
|
89
|
+
_globals['_EXECUTIONREQUEST'].fields_by_name['exec_id']._loaded_options = None
|
90
|
+
_globals['_EXECUTIONREQUEST'].fields_by_name['exec_id']._serialized_options = b'\272H\003\310\001\001'
|
91
|
+
_globals['_EXECUTIONREQUEST'].fields_by_name['window']._loaded_options = None
|
92
|
+
_globals['_EXECUTIONREQUEST'].fields_by_name['window']._serialized_options = b'\272H\003\310\001\001'
|
93
|
+
_globals['_EXECUTIONRESULT'].fields_by_name['exec_id']._loaded_options = None
|
94
|
+
_globals['_EXECUTIONRESULT'].fields_by_name['exec_id']._serialized_options = b'\272H\003\310\001\001'
|
95
|
+
_globals['_EXECUTIONRESULT'].fields_by_name['algorithm_result']._loaded_options = None
|
96
|
+
_globals['_EXECUTIONRESULT'].fields_by_name['algorithm_result']._serialized_options = b'\272H\003\310\001\001'
|
97
|
+
_globals['_ALGORITHMRESULT'].fields_by_name['algorithm']._loaded_options = None
|
98
|
+
_globals['_ALGORITHMRESULT'].fields_by_name['algorithm']._serialized_options = b'\272H\003\310\001\001'
|
99
|
+
_globals['_ALGORITHMRESULT'].fields_by_name['result']._loaded_options = None
|
100
|
+
_globals['_ALGORITHMRESULT'].fields_by_name['result']._serialized_options = b'\272H\003\310\001\001'
|
101
|
+
_globals['_HEALTHCHECKREQUEST'].fields_by_name['timestamp']._loaded_options = None
|
102
|
+
_globals['_HEALTHCHECKREQUEST'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
|
103
|
+
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._loaded_options = None
|
104
|
+
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
105
|
+
_globals['_RESULTSTATUS']._serialized_start=2539
|
106
|
+
_globals['_RESULTSTATUS']._serialized_end=2651
|
107
|
+
_globals['_WINDOW']._serialized_start=71
|
108
|
+
_globals['_WINDOW']._serialized_end=384
|
109
|
+
_globals['_WINDOWTYPE']._serialized_start=386
|
110
|
+
_globals['_WINDOWTYPE']._serialized_end=474
|
111
|
+
_globals['_WINDOWEMITSTATUS']._serialized_start=477
|
112
|
+
_globals['_WINDOWEMITSTATUS']._serialized_end=641
|
113
|
+
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_start=551
|
114
|
+
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_end=641
|
115
|
+
_globals['_ALGORITHMDEPENDENCY']._serialized_start=644
|
116
|
+
_globals['_ALGORITHMDEPENDENCY']._serialized_end=779
|
117
|
+
_globals['_ALGORITHM']._serialized_start=782
|
118
|
+
_globals['_ALGORITHM']._serialized_end=926
|
119
|
+
_globals['_FLOATARRAY']._serialized_start=928
|
120
|
+
_globals['_FLOATARRAY']._serialized_end=956
|
121
|
+
_globals['_RESULT']._serialized_start=959
|
122
|
+
_globals['_RESULT']._serialized_end=1158
|
123
|
+
_globals['_PROCESSORREGISTRATION']._serialized_start=1161
|
124
|
+
_globals['_PROCESSORREGISTRATION']._serialized_end=1313
|
125
|
+
_globals['_PROCESSINGTASK']._serialized_start=1316
|
126
|
+
_globals['_PROCESSINGTASK']._serialized_end=1466
|
127
|
+
_globals['_EXECUTIONREQUEST']._serialized_start=1469
|
128
|
+
_globals['_EXECUTIONREQUEST']._serialized_end=1622
|
129
|
+
_globals['_EXECUTIONRESULT']._serialized_start=1624
|
130
|
+
_globals['_EXECUTIONRESULT']._serialized_end=1718
|
131
|
+
_globals['_ALGORITHMRESULT']._serialized_start=1720
|
132
|
+
_globals['_ALGORITHMRESULT']._serialized_end=1809
|
133
|
+
_globals['_STATUS']._serialized_start=1811
|
134
|
+
_globals['_STATUS']._serialized_end=1854
|
135
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_start=1856
|
136
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_end=1903
|
137
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_start=1906
|
138
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_end=2133
|
139
|
+
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_start=2035
|
140
|
+
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_end=2133
|
141
|
+
_globals['_PROCESSORMETRICS']._serialized_start=2135
|
142
|
+
_globals['_PROCESSORMETRICS']._serialized_end=2242
|
143
|
+
_globals['_WINDOWTYPEREAD']._serialized_start=2244
|
144
|
+
_globals['_WINDOWTYPEREAD']._serialized_end=2260
|
145
|
+
_globals['_WINDOWTYPES']._serialized_start=2262
|
146
|
+
_globals['_WINDOWTYPES']._serialized_end=2305
|
147
|
+
_globals['_ALGORITHMSREAD']._serialized_start=2307
|
148
|
+
_globals['_ALGORITHMSREAD']._serialized_end=2323
|
149
|
+
_globals['_ALGORITHMS']._serialized_start=2325
|
150
|
+
_globals['_ALGORITHMS']._serialized_end=2368
|
151
|
+
_globals['_PROCESSORSREAD']._serialized_start=2370
|
152
|
+
_globals['_PROCESSORSREAD']._serialized_end=2386
|
153
|
+
_globals['_PROCESSORS']._serialized_start=2388
|
154
|
+
_globals['_PROCESSORS']._serialized_end=2486
|
155
|
+
_globals['_PROCESSORS_PROCESSOR']._serialized_start=2444
|
156
|
+
_globals['_PROCESSORS_PROCESSOR']._serialized_end=2486
|
157
|
+
_globals['_RESULTSSTATSREAD']._serialized_start=2488
|
158
|
+
_globals['_RESULTSSTATSREAD']._serialized_end=2506
|
159
|
+
_globals['_RESULTSSTATS']._serialized_start=2508
|
160
|
+
_globals['_RESULTSSTATS']._serialized_end=2537
|
161
|
+
_globals['_ORCACORE']._serialized_start=2654
|
162
|
+
_globals['_ORCACORE']._serialized_end=2960
|
163
|
+
_globals['_ORCAPROCESSOR']._serialized_start=2963
|
164
|
+
_globals['_ORCAPROCESSOR']._serialized_end=3093
|
165
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -18,26 +18,30 @@ RESULT_STATUS_UNHANDLED_FAILED: ResultStatus
|
|
18
18
|
RESULT_STATUS_SUCEEDED: ResultStatus
|
19
19
|
|
20
20
|
class Window(_message.Message):
|
21
|
-
__slots__ = ("time_from", "time_to", "window_type_name", "window_type_version", "origin")
|
21
|
+
__slots__ = ("time_from", "time_to", "window_type_name", "window_type_version", "origin", "metadata")
|
22
22
|
TIME_FROM_FIELD_NUMBER: _ClassVar[int]
|
23
23
|
TIME_TO_FIELD_NUMBER: _ClassVar[int]
|
24
24
|
WINDOW_TYPE_NAME_FIELD_NUMBER: _ClassVar[int]
|
25
25
|
WINDOW_TYPE_VERSION_FIELD_NUMBER: _ClassVar[int]
|
26
26
|
ORIGIN_FIELD_NUMBER: _ClassVar[int]
|
27
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
27
28
|
time_from: int
|
28
29
|
time_to: int
|
29
30
|
window_type_name: str
|
30
31
|
window_type_version: str
|
31
32
|
origin: str
|
32
|
-
|
33
|
+
metadata: _struct_pb2.Struct
|
34
|
+
def __init__(self, time_from: _Optional[int] = ..., time_to: _Optional[int] = ..., window_type_name: _Optional[str] = ..., window_type_version: _Optional[str] = ..., origin: _Optional[str] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
33
35
|
|
34
36
|
class WindowType(_message.Message):
|
35
|
-
__slots__ = ("name", "version")
|
37
|
+
__slots__ = ("name", "version", "description")
|
36
38
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
37
39
|
VERSION_FIELD_NUMBER: _ClassVar[int]
|
40
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
38
41
|
name: str
|
39
42
|
version: str
|
40
|
-
|
43
|
+
description: str
|
44
|
+
def __init__(self, name: _Optional[str] = ..., version: _Optional[str] = ..., description: _Optional[str] = ...) -> None: ...
|
41
45
|
|
42
46
|
class WindowEmitStatus(_message.Message):
|
43
47
|
__slots__ = ("status",)
|
@@ -194,3 +198,50 @@ class ProcessorMetrics(_message.Message):
|
|
194
198
|
cpu_percent: float
|
195
199
|
uptime_seconds: int
|
196
200
|
def __init__(self, active_tasks: _Optional[int] = ..., memory_bytes: _Optional[int] = ..., cpu_percent: _Optional[float] = ..., uptime_seconds: _Optional[int] = ...) -> None: ...
|
201
|
+
|
202
|
+
class WindowTypeRead(_message.Message):
|
203
|
+
__slots__ = ()
|
204
|
+
def __init__(self) -> None: ...
|
205
|
+
|
206
|
+
class WindowTypes(_message.Message):
|
207
|
+
__slots__ = ("windows",)
|
208
|
+
WINDOWS_FIELD_NUMBER: _ClassVar[int]
|
209
|
+
windows: _containers.RepeatedCompositeFieldContainer[WindowType]
|
210
|
+
def __init__(self, windows: _Optional[_Iterable[_Union[WindowType, _Mapping]]] = ...) -> None: ...
|
211
|
+
|
212
|
+
class AlgorithmsRead(_message.Message):
|
213
|
+
__slots__ = ()
|
214
|
+
def __init__(self) -> None: ...
|
215
|
+
|
216
|
+
class Algorithms(_message.Message):
|
217
|
+
__slots__ = ("algorithm",)
|
218
|
+
ALGORITHM_FIELD_NUMBER: _ClassVar[int]
|
219
|
+
algorithm: _containers.RepeatedCompositeFieldContainer[Algorithm]
|
220
|
+
def __init__(self, algorithm: _Optional[_Iterable[_Union[Algorithm, _Mapping]]] = ...) -> None: ...
|
221
|
+
|
222
|
+
class ProcessorsRead(_message.Message):
|
223
|
+
__slots__ = ()
|
224
|
+
def __init__(self) -> None: ...
|
225
|
+
|
226
|
+
class Processors(_message.Message):
|
227
|
+
__slots__ = ("processor",)
|
228
|
+
class Processor(_message.Message):
|
229
|
+
__slots__ = ("name", "runtime")
|
230
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
231
|
+
RUNTIME_FIELD_NUMBER: _ClassVar[int]
|
232
|
+
name: str
|
233
|
+
runtime: str
|
234
|
+
def __init__(self, name: _Optional[str] = ..., runtime: _Optional[str] = ...) -> None: ...
|
235
|
+
PROCESSOR_FIELD_NUMBER: _ClassVar[int]
|
236
|
+
processor: _containers.RepeatedCompositeFieldContainer[Processors.Processor]
|
237
|
+
def __init__(self, processor: _Optional[_Iterable[_Union[Processors.Processor, _Mapping]]] = ...) -> None: ...
|
238
|
+
|
239
|
+
class ResultsStatsRead(_message.Message):
|
240
|
+
__slots__ = ()
|
241
|
+
def __init__(self) -> None: ...
|
242
|
+
|
243
|
+
class ResultsStats(_message.Message):
|
244
|
+
__slots__ = ("Count",)
|
245
|
+
COUNT_FIELD_NUMBER: _ClassVar[int]
|
246
|
+
Count: int
|
247
|
+
def __init__(self, Count: _Optional[int] = ...) -> None: ...
|
@@ -31,6 +31,7 @@ class OrcaCoreStub(object):
|
|
31
31
|
- Coordinates algorithm execution across distributed processors
|
32
32
|
- Tracks DAG dependencies and execution state
|
33
33
|
- Routes results between dependent algorithms
|
34
|
+
------------------- Core operations -------------------
|
34
35
|
"""
|
35
36
|
|
36
37
|
def __init__(self, channel):
|
@@ -49,6 +50,26 @@ class OrcaCoreStub(object):
|
|
49
50
|
request_serializer=service__pb2.Window.SerializeToString,
|
50
51
|
response_deserializer=service__pb2.WindowEmitStatus.FromString,
|
51
52
|
_registered_method=True)
|
53
|
+
self.ReadWindowTypes = channel.unary_unary(
|
54
|
+
'/OrcaCore/ReadWindowTypes',
|
55
|
+
request_serializer=service__pb2.WindowTypeRead.SerializeToString,
|
56
|
+
response_deserializer=service__pb2.WindowTypes.FromString,
|
57
|
+
_registered_method=True)
|
58
|
+
self.ReadAlgorithms = channel.unary_unary(
|
59
|
+
'/OrcaCore/ReadAlgorithms',
|
60
|
+
request_serializer=service__pb2.AlgorithmsRead.SerializeToString,
|
61
|
+
response_deserializer=service__pb2.Algorithms.FromString,
|
62
|
+
_registered_method=True)
|
63
|
+
self.ReadProcessors = channel.unary_unary(
|
64
|
+
'/OrcaCore/ReadProcessors',
|
65
|
+
request_serializer=service__pb2.ProcessorsRead.SerializeToString,
|
66
|
+
response_deserializer=service__pb2.Processors.FromString,
|
67
|
+
_registered_method=True)
|
68
|
+
self.ReadResultsStats = channel.unary_unary(
|
69
|
+
'/OrcaCore/ReadResultsStats',
|
70
|
+
request_serializer=service__pb2.ResultsStatsRead.SerializeToString,
|
71
|
+
response_deserializer=service__pb2.ResultsStats.FromString,
|
72
|
+
_registered_method=True)
|
52
73
|
|
53
74
|
|
54
75
|
class OrcaCoreServicer(object):
|
@@ -57,6 +78,7 @@ class OrcaCoreServicer(object):
|
|
57
78
|
- Coordinates algorithm execution across distributed processors
|
58
79
|
- Tracks DAG dependencies and execution state
|
59
80
|
- Routes results between dependent algorithms
|
81
|
+
------------------- Core operations -------------------
|
60
82
|
"""
|
61
83
|
|
62
84
|
def RegisterProcessor(self, request, context):
|
@@ -73,6 +95,31 @@ class OrcaCoreServicer(object):
|
|
73
95
|
context.set_details('Method not implemented!')
|
74
96
|
raise NotImplementedError('Method not implemented!')
|
75
97
|
|
98
|
+
def ReadWindowTypes(self, request, context):
|
99
|
+
"""------------------- Data operations -------------------
|
100
|
+
"""
|
101
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
102
|
+
context.set_details('Method not implemented!')
|
103
|
+
raise NotImplementedError('Method not implemented!')
|
104
|
+
|
105
|
+
def ReadAlgorithms(self, request, context):
|
106
|
+
"""Missing associated documentation comment in .proto file."""
|
107
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
108
|
+
context.set_details('Method not implemented!')
|
109
|
+
raise NotImplementedError('Method not implemented!')
|
110
|
+
|
111
|
+
def ReadProcessors(self, request, context):
|
112
|
+
"""Missing associated documentation comment in .proto file."""
|
113
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
114
|
+
context.set_details('Method not implemented!')
|
115
|
+
raise NotImplementedError('Method not implemented!')
|
116
|
+
|
117
|
+
def ReadResultsStats(self, request, context):
|
118
|
+
"""Missing associated documentation comment in .proto file."""
|
119
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
120
|
+
context.set_details('Method not implemented!')
|
121
|
+
raise NotImplementedError('Method not implemented!')
|
122
|
+
|
76
123
|
|
77
124
|
def add_OrcaCoreServicer_to_server(servicer, server):
|
78
125
|
rpc_method_handlers = {
|
@@ -86,6 +133,26 @@ def add_OrcaCoreServicer_to_server(servicer, server):
|
|
86
133
|
request_deserializer=service__pb2.Window.FromString,
|
87
134
|
response_serializer=service__pb2.WindowEmitStatus.SerializeToString,
|
88
135
|
),
|
136
|
+
'ReadWindowTypes': grpc.unary_unary_rpc_method_handler(
|
137
|
+
servicer.ReadWindowTypes,
|
138
|
+
request_deserializer=service__pb2.WindowTypeRead.FromString,
|
139
|
+
response_serializer=service__pb2.WindowTypes.SerializeToString,
|
140
|
+
),
|
141
|
+
'ReadAlgorithms': grpc.unary_unary_rpc_method_handler(
|
142
|
+
servicer.ReadAlgorithms,
|
143
|
+
request_deserializer=service__pb2.AlgorithmsRead.FromString,
|
144
|
+
response_serializer=service__pb2.Algorithms.SerializeToString,
|
145
|
+
),
|
146
|
+
'ReadProcessors': grpc.unary_unary_rpc_method_handler(
|
147
|
+
servicer.ReadProcessors,
|
148
|
+
request_deserializer=service__pb2.ProcessorsRead.FromString,
|
149
|
+
response_serializer=service__pb2.Processors.SerializeToString,
|
150
|
+
),
|
151
|
+
'ReadResultsStats': grpc.unary_unary_rpc_method_handler(
|
152
|
+
servicer.ReadResultsStats,
|
153
|
+
request_deserializer=service__pb2.ResultsStatsRead.FromString,
|
154
|
+
response_serializer=service__pb2.ResultsStats.SerializeToString,
|
155
|
+
),
|
89
156
|
}
|
90
157
|
generic_handler = grpc.method_handlers_generic_handler(
|
91
158
|
'OrcaCore', rpc_method_handlers)
|
@@ -100,6 +167,7 @@ class OrcaCore(object):
|
|
100
167
|
- Coordinates algorithm execution across distributed processors
|
101
168
|
- Tracks DAG dependencies and execution state
|
102
169
|
- Routes results between dependent algorithms
|
170
|
+
------------------- Core operations -------------------
|
103
171
|
"""
|
104
172
|
|
105
173
|
@staticmethod
|
@@ -156,6 +224,114 @@ class OrcaCore(object):
|
|
156
224
|
metadata,
|
157
225
|
_registered_method=True)
|
158
226
|
|
227
|
+
@staticmethod
|
228
|
+
def ReadWindowTypes(request,
|
229
|
+
target,
|
230
|
+
options=(),
|
231
|
+
channel_credentials=None,
|
232
|
+
call_credentials=None,
|
233
|
+
insecure=False,
|
234
|
+
compression=None,
|
235
|
+
wait_for_ready=None,
|
236
|
+
timeout=None,
|
237
|
+
metadata=None):
|
238
|
+
return grpc.experimental.unary_unary(
|
239
|
+
request,
|
240
|
+
target,
|
241
|
+
'/OrcaCore/ReadWindowTypes',
|
242
|
+
service__pb2.WindowTypeRead.SerializeToString,
|
243
|
+
service__pb2.WindowTypes.FromString,
|
244
|
+
options,
|
245
|
+
channel_credentials,
|
246
|
+
insecure,
|
247
|
+
call_credentials,
|
248
|
+
compression,
|
249
|
+
wait_for_ready,
|
250
|
+
timeout,
|
251
|
+
metadata,
|
252
|
+
_registered_method=True)
|
253
|
+
|
254
|
+
@staticmethod
|
255
|
+
def ReadAlgorithms(request,
|
256
|
+
target,
|
257
|
+
options=(),
|
258
|
+
channel_credentials=None,
|
259
|
+
call_credentials=None,
|
260
|
+
insecure=False,
|
261
|
+
compression=None,
|
262
|
+
wait_for_ready=None,
|
263
|
+
timeout=None,
|
264
|
+
metadata=None):
|
265
|
+
return grpc.experimental.unary_unary(
|
266
|
+
request,
|
267
|
+
target,
|
268
|
+
'/OrcaCore/ReadAlgorithms',
|
269
|
+
service__pb2.AlgorithmsRead.SerializeToString,
|
270
|
+
service__pb2.Algorithms.FromString,
|
271
|
+
options,
|
272
|
+
channel_credentials,
|
273
|
+
insecure,
|
274
|
+
call_credentials,
|
275
|
+
compression,
|
276
|
+
wait_for_ready,
|
277
|
+
timeout,
|
278
|
+
metadata,
|
279
|
+
_registered_method=True)
|
280
|
+
|
281
|
+
@staticmethod
|
282
|
+
def ReadProcessors(request,
|
283
|
+
target,
|
284
|
+
options=(),
|
285
|
+
channel_credentials=None,
|
286
|
+
call_credentials=None,
|
287
|
+
insecure=False,
|
288
|
+
compression=None,
|
289
|
+
wait_for_ready=None,
|
290
|
+
timeout=None,
|
291
|
+
metadata=None):
|
292
|
+
return grpc.experimental.unary_unary(
|
293
|
+
request,
|
294
|
+
target,
|
295
|
+
'/OrcaCore/ReadProcessors',
|
296
|
+
service__pb2.ProcessorsRead.SerializeToString,
|
297
|
+
service__pb2.Processors.FromString,
|
298
|
+
options,
|
299
|
+
channel_credentials,
|
300
|
+
insecure,
|
301
|
+
call_credentials,
|
302
|
+
compression,
|
303
|
+
wait_for_ready,
|
304
|
+
timeout,
|
305
|
+
metadata,
|
306
|
+
_registered_method=True)
|
307
|
+
|
308
|
+
@staticmethod
|
309
|
+
def ReadResultsStats(request,
|
310
|
+
target,
|
311
|
+
options=(),
|
312
|
+
channel_credentials=None,
|
313
|
+
call_credentials=None,
|
314
|
+
insecure=False,
|
315
|
+
compression=None,
|
316
|
+
wait_for_ready=None,
|
317
|
+
timeout=None,
|
318
|
+
metadata=None):
|
319
|
+
return grpc.experimental.unary_unary(
|
320
|
+
request,
|
321
|
+
target,
|
322
|
+
'/OrcaCore/ReadResultsStats',
|
323
|
+
service__pb2.ResultsStatsRead.SerializeToString,
|
324
|
+
service__pb2.ResultsStats.FromString,
|
325
|
+
options,
|
326
|
+
channel_credentials,
|
327
|
+
insecure,
|
328
|
+
call_credentials,
|
329
|
+
compression,
|
330
|
+
wait_for_ready,
|
331
|
+
timeout,
|
332
|
+
metadata,
|
333
|
+
_registered_method=True)
|
334
|
+
|
159
335
|
|
160
336
|
class OrcaProcessorStub(object):
|
161
337
|
"""OrcaProcessor defines the interface that each processing node must implement.
|
@@ -31,7 +31,7 @@ from typing import (
|
|
31
31
|
AsyncGenerator,
|
32
32
|
)
|
33
33
|
from concurrent import futures
|
34
|
-
from dataclasses import dataclass
|
34
|
+
from dataclasses import field, dataclass
|
35
35
|
|
36
36
|
import grpc
|
37
37
|
import service_pb2 as pb
|
@@ -55,6 +55,25 @@ T = TypeVar("T", bound=AlgorithmFn)
|
|
55
55
|
LOGGER = logging.getLogger(__name__)
|
56
56
|
|
57
57
|
|
58
|
+
@dataclass
|
59
|
+
class WindowType:
|
60
|
+
name: str
|
61
|
+
version: str
|
62
|
+
description: str
|
63
|
+
|
64
|
+
def __post__init__(self) -> None:
|
65
|
+
if not re.match(WINDOW_NAME, self.name):
|
66
|
+
raise InvalidAlgorithmArgument(
|
67
|
+
f"Window name '{self.name}' must be in PascalCase"
|
68
|
+
)
|
69
|
+
|
70
|
+
if not re.match(SEMVER_PATTERN, self.version):
|
71
|
+
raise InvalidAlgorithmArgument(
|
72
|
+
f"Window version '{self.version}' must follow basic semantic "
|
73
|
+
"versioning (e.g., '1.0.0') without release portions"
|
74
|
+
)
|
75
|
+
|
76
|
+
|
58
77
|
@dataclass
|
59
78
|
class Window:
|
60
79
|
time_from: int
|
@@ -62,6 +81,7 @@ class Window:
|
|
62
81
|
name: str
|
63
82
|
version: str
|
64
83
|
origin: str
|
84
|
+
metadata: Dict[str, Any] = field(default_factory=dict)
|
65
85
|
|
66
86
|
|
67
87
|
def EmitWindow(window: Window) -> None:
|
@@ -80,6 +100,11 @@ def EmitWindow(window: Window) -> None:
|
|
80
100
|
window_pb.window_type_version = window.version
|
81
101
|
window_pb.origin = window.origin
|
82
102
|
|
103
|
+
# parse out the metadata
|
104
|
+
struct_value = struct_pb2.Struct()
|
105
|
+
json_format.ParseDict(window.metadata, struct_value)
|
106
|
+
window_pb.metadata = struct_value
|
107
|
+
|
83
108
|
with grpc.insecure_channel(envs.ORCASERVER) as channel:
|
84
109
|
stub = service_pb2_grpc.OrcaCoreStub(channel)
|
85
110
|
response = stub.EmitWindow(window_pb)
|
@@ -105,6 +130,7 @@ class Algorithm:
|
|
105
130
|
version: str
|
106
131
|
window_name: str
|
107
132
|
window_version: str
|
133
|
+
window_description: str
|
108
134
|
exec_fn: AlgorithmFn
|
109
135
|
processor: str
|
110
136
|
runtime: str
|
@@ -503,6 +529,7 @@ class Processor(OrcaProcessorServicer): # type: ignore
|
|
503
529
|
# Add window type
|
504
530
|
algo_msg.window_type.name = algorithm.window_name
|
505
531
|
algo_msg.window_type.version = algorithm.window_version
|
532
|
+
algo_msg.window_type.description = algorithm.window_description
|
506
533
|
|
507
534
|
# Add dependencies if they exist
|
508
535
|
if algorithm.full_name in self._algorithmsSingleton._dependencies:
|
@@ -579,8 +606,7 @@ class Processor(OrcaProcessorServicer): # type: ignore
|
|
579
606
|
self,
|
580
607
|
name: str,
|
581
608
|
version: str,
|
582
|
-
|
583
|
-
window_version: str,
|
609
|
+
window_type: WindowType,
|
584
610
|
depends_on: List[Callable[..., Any]] = [],
|
585
611
|
) -> Callable[[T], T]:
|
586
612
|
"""
|
@@ -589,10 +615,8 @@ class Processor(OrcaProcessorServicer): # type: ignore
|
|
589
615
|
Args:
|
590
616
|
name (str): Algorithm name (PascalCase).
|
591
617
|
version (str): Semantic version (e.g., "1.0.0").
|
592
|
-
|
593
|
-
window_version (str): Semantic version of the window.
|
618
|
+
window_type (WindowType): Triggering window type
|
594
619
|
depends_on (List[Callable]): List of dependent algorithm functions.
|
595
|
-
|
596
620
|
Returns:
|
597
621
|
Callable[[T], T]: The decorated function.
|
598
622
|
|
@@ -611,17 +635,6 @@ class Processor(OrcaProcessorServicer): # type: ignore
|
|
611
635
|
"versioning (e.g., '1.0.0') without release portions"
|
612
636
|
)
|
613
637
|
|
614
|
-
if not re.match(WINDOW_NAME, window_name):
|
615
|
-
raise InvalidAlgorithmArgument(
|
616
|
-
f"Window name '{window_name}' must be in PascalCase"
|
617
|
-
)
|
618
|
-
|
619
|
-
if not re.match(SEMVER_PATTERN, window_version):
|
620
|
-
raise InvalidAlgorithmArgument(
|
621
|
-
f"Window version '{window_version}' must follow basic semantic "
|
622
|
-
"versioning (e.g., '1.0.0') without release portions"
|
623
|
-
)
|
624
|
-
|
625
638
|
def inner(algo: T) -> T:
|
626
639
|
def wrapper(
|
627
640
|
dependency_values: Dict[str, Any] | None = None,
|
@@ -654,8 +667,9 @@ class Processor(OrcaProcessorServicer): # type: ignore
|
|
654
667
|
algorithm = Algorithm(
|
655
668
|
name=name,
|
656
669
|
version=version,
|
657
|
-
window_name=
|
658
|
-
window_version=
|
670
|
+
window_name=window_type.name,
|
671
|
+
window_version=window_type.version,
|
672
|
+
window_description=window_type.description,
|
659
673
|
exec_fn=wrapper,
|
660
674
|
processor=self._name,
|
661
675
|
runtime=sys.version,
|
@@ -1,145 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
-
# source: service.proto
|
5
|
-
# Protobuf Python Version: 5.29.0
|
6
|
-
"""Generated protocol buffer code."""
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
11
|
-
from google.protobuf.internal import builder as _builder
|
12
|
-
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
-
_runtime_version.Domain.PUBLIC,
|
14
|
-
5,
|
15
|
-
29,
|
16
|
-
0,
|
17
|
-
'',
|
18
|
-
'service.proto'
|
19
|
-
)
|
20
|
-
# @@protoc_insertion_point(imports)
|
21
|
-
|
22
|
-
_sym_db = _symbol_database.Default()
|
23
|
-
|
24
|
-
|
25
|
-
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
26
|
-
from vendor import validate_pb2 as vendor_dot_validate__pb2
|
27
|
-
|
28
|
-
|
29
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15vendor/validate.proto\"\x8e\x02\n\x06Window\x12\x1d\n\ttime_from\x18\x01 \x01(\x04\x42\n\xbaH\x07\x32\x02 \x00\xc8\x01\x01\x12\x17\n\x07time_to\x18\x02 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x01\x12 \n\x10window_type_name\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12#\n\x13window_type_version\x18\x04 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x16\n\x06origin\x18\x05 \x01(\tB\x06\xbaH\x03\xc8\x01\x01:m\xbaHj\x1ah\n\x0ewindow.time_to\x12\x36`time_to` must be greater than or equal to `time_from`\x1a\x1ethis.time_to >= this.time_from\";\n\nWindowType\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\"\xa4\x01\n\x10WindowEmitStatus\x12\x34\n\x06status\x18\x01 \x01(\x0e\x32\x1c.WindowEmitStatus.StatusEnumB\x06\xbaH\x03\xc8\x01\x01\"Z\n\nStatusEnum\x12\x1b\n\x17NO_TRIGGERED_ALGORITHMS\x10\x00\x12\x18\n\x14PROCESSING_TRIGGERED\x10\x01\x12\x15\n\x11TRIGGERING_FAILED\x10\x02\"\x87\x01\n\x13\x41lgorithmDependency\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1e\n\x0eprocessor_name\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12!\n\x11processor_runtime\x18\x04 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\"\x90\x01\n\tAlgorithm\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07version\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12(\n\x0bwindow_type\x18\x03 \x01(\x0b\x32\x0b.WindowTypeB\x06\xbaH\x03\xc8\x01\x01\x12*\n\x0c\x64\x65pendencies\x18\x04 \x03(\x0b\x32\x14.AlgorithmDependency\"\x1c\n\nFloatArray\x12\x0e\n\x06values\x18\x01 \x03(\x02\"\xc7\x01\n\x06Result\x12%\n\x06status\x18\x01 \x01(\x0e\x32\r.ResultStatusB\x06\xbaH\x03\xc8\x01\x01\x12\x16\n\x0csingle_value\x18\x02 \x01(\x02H\x00\x12#\n\x0c\x66loat_values\x18\x03 \x01(\x0b\x32\x0b.FloatArrayH\x00\x12/\n\x0cstruct_value\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x19\n\ttimestamp\x18\x05 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01\x42\r\n\x0bresult_data\"\x98\x01\n\x15ProcessorRegistration\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x17\n\x07runtime\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1e\n\x0e\x63onnection_str\x18\x03 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x30\n\x14supported_algorithms\x18\x04 \x03(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\"\x96\x01\n\x0eProcessingTask\x12\x17\n\x07task_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12%\n\talgorithm\x18\x02 \x01(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06window\x18\x03 \x01(\x0b\x32\x07.WindowB\x06\xbaH\x03\xc8\x01\x01\x12#\n\x12\x64\x65pendency_results\x18\x04 \x03(\x0b\x32\x07.Result\"\x99\x01\n\x10\x45xecutionRequest\x12\x17\n\x07\x65xec_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06window\x18\x02 \x01(\x0b\x32\x07.WindowB\x06\xbaH\x03\xc8\x01\x01\x12+\n\x11\x61lgorithm_results\x18\x03 \x03(\x0b\x32\x10.AlgorithmResult\x12\x1e\n\nalgorithms\x18\x04 \x03(\x0b\x32\n.Algorithm\"^\n\x0f\x45xecutionResult\x12\x17\n\x07\x65xec_id\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01\x12\x32\n\x10\x61lgorithm_result\x18\x03 \x01(\x0b\x32\x10.AlgorithmResultB\x06\xbaH\x03\xc8\x01\x01\"Y\n\x0f\x41lgorithmResult\x12%\n\talgorithm\x18\x01 \x01(\x0b\x32\n.AlgorithmB\x06\xbaH\x03\xc8\x01\x01\x12\x1f\n\x06result\x18\x02 \x01(\x0b\x32\x07.ResultB\x06\xbaH\x03\xc8\x01\x01\"+\n\x06Status\x12\x10\n\x08received\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"/\n\x12HealthCheckRequest\x12\x19\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01\"\xe3\x01\n\x13HealthCheckResponse\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32\x1b.HealthCheckResponse.StatusB\x06\xbaH\x03\xc8\x01\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x07metrics\x18\x03 \x01(\x0b\x32\x11.ProcessorMetrics\"b\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x12\n\x0eSTATUS_SERVING\x10\x01\x12\x18\n\x14STATUS_TRANSITIONING\x10\x02\x12\x16\n\x12STATUS_NOT_SERVING\x10\x03\"k\n\x10ProcessorMetrics\x12\x14\n\x0c\x61\x63tive_tasks\x18\x01 \x01(\x05\x12\x14\n\x0cmemory_bytes\x18\x02 \x01(\x03\x12\x13\n\x0b\x63pu_percent\x18\x03 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x04 \x01(\x03*p\n\x0cResultStatus\x12 \n\x1cRESULT_STATUS_HANDLED_FAILED\x10\x00\x12\"\n\x1eRESULT_STATUS_UNHANDLED_FAILED\x10\x01\x12\x1a\n\x16RESULT_STATUS_SUCEEDED\x10\x02\x32j\n\x08OrcaCore\x12\x34\n\x11RegisterProcessor\x12\x16.ProcessorRegistration\x1a\x07.Status\x12(\n\nEmitWindow\x12\x07.Window\x1a\x11.WindowEmitStatus2\x82\x01\n\rOrcaProcessor\x12\x37\n\x0e\x45xecuteDagPart\x12\x11.ExecutionRequest\x1a\x10.ExecutionResult0\x01\x12\x38\n\x0bHealthCheck\x12\x13.HealthCheckRequest\x1a\x14.HealthCheckResponseB\'Z%github.com/predixus/orca/protobufs/gob\x06proto3')
|
30
|
-
|
31
|
-
_globals = globals()
|
32
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
33
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service_pb2', _globals)
|
34
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
35
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
36
|
-
_globals['DESCRIPTOR']._serialized_options = b'Z%github.com/predixus/orca/protobufs/go'
|
37
|
-
_globals['_WINDOW'].fields_by_name['time_from']._loaded_options = None
|
38
|
-
_globals['_WINDOW'].fields_by_name['time_from']._serialized_options = b'\272H\0072\002 \000\310\001\001'
|
39
|
-
_globals['_WINDOW'].fields_by_name['time_to']._loaded_options = None
|
40
|
-
_globals['_WINDOW'].fields_by_name['time_to']._serialized_options = b'\272H\003\310\001\001'
|
41
|
-
_globals['_WINDOW'].fields_by_name['window_type_name']._loaded_options = None
|
42
|
-
_globals['_WINDOW'].fields_by_name['window_type_name']._serialized_options = b'\272H\003\310\001\001'
|
43
|
-
_globals['_WINDOW'].fields_by_name['window_type_version']._loaded_options = None
|
44
|
-
_globals['_WINDOW'].fields_by_name['window_type_version']._serialized_options = b'\272H\003\310\001\001'
|
45
|
-
_globals['_WINDOW'].fields_by_name['origin']._loaded_options = None
|
46
|
-
_globals['_WINDOW'].fields_by_name['origin']._serialized_options = b'\272H\003\310\001\001'
|
47
|
-
_globals['_WINDOW']._loaded_options = None
|
48
|
-
_globals['_WINDOW']._serialized_options = b'\272Hj\032h\n\016window.time_to\0226`time_to` must be greater than or equal to `time_from`\032\036this.time_to >= this.time_from'
|
49
|
-
_globals['_WINDOWTYPE'].fields_by_name['name']._loaded_options = None
|
50
|
-
_globals['_WINDOWTYPE'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
51
|
-
_globals['_WINDOWTYPE'].fields_by_name['version']._loaded_options = None
|
52
|
-
_globals['_WINDOWTYPE'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
53
|
-
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._loaded_options = None
|
54
|
-
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
55
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['name']._loaded_options = None
|
56
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
57
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['version']._loaded_options = None
|
58
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
59
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_name']._loaded_options = None
|
60
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_name']._serialized_options = b'\272H\003\310\001\001'
|
61
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_runtime']._loaded_options = None
|
62
|
-
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['processor_runtime']._serialized_options = b'\272H\003\310\001\001'
|
63
|
-
_globals['_ALGORITHM'].fields_by_name['name']._loaded_options = None
|
64
|
-
_globals['_ALGORITHM'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
65
|
-
_globals['_ALGORITHM'].fields_by_name['version']._loaded_options = None
|
66
|
-
_globals['_ALGORITHM'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
|
67
|
-
_globals['_ALGORITHM'].fields_by_name['window_type']._loaded_options = None
|
68
|
-
_globals['_ALGORITHM'].fields_by_name['window_type']._serialized_options = b'\272H\003\310\001\001'
|
69
|
-
_globals['_RESULT'].fields_by_name['status']._loaded_options = None
|
70
|
-
_globals['_RESULT'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
71
|
-
_globals['_RESULT'].fields_by_name['timestamp']._loaded_options = None
|
72
|
-
_globals['_RESULT'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
|
73
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['name']._loaded_options = None
|
74
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
75
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['runtime']._loaded_options = None
|
76
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['runtime']._serialized_options = b'\272H\003\310\001\001'
|
77
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['connection_str']._loaded_options = None
|
78
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['connection_str']._serialized_options = b'\272H\003\310\001\001'
|
79
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['supported_algorithms']._loaded_options = None
|
80
|
-
_globals['_PROCESSORREGISTRATION'].fields_by_name['supported_algorithms']._serialized_options = b'\272H\003\310\001\001'
|
81
|
-
_globals['_PROCESSINGTASK'].fields_by_name['task_id']._loaded_options = None
|
82
|
-
_globals['_PROCESSINGTASK'].fields_by_name['task_id']._serialized_options = b'\272H\003\310\001\001'
|
83
|
-
_globals['_PROCESSINGTASK'].fields_by_name['algorithm']._loaded_options = None
|
84
|
-
_globals['_PROCESSINGTASK'].fields_by_name['algorithm']._serialized_options = b'\272H\003\310\001\001'
|
85
|
-
_globals['_PROCESSINGTASK'].fields_by_name['window']._loaded_options = None
|
86
|
-
_globals['_PROCESSINGTASK'].fields_by_name['window']._serialized_options = b'\272H\003\310\001\001'
|
87
|
-
_globals['_EXECUTIONREQUEST'].fields_by_name['exec_id']._loaded_options = None
|
88
|
-
_globals['_EXECUTIONREQUEST'].fields_by_name['exec_id']._serialized_options = b'\272H\003\310\001\001'
|
89
|
-
_globals['_EXECUTIONREQUEST'].fields_by_name['window']._loaded_options = None
|
90
|
-
_globals['_EXECUTIONREQUEST'].fields_by_name['window']._serialized_options = b'\272H\003\310\001\001'
|
91
|
-
_globals['_EXECUTIONRESULT'].fields_by_name['exec_id']._loaded_options = None
|
92
|
-
_globals['_EXECUTIONRESULT'].fields_by_name['exec_id']._serialized_options = b'\272H\003\310\001\001'
|
93
|
-
_globals['_EXECUTIONRESULT'].fields_by_name['algorithm_result']._loaded_options = None
|
94
|
-
_globals['_EXECUTIONRESULT'].fields_by_name['algorithm_result']._serialized_options = b'\272H\003\310\001\001'
|
95
|
-
_globals['_ALGORITHMRESULT'].fields_by_name['algorithm']._loaded_options = None
|
96
|
-
_globals['_ALGORITHMRESULT'].fields_by_name['algorithm']._serialized_options = b'\272H\003\310\001\001'
|
97
|
-
_globals['_ALGORITHMRESULT'].fields_by_name['result']._loaded_options = None
|
98
|
-
_globals['_ALGORITHMRESULT'].fields_by_name['result']._serialized_options = b'\272H\003\310\001\001'
|
99
|
-
_globals['_HEALTHCHECKREQUEST'].fields_by_name['timestamp']._loaded_options = None
|
100
|
-
_globals['_HEALTHCHECKREQUEST'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
|
101
|
-
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._loaded_options = None
|
102
|
-
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
103
|
-
_globals['_RESULTSTATUS']._serialized_start=2172
|
104
|
-
_globals['_RESULTSTATUS']._serialized_end=2284
|
105
|
-
_globals['_WINDOW']._serialized_start=71
|
106
|
-
_globals['_WINDOW']._serialized_end=341
|
107
|
-
_globals['_WINDOWTYPE']._serialized_start=343
|
108
|
-
_globals['_WINDOWTYPE']._serialized_end=402
|
109
|
-
_globals['_WINDOWEMITSTATUS']._serialized_start=405
|
110
|
-
_globals['_WINDOWEMITSTATUS']._serialized_end=569
|
111
|
-
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_start=479
|
112
|
-
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_end=569
|
113
|
-
_globals['_ALGORITHMDEPENDENCY']._serialized_start=572
|
114
|
-
_globals['_ALGORITHMDEPENDENCY']._serialized_end=707
|
115
|
-
_globals['_ALGORITHM']._serialized_start=710
|
116
|
-
_globals['_ALGORITHM']._serialized_end=854
|
117
|
-
_globals['_FLOATARRAY']._serialized_start=856
|
118
|
-
_globals['_FLOATARRAY']._serialized_end=884
|
119
|
-
_globals['_RESULT']._serialized_start=887
|
120
|
-
_globals['_RESULT']._serialized_end=1086
|
121
|
-
_globals['_PROCESSORREGISTRATION']._serialized_start=1089
|
122
|
-
_globals['_PROCESSORREGISTRATION']._serialized_end=1241
|
123
|
-
_globals['_PROCESSINGTASK']._serialized_start=1244
|
124
|
-
_globals['_PROCESSINGTASK']._serialized_end=1394
|
125
|
-
_globals['_EXECUTIONREQUEST']._serialized_start=1397
|
126
|
-
_globals['_EXECUTIONREQUEST']._serialized_end=1550
|
127
|
-
_globals['_EXECUTIONRESULT']._serialized_start=1552
|
128
|
-
_globals['_EXECUTIONRESULT']._serialized_end=1646
|
129
|
-
_globals['_ALGORITHMRESULT']._serialized_start=1648
|
130
|
-
_globals['_ALGORITHMRESULT']._serialized_end=1737
|
131
|
-
_globals['_STATUS']._serialized_start=1739
|
132
|
-
_globals['_STATUS']._serialized_end=1782
|
133
|
-
_globals['_HEALTHCHECKREQUEST']._serialized_start=1784
|
134
|
-
_globals['_HEALTHCHECKREQUEST']._serialized_end=1831
|
135
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_start=1834
|
136
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_end=2061
|
137
|
-
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_start=1963
|
138
|
-
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_end=2061
|
139
|
-
_globals['_PROCESSORMETRICS']._serialized_start=2063
|
140
|
-
_globals['_PROCESSORMETRICS']._serialized_end=2170
|
141
|
-
_globals['_ORCACORE']._serialized_start=2286
|
142
|
-
_globals['_ORCACORE']._serialized_end=2392
|
143
|
-
_globals['_ORCAPROCESSOR']._serialized_start=2395
|
144
|
-
_globals['_ORCAPROCESSOR']._serialized_end=2525
|
145
|
-
# @@protoc_insertion_point(module_scope)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{orca_python-0.2.0 → orca_python-0.4.0}/orca/core/protobufs/python/vendor/validate_pb2_grpc.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|