esd-services-api-client 1.0.1__py3-none-any.whl → 1.0.3__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.
- esd_services_api_client/_version.py +1 -1
- esd_services_api_client/beast/_connector.py +23 -1
- esd_services_api_client/beast/_models.py +60 -1
- {esd_services_api_client-1.0.1.dist-info → esd_services_api_client-1.0.3.dist-info}/METADATA +1 -1
- {esd_services_api_client-1.0.1.dist-info → esd_services_api_client-1.0.3.dist-info}/RECORD +7 -7
- {esd_services_api_client-1.0.1.dist-info → esd_services_api_client-1.0.3.dist-info}/LICENSE +0 -0
- {esd_services_api_client-1.0.1.dist-info → esd_services_api_client-1.0.3.dist-info}/WHEEL +0 -0
@@ -1 +1 @@
|
|
1
|
-
__version__ = '1.0.
|
1
|
+
__version__ = '1.0.3'
|
@@ -25,7 +25,11 @@ import backoff
|
|
25
25
|
from adapta.utils import doze, session_with_retries
|
26
26
|
from urllib3.exceptions import ProtocolError, HTTPError
|
27
27
|
|
28
|
-
from esd_services_api_client.beast._models import
|
28
|
+
from esd_services_api_client.beast._models import (
|
29
|
+
JobRequest,
|
30
|
+
BeastJobParams,
|
31
|
+
SparkSubmissionConfiguration,
|
32
|
+
)
|
29
33
|
from esd_services_api_client.boxer import BoxerTokenAuth
|
30
34
|
|
31
35
|
|
@@ -172,6 +176,7 @@ class BeastConnector:
|
|
172
176
|
overwrite=job_params.overwrite_outputs,
|
173
177
|
extra_args=prepared_arguments,
|
174
178
|
client_tag=job_params.client_tag,
|
179
|
+
expected_parallelism=job_params.expected_parallelism,
|
175
180
|
)
|
176
181
|
|
177
182
|
(request_id, request_lifecycle) = self._submit(submit_request, job_name)
|
@@ -245,8 +250,25 @@ class BeastConnector:
|
|
245
250
|
overwrite=job_params.overwrite_outputs,
|
246
251
|
extra_args=prepared_arguments,
|
247
252
|
client_tag=job_params.client_tag,
|
253
|
+
expected_parallelism=job_params.expected_parallelism,
|
248
254
|
)
|
249
255
|
|
250
256
|
request_id, _ = self._submit(submit_request, job_name)
|
251
257
|
|
252
258
|
return request_id
|
259
|
+
|
260
|
+
def get_configuration(
|
261
|
+
self, configuration_name: str
|
262
|
+
) -> Optional[SparkSubmissionConfiguration]:
|
263
|
+
"""
|
264
|
+
Returns a deployed SparkJob configuration.
|
265
|
+
:param configuration_name: Name of the configuration to find
|
266
|
+
:return: A SparkSubmissionConfiguration object, if found, or None
|
267
|
+
"""
|
268
|
+
response = self.http.get(f"{self.base_url}/job/deployed/{configuration_name}")
|
269
|
+
if response.status_code == 404:
|
270
|
+
return None
|
271
|
+
if not response.ok:
|
272
|
+
response.raise_for_status()
|
273
|
+
|
274
|
+
return SparkSubmissionConfiguration.from_dict(response.json())
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
import os
|
20
20
|
from dataclasses import dataclass, field
|
21
|
-
from typing import List, Dict, Union
|
21
|
+
from typing import List, Dict, Union, Optional
|
22
22
|
from warnings import warn
|
23
23
|
|
24
24
|
from cryptography.fernet import Fernet
|
@@ -88,6 +88,7 @@ class JobRequest(DataClassJsonMixin):
|
|
88
88
|
overwrite: bool
|
89
89
|
extra_args: Dict[str, str]
|
90
90
|
client_tag: str
|
91
|
+
expected_parallelism: Optional[int]
|
91
92
|
|
92
93
|
|
93
94
|
class ArgumentValue:
|
@@ -182,3 +183,61 @@ class BeastJobParams:
|
|
182
183
|
},
|
183
184
|
default=False,
|
184
185
|
)
|
186
|
+
expected_parallelism: Optional[int] = field(
|
187
|
+
metadata={
|
188
|
+
"description": "Expected number of executors for this job (overrides the deployed value)."
|
189
|
+
},
|
190
|
+
default=None,
|
191
|
+
)
|
192
|
+
|
193
|
+
|
194
|
+
@dataclass_json(letter_case=LetterCase.CAMEL)
|
195
|
+
@dataclass
|
196
|
+
class RequestDebugMode(DataClassJsonMixin):
|
197
|
+
"""
|
198
|
+
Debug mode config.
|
199
|
+
"""
|
200
|
+
|
201
|
+
event_log_location: str
|
202
|
+
max_size_per_file: str
|
203
|
+
|
204
|
+
|
205
|
+
@dataclass_json(letter_case=LetterCase.CAMEL)
|
206
|
+
@dataclass
|
207
|
+
class V1TypedLocalObjectReference(DataClassJsonMixin):
|
208
|
+
"""
|
209
|
+
Reference to another SparkJob.
|
210
|
+
"""
|
211
|
+
|
212
|
+
api_group: str
|
213
|
+
kind: str
|
214
|
+
name: str
|
215
|
+
|
216
|
+
|
217
|
+
@dataclass_json(letter_case=LetterCase.CAMEL)
|
218
|
+
@dataclass
|
219
|
+
class SparkSubmissionConfiguration(DataClassJsonMixin):
|
220
|
+
"""
|
221
|
+
Configuration CRD used by Beast to run Spark apps.
|
222
|
+
"""
|
223
|
+
|
224
|
+
root_path: str
|
225
|
+
project_name: str
|
226
|
+
version: str
|
227
|
+
runnable: str
|
228
|
+
execution_group: str
|
229
|
+
expected_parallelism: Optional[int]
|
230
|
+
flexible_driver: Optional[bool]
|
231
|
+
additional_driver_node_tolerations: Dict[str, str]
|
232
|
+
max_runtime_hours: Optional[int]
|
233
|
+
debug_mode: RequestDebugMode
|
234
|
+
submission_mode: Optional[str]
|
235
|
+
extended_code_mount: Optional[bool]
|
236
|
+
submission_job_template: str
|
237
|
+
executor_spec_template: str
|
238
|
+
driver_job_retries: Optional[int]
|
239
|
+
default_arguments: Dict[str, str]
|
240
|
+
inputs: List[JobSocket]
|
241
|
+
outputs: List[JobSocket]
|
242
|
+
overwrite: bool
|
243
|
+
base_submission_configuration_ref: V1TypedLocalObjectReference
|
@@ -1,9 +1,9 @@
|
|
1
1
|
esd_services_api_client/__init__.py,sha256=rP0njtEgVSMm-sOVayVfcRUrrubl4lme7HI2zS678Lo,598
|
2
|
-
esd_services_api_client/_version.py,sha256=
|
2
|
+
esd_services_api_client/_version.py,sha256=qKK4BMzdt84HiCorJPWqgEfa_DbJeuGx_bIPrDui2vc,22
|
3
3
|
esd_services_api_client/beast/__init__.py,sha256=XU4thkgkY6ZvT4yyDpaqeiIg3yotfcyJEewpo8iica4,743
|
4
4
|
esd_services_api_client/beast/_auth.py,sha256=V9m75EaFP8U_Ykf4DE5SWSSUrH8_UP_ugrmayJbwdmw,2666
|
5
|
-
esd_services_api_client/beast/_connector.py,sha256=
|
6
|
-
esd_services_api_client/beast/_models.py,sha256=
|
5
|
+
esd_services_api_client/beast/_connector.py,sha256=DgoX2tU4S37LKKUPvyq_YhuP-e8dDsjp0dWfwNRuaMU,9828
|
6
|
+
esd_services_api_client/beast/_models.py,sha256=hwvzqnw8H7N-6zDrdQftI7VUhZS_idHKnjPe9OXxIoA,6976
|
7
7
|
esd_services_api_client/boxer/README.md,sha256=U8kXXtJFi1w0woQ4F_UOdDZiQl6-K7zFmQEUV4EktfM,2983
|
8
8
|
esd_services_api_client/boxer/__init__.py,sha256=OYsWvdnLan0kmjUcH4I2-m1rbPeARKp5iqhp8uyudPk,780
|
9
9
|
esd_services_api_client/boxer/_auth.py,sha256=vA7T9y0oZV2f17UWQ2or9CK8vAsNnHB10G5HNQe1l1I,7440
|
@@ -16,7 +16,7 @@ esd_services_api_client/crystal/__init__.py,sha256=afSGQRkDic0ECsJfgu3b291kX8CyU
|
|
16
16
|
esd_services_api_client/crystal/_api_versions.py,sha256=2BMiQRS0D8IEpWCCys3dge5alVBRCZrOuCR1QAn8UIM,832
|
17
17
|
esd_services_api_client/crystal/_connector.py,sha256=lWWKhVKvaFtLTsl6abtydFH4rsMoCATD_IMpVOARyl0,12150
|
18
18
|
esd_services_api_client/crystal/_models.py,sha256=eRhGAl8LjglCyIFwf1bcFBhjbpSuRYucuF2LO388L2E,4025
|
19
|
-
esd_services_api_client-1.0.
|
20
|
-
esd_services_api_client-1.0.
|
21
|
-
esd_services_api_client-1.0.
|
22
|
-
esd_services_api_client-1.0.
|
19
|
+
esd_services_api_client-1.0.3.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
|
20
|
+
esd_services_api_client-1.0.3.dist-info/METADATA,sha256=pPSDzzsXCLyypu2I6ZassMsyNcqP1CQapXkSk6ap22Q,1077
|
21
|
+
esd_services_api_client-1.0.3.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
22
|
+
esd_services_api_client-1.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|