feldera 0.59.0__py3-none-any.whl → 0.60.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.
Potentially problematic release.
This version of feldera might be problematic. Click here for more details.
- feldera/enums.py +5 -0
- feldera/pipeline.py +16 -0
- feldera/rest/feldera_client.py +40 -1
- {feldera-0.59.0.dist-info → feldera-0.60.0.dist-info}/METADATA +1 -1
- {feldera-0.59.0.dist-info → feldera-0.60.0.dist-info}/RECORD +7 -7
- {feldera-0.59.0.dist-info → feldera-0.60.0.dist-info}/WHEEL +0 -0
- {feldera-0.59.0.dist-info → feldera-0.60.0.dist-info}/top_level.txt +0 -0
feldera/enums.py
CHANGED
|
@@ -182,6 +182,11 @@ class PipelineStatus(Enum):
|
|
|
182
182
|
could not be reached or returned it is not yet ready.
|
|
183
183
|
"""
|
|
184
184
|
|
|
185
|
+
SUSPENDED = 10
|
|
186
|
+
"""
|
|
187
|
+
The pipeline was successfully suspended to storage.
|
|
188
|
+
"""
|
|
189
|
+
|
|
185
190
|
@staticmethod
|
|
186
191
|
def from_str(value):
|
|
187
192
|
for member in PipelineStatus:
|
feldera/pipeline.py
CHANGED
|
@@ -492,6 +492,22 @@ resume a paused pipeline."""
|
|
|
492
492
|
|
|
493
493
|
self.client.shutdown_pipeline(self.name, timeout_s=timeout_s)
|
|
494
494
|
|
|
495
|
+
def suspend(self, timeout_s: Optional[float] = None):
|
|
496
|
+
"""
|
|
497
|
+
Suspends the pipeline to storage.
|
|
498
|
+
|
|
499
|
+
:param timeout_s: The maximum time (in seconds) to wait for the pipeline to suspend.
|
|
500
|
+
"""
|
|
501
|
+
|
|
502
|
+
if len(self.views_tx) > 0:
|
|
503
|
+
for _, queue in self.views_tx.pop().items():
|
|
504
|
+
# sends a message to the callback runner to stop listening
|
|
505
|
+
queue.put(_CallbackRunnerInstruction.RanToCompletion)
|
|
506
|
+
# block until the callback runner has been stopped
|
|
507
|
+
queue.join()
|
|
508
|
+
|
|
509
|
+
self.client.suspend_pipeline(self.name, timeout_s=timeout_s)
|
|
510
|
+
|
|
495
511
|
def resume(self, timeout_s: Optional[float] = None):
|
|
496
512
|
"""
|
|
497
513
|
Resumes the pipeline from the PAUSED state. If the pipeline is already running, it will remain in the RUNNING state.
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -314,7 +314,7 @@ Reason: The pipeline is in a FAILED state due to the following error:
|
|
|
314
314
|
Shutdown a pipeline
|
|
315
315
|
|
|
316
316
|
:param pipeline_name: The name of the pipeline to shut down
|
|
317
|
-
:param timeout_s: The amount of time in seconds to wait for the pipeline to shut down. Default is
|
|
317
|
+
:param timeout_s: The amount of time in seconds to wait for the pipeline to shut down. Default is 300 seconds.
|
|
318
318
|
"""
|
|
319
319
|
|
|
320
320
|
if timeout_s is None:
|
|
@@ -342,6 +342,45 @@ Reason: The pipeline is in a FAILED state due to the following error:
|
|
|
342
342
|
f"timeout error: pipeline '{pipeline_name}' did not shutdown in {timeout_s} seconds"
|
|
343
343
|
)
|
|
344
344
|
|
|
345
|
+
def suspend_pipeline(self, pipeline_name: str, timeout_s: Optional[float] = 300):
|
|
346
|
+
"""
|
|
347
|
+
Suspend a pipeline
|
|
348
|
+
|
|
349
|
+
:param pipeline_name: The name of the pipeline to suspend
|
|
350
|
+
:param timeout_s: The amount of time in seconds to wait for the pipeline to suspend. Default is 300 seconds.
|
|
351
|
+
"""
|
|
352
|
+
|
|
353
|
+
if timeout_s is None:
|
|
354
|
+
timeout_s = 300
|
|
355
|
+
|
|
356
|
+
self.http.post(
|
|
357
|
+
path=f"/pipelines/{pipeline_name}/suspend",
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
start = time.monotonic()
|
|
361
|
+
|
|
362
|
+
while time.monotonic() - start < timeout_s:
|
|
363
|
+
resp = self.get_pipeline(pipeline_name)
|
|
364
|
+
status = resp.deployment_status
|
|
365
|
+
|
|
366
|
+
if status == "Suspended":
|
|
367
|
+
return
|
|
368
|
+
elif status == "Failed":
|
|
369
|
+
raise RuntimeError(
|
|
370
|
+
f"""Unable to Suspend pipeline '{pipeline_name}'.\nReason: The pipeline is in a FAILED state due to the following error:
|
|
371
|
+
{resp.deployment_error.get("message", "")}"""
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
logging.debug(
|
|
375
|
+
"still suspending %s, waiting for 100 more milliseconds",
|
|
376
|
+
pipeline_name,
|
|
377
|
+
)
|
|
378
|
+
time.sleep(0.1)
|
|
379
|
+
|
|
380
|
+
raise FelderaTimeoutError(
|
|
381
|
+
f"timeout error: pipeline '{pipeline_name}' did not suspend in {timeout_s} seconds"
|
|
382
|
+
)
|
|
383
|
+
|
|
345
384
|
def checkpoint_pipeline(self, pipeline_name: str):
|
|
346
385
|
"""
|
|
347
386
|
Checkpoint a fault-tolerant pipeline
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
feldera/__init__.py,sha256=PxkgCtEAuFwo4u8NGEDio-bF3M-GnbeV45tAQVoBbqE,297
|
|
2
2
|
feldera/_callback_runner.py,sha256=Tdf6BXN4zppyoy8t_y-Ooa3B0wEfvyezMHU9jxY2ZhA,4713
|
|
3
3
|
feldera/_helpers.py,sha256=rN0WuGSCCQlXWFMimZUQrgs-LJAfUo074d79sLElncQ,3023
|
|
4
|
-
feldera/enums.py,sha256=
|
|
4
|
+
feldera/enums.py,sha256=lgGTn0ahOj-IE2M8k-uszq6Dl98kSX2EeqKDixJcWOo,7373
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
|
-
feldera/pipeline.py,sha256=
|
|
6
|
+
feldera/pipeline.py,sha256=gDadQHgUHi4bdrMJ9GdIshmFU80pcTNvDiveC5S-GZ4,31100
|
|
7
7
|
feldera/pipeline_builder.py,sha256=4rmklRZ0-otvTUb-HTESfNsJopEK-E2jxpJXiYlKpps,3664
|
|
8
8
|
feldera/runtime_config.py,sha256=DDJTSzG6LCTH0lVnuUjpATAf1STwAYJOB38xyZh_BJI,3367
|
|
9
9
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
10
10
|
feldera/rest/_httprequests.py,sha256=e22YbpzOzy7MGo7hk9MOU7ZRTj3F314grY0Ygr-_goI,6636
|
|
11
11
|
feldera/rest/config.py,sha256=DYzZKngDEhouTEwqVFd-rDrBN9tWqsU07Jl_BTT4mXs,1008
|
|
12
12
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
13
|
-
feldera/rest/feldera_client.py,sha256=
|
|
13
|
+
feldera/rest/feldera_client.py,sha256=ELXZbTfy1UdeIY-ZbFv0kPIdq9qSF5WuoQpdhxmK2pg,23184
|
|
14
14
|
feldera/rest/pipeline.py,sha256=a1lx-64SYak5mHX5yKElVijdfaAt5sDYVhVIXCJ97QQ,2839
|
|
15
15
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
16
16
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
17
|
-
feldera-0.
|
|
18
|
-
feldera-0.
|
|
19
|
-
feldera-0.
|
|
20
|
-
feldera-0.
|
|
17
|
+
feldera-0.60.0.dist-info/METADATA,sha256=lj7FEzF3dcvxnxmCHpFCq0LTOxkwUM87RLvw-uSubQY,2594
|
|
18
|
+
feldera-0.60.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
feldera-0.60.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
20
|
+
feldera-0.60.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|