feldera 0.125.0__py3-none-any.whl → 0.127.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/pipeline.py +13 -0
- feldera/rest/feldera_client.py +52 -0
- {feldera-0.125.0.dist-info → feldera-0.127.0.dist-info}/METADATA +1 -1
- {feldera-0.125.0.dist-info → feldera-0.127.0.dist-info}/RECORD +6 -6
- {feldera-0.125.0.dist-info → feldera-0.127.0.dist-info}/WHEEL +0 -0
- {feldera-0.125.0.dist-info → feldera-0.127.0.dist-info}/top_level.txt +0 -0
feldera/pipeline.py
CHANGED
|
@@ -474,6 +474,19 @@ metrics"""
|
|
|
474
474
|
raise RuntimeError(f"waiting for idle reached timeout ({timeout_s}s)")
|
|
475
475
|
time.sleep(poll_interval_s)
|
|
476
476
|
|
|
477
|
+
def activate(self, wait: bool = True, timeout_s: Optional[float] = None):
|
|
478
|
+
"""
|
|
479
|
+
Activates the pipeline when starting from STANDBY mode. Only applicable
|
|
480
|
+
when the pipeline is starting from a checkpoint in object store.
|
|
481
|
+
|
|
482
|
+
:param wait: Set True to wait for the pipeline to activate. True by
|
|
483
|
+
default
|
|
484
|
+
:param timeout_s: The maximum time (in seconds) to wait for the
|
|
485
|
+
pipeline to pause.
|
|
486
|
+
"""
|
|
487
|
+
|
|
488
|
+
self.client.activate_pipeline(self.name, wait=wait, timeout_s=timeout_s)
|
|
489
|
+
|
|
477
490
|
def pause(self, wait: bool = True, timeout_s: Optional[float] = None):
|
|
478
491
|
"""
|
|
479
492
|
Pause the pipeline.
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -268,6 +268,58 @@ class FelderaClient:
|
|
|
268
268
|
if chunk:
|
|
269
269
|
yield chunk.decode("utf-8")
|
|
270
270
|
|
|
271
|
+
def activate_pipeline(
|
|
272
|
+
self, pipeline_name: str, wait: bool = True, timeout_s: Optional[float] = 300
|
|
273
|
+
):
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
:param pipeline_name: The name of the pipeline to activate
|
|
277
|
+
:param wait: Set True to wait for the pipeline to activate. True by default
|
|
278
|
+
:param timeout_s: The amount of time in seconds to wait for the pipeline
|
|
279
|
+
to activate. 300 seconds by default.
|
|
280
|
+
"""
|
|
281
|
+
|
|
282
|
+
if timeout_s is None:
|
|
283
|
+
timeout_s = 300
|
|
284
|
+
|
|
285
|
+
self.http.post(
|
|
286
|
+
path=f"/pipelines/{pipeline_name}/activate",
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
if not wait:
|
|
290
|
+
return
|
|
291
|
+
|
|
292
|
+
start_time = time.monotonic()
|
|
293
|
+
|
|
294
|
+
while True:
|
|
295
|
+
if timeout_s is not None:
|
|
296
|
+
elapsed = time.monotonic() - start_time
|
|
297
|
+
if elapsed > timeout_s:
|
|
298
|
+
raise TimeoutError(
|
|
299
|
+
f"Timed out waiting for pipeline {pipeline_name} to activate"
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
resp = self.get_pipeline(pipeline_name)
|
|
303
|
+
status = resp.deployment_status
|
|
304
|
+
|
|
305
|
+
if status == "Running":
|
|
306
|
+
break
|
|
307
|
+
elif (
|
|
308
|
+
status == "Stopped"
|
|
309
|
+
and len(resp.deployment_error or {}) > 0
|
|
310
|
+
and resp.deployment_desired_status == "Stopped"
|
|
311
|
+
):
|
|
312
|
+
raise RuntimeError(
|
|
313
|
+
f"""Unable to ACTIVATE the pipeline.
|
|
314
|
+
Reason: The pipeline is in a STOPPED state due to the following error:
|
|
315
|
+
{resp.deployment_error.get("message", "")}"""
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
logging.debug(
|
|
319
|
+
"still starting %s, waiting for 100 more milliseconds", pipeline_name
|
|
320
|
+
)
|
|
321
|
+
time.sleep(0.1)
|
|
322
|
+
|
|
271
323
|
def start_pipeline(
|
|
272
324
|
self, pipeline_name: str, wait: bool = True, timeout_s: Optional[float] = 300
|
|
273
325
|
):
|
|
@@ -3,7 +3,7 @@ feldera/_callback_runner.py,sha256=-2hYG70cEkvz4BiOfUTARaH-2Rlv0Qcz-ilvodgyK10,4
|
|
|
3
3
|
feldera/_helpers.py,sha256=rN0WuGSCCQlXWFMimZUQrgs-LJAfUo074d79sLElncQ,3023
|
|
4
4
|
feldera/enums.py,sha256=MTHBojVANsdRnjbrzCyIOniDIUaH8nTYRfxB7QvajEE,9570
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
|
-
feldera/pipeline.py,sha256=
|
|
6
|
+
feldera/pipeline.py,sha256=3OnAY70v_0PN7rT4K62tzcOLhe5rKNc6lqmYu3sOJes,40982
|
|
7
7
|
feldera/pipeline_builder.py,sha256=a750hp5SgTmlyrobTHFh1fTaK9Ed4A5qnXaYRctRM-8,4250
|
|
8
8
|
feldera/runtime_config.py,sha256=MuYJPd5G_hnu_eDz4ge4BfYvSBSOvOEtv4NYh5sEwqU,4452
|
|
9
9
|
feldera/stats.py,sha256=eZxq51bUV3mlo6BW43DUHwmG1wpLs04rVECxOGojqxU,5026
|
|
@@ -12,12 +12,12 @@ feldera/rest/_helpers.py,sha256=q7jWInKp9IiIli8N5o31lDG3hNUbcsJqufZXYHG04ps,222
|
|
|
12
12
|
feldera/rest/_httprequests.py,sha256=w8tD-_3spAf4vgalJQceIHQ7qw1uvxprDFM2oz3P5QU,7559
|
|
13
13
|
feldera/rest/config.py,sha256=DYzZKngDEhouTEwqVFd-rDrBN9tWqsU07Jl_BTT4mXs,1008
|
|
14
14
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
15
|
-
feldera/rest/feldera_client.py,sha256=
|
|
15
|
+
feldera/rest/feldera_client.py,sha256=cBRamZupELaNUeF8kj8VEHOWZV8oAUEiQpL9Yilfl3o,36115
|
|
16
16
|
feldera/rest/feldera_config.py,sha256=1pnGbLFMSLvp7Qh_OlPLALSKCSHIktNWKvx6gYU00U4,1374
|
|
17
17
|
feldera/rest/pipeline.py,sha256=Rmbflbwjvd86iZ5aSJ5b_bTSs6vgvEKQFwMZDtm0nxE,2835
|
|
18
18
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
19
19
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
20
|
-
feldera-0.
|
|
21
|
-
feldera-0.
|
|
22
|
-
feldera-0.
|
|
23
|
-
feldera-0.
|
|
20
|
+
feldera-0.127.0.dist-info/METADATA,sha256=GWyiGpPH4x39G90gNDSHWTZQqSOK-u1XTeWYtvZZNZ8,4053
|
|
21
|
+
feldera-0.127.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
feldera-0.127.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
23
|
+
feldera-0.127.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|