orca-python 0.2.0__py3-none-any.whl → 0.4.0__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.
- orca_python/__init__.py +2 -2
- orca_python/main.py +33 -19
- {orca_python-0.2.0.dist-info → orca_python-0.4.0.dist-info}/METADATA +1 -1
- {orca_python-0.2.0.dist-info → orca_python-0.4.0.dist-info}/RECORD +9 -9
- service_pb2.py +62 -42
- service_pb2.pyi +55 -4
- service_pb2_grpc.py +176 -0
- {orca_python-0.2.0.dist-info → orca_python-0.4.0.dist-info}/LICENSE +0 -0
- {orca_python-0.2.0.dist-info → orca_python-0.4.0.dist-info}/WHEEL +0 -0
orca_python/__init__.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
from orca_python.main import Window, Processor, EmitWindow
|
1
|
+
from orca_python.main import Window, Processor, EmitWindow, WindowType
|
2
2
|
|
3
|
-
__all__ = ["Processor", "EmitWindow", "Window"]
|
3
|
+
__all__ = ["Processor", "EmitWindow", "Window", "WindowType"]
|
orca_python/main.py
CHANGED
@@ -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,17 +1,17 @@
|
|
1
1
|
__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
service_pb2.py,sha256=
|
3
|
-
service_pb2.pyi,sha256=
|
4
|
-
service_pb2_grpc.py,sha256=
|
2
|
+
service_pb2.py,sha256=O9Z-UawI0OCuztUEooLmDwx-FMwnTnhKswx3sH1fuGY,16422
|
3
|
+
service_pb2.pyi,sha256=aM7M31KZljN9OMFh1MIkyhEWl8xglhq5NKsV1G06Rpw,11724
|
4
|
+
service_pb2_grpc.py,sha256=fh82JLm4Y0wOOabMfbrP2qoq7QJ67CRE3Xs9Igqp7ns,17598
|
5
5
|
vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
vendor/validate_pb2.py,sha256=lyYYFtGDzHjs9ZHMUnQLcE_G5qYWfOluts0gm6m1D88,149437
|
7
7
|
vendor/validate_pb2.pyi,sha256=Qyebm_XUdrvo8As3XovHu7vVsHXYJtTdP3bYUmQEecs,30245
|
8
8
|
vendor/validate_pb2_grpc.py,sha256=qIlTS0MGHE7myQ7tCMbS-pPqA9FMZl_Hn9Mh_uq2o9o,896
|
9
|
-
orca_python/__init__.py,sha256=
|
9
|
+
orca_python/__init__.py,sha256=Fg7IF5jObpFBAwZi_OtVY4_6w4sE87HnEaO07XgyLpQ,134
|
10
10
|
orca_python/envs.py,sha256=zSuukNSpEw78VpSSIDAA9KRAurWedQMwx1qyQg9f8pk,560
|
11
11
|
orca_python/exceptions.py,sha256=Z9iJg6tKpnrNhDxQlVvG5xpgjGbaiMNAeFkwMonM-PM,390
|
12
|
-
orca_python/main.py,sha256=
|
12
|
+
orca_python/main.py,sha256=lid_8Pj6y240Oqj45q_gASMOYLjENNRYatdqNG3LtV8,25735
|
13
13
|
orca_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
-
orca_python-0.
|
15
|
-
orca_python-0.
|
16
|
-
orca_python-0.
|
17
|
-
orca_python-0.
|
14
|
+
orca_python-0.4.0.dist-info/LICENSE,sha256=sxb8X8qhbZ_JaCBFmoIriJzA-jelKmh86sAKQsIRN_I,1062
|
15
|
+
orca_python-0.4.0.dist-info/METADATA,sha256=UXLD9lnYUIyh8v1YDaxo9-8KMw5FlmJJmVQnkF-lhig,3019
|
16
|
+
orca_python-0.4.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
17
|
+
orca_python-0.4.0.dist-info/RECORD,,
|
service_pb2.py
CHANGED
@@ -26,7 +26,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
26
|
from vendor import validate_pb2 as vendor_dot_validate__pb2
|
27
27
|
|
28
28
|
|
29
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15vendor/validate.proto\"\
|
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
30
|
|
31
31
|
_globals = globals()
|
32
32
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -50,6 +50,8 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
50
50
|
_globals['_WINDOWTYPE'].fields_by_name['name']._serialized_options = b'\272H\003\310\001\001'
|
51
51
|
_globals['_WINDOWTYPE'].fields_by_name['version']._loaded_options = None
|
52
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'
|
53
55
|
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._loaded_options = None
|
54
56
|
_globals['_WINDOWEMITSTATUS'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
55
57
|
_globals['_ALGORITHMDEPENDENCY'].fields_by_name['name']._loaded_options = None
|
@@ -100,46 +102,64 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
100
102
|
_globals['_HEALTHCHECKREQUEST'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
|
101
103
|
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._loaded_options = None
|
102
104
|
_globals['_HEALTHCHECKRESPONSE'].fields_by_name['status']._serialized_options = b'\272H\003\310\001\001'
|
103
|
-
_globals['_RESULTSTATUS']._serialized_start=
|
104
|
-
_globals['_RESULTSTATUS']._serialized_end=
|
105
|
+
_globals['_RESULTSTATUS']._serialized_start=2539
|
106
|
+
_globals['_RESULTSTATUS']._serialized_end=2651
|
105
107
|
_globals['_WINDOW']._serialized_start=71
|
106
|
-
_globals['_WINDOW']._serialized_end=
|
107
|
-
_globals['_WINDOWTYPE']._serialized_start=
|
108
|
-
_globals['_WINDOWTYPE']._serialized_end=
|
109
|
-
_globals['_WINDOWEMITSTATUS']._serialized_start=
|
110
|
-
_globals['_WINDOWEMITSTATUS']._serialized_end=
|
111
|
-
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_start=
|
112
|
-
_globals['_WINDOWEMITSTATUS_STATUSENUM']._serialized_end=
|
113
|
-
_globals['_ALGORITHMDEPENDENCY']._serialized_start=
|
114
|
-
_globals['_ALGORITHMDEPENDENCY']._serialized_end=
|
115
|
-
_globals['_ALGORITHM']._serialized_start=
|
116
|
-
_globals['_ALGORITHM']._serialized_end=
|
117
|
-
_globals['_FLOATARRAY']._serialized_start=
|
118
|
-
_globals['_FLOATARRAY']._serialized_end=
|
119
|
-
_globals['_RESULT']._serialized_start=
|
120
|
-
_globals['_RESULT']._serialized_end=
|
121
|
-
_globals['_PROCESSORREGISTRATION']._serialized_start=
|
122
|
-
_globals['_PROCESSORREGISTRATION']._serialized_end=
|
123
|
-
_globals['_PROCESSINGTASK']._serialized_start=
|
124
|
-
_globals['_PROCESSINGTASK']._serialized_end=
|
125
|
-
_globals['_EXECUTIONREQUEST']._serialized_start=
|
126
|
-
_globals['_EXECUTIONREQUEST']._serialized_end=
|
127
|
-
_globals['_EXECUTIONRESULT']._serialized_start=
|
128
|
-
_globals['_EXECUTIONRESULT']._serialized_end=
|
129
|
-
_globals['_ALGORITHMRESULT']._serialized_start=
|
130
|
-
_globals['_ALGORITHMRESULT']._serialized_end=
|
131
|
-
_globals['_STATUS']._serialized_start=
|
132
|
-
_globals['_STATUS']._serialized_end=
|
133
|
-
_globals['_HEALTHCHECKREQUEST']._serialized_start=
|
134
|
-
_globals['_HEALTHCHECKREQUEST']._serialized_end=
|
135
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_start=
|
136
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_end=
|
137
|
-
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_start=
|
138
|
-
_globals['_HEALTHCHECKRESPONSE_STATUS']._serialized_end=
|
139
|
-
_globals['_PROCESSORMETRICS']._serialized_start=
|
140
|
-
_globals['_PROCESSORMETRICS']._serialized_end=
|
141
|
-
_globals['
|
142
|
-
_globals['
|
143
|
-
_globals['
|
144
|
-
_globals['
|
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
|
145
165
|
# @@protoc_insertion_point(module_scope)
|
service_pb2.pyi
CHANGED
@@ -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: ...
|
service_pb2_grpc.py
CHANGED
@@ -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.
|
File without changes
|
File without changes
|