Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /tests /spark /__init__.py
| from __future__ import annotations | |
| from celery.signals import worker_process_init, worker_process_shutdown | |
| from coverage import Coverage | |
| from onetl.connection import HDFS, SparkHDFS | |
| from onetl.hooks import hook | |
| # this is just to automatically import hooks | |
| from syncmaster.worker.spark import get_worker_spark_session # noqa: F401 | |
| def get_cluster_namenodes(cluster: str) -> set[str] | None: | |
| if cluster == "test-hive": | |
| return {"test-hive"} | |
| return None | |
| def is_namenode_active(host: str, cluster: str) -> bool: | |
| return cluster == "test-hive" | |
| def get_ipc_port(cluster: str) -> int | None: | |
| if cluster == "test-hive": | |
| return 9820 | |
| return None | |
| def get_webhdfs_port(cluster: str) -> int | None: | |
| if cluster == "test-hive": | |
| return 9870 | |
| return None | |
| # Needed to collect code coverage by tests in the worker | |
| # https://github.com/nedbat/coveragepy/issues/689#issuecomment-656706935 | |
| COV = None | |
| def start_coverage(**kwargs): | |
| global COV # noqa: PLW0603 | |
| COV = Coverage(data_suffix=True) | |
| COV.start() | |
| def save_coverage(**kwargs): | |
| if COV is not None: | |
| COV.stop() | |
| COV.save() | |
Xet Storage Details
- Size:
- 1.47 kB
- Xet hash:
- 890dec89fc1b0d8cbb1a6e9d846380919286d6f8aaa1a0437575fb0a9aa0fbac
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.