polyaxon 2.0.0rc28__py3-none-any.whl → 2.0.0rc29__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.
Files changed (205) hide show
  1. polyaxon/api.py +4 -0
  2. polyaxon/auxiliaries/default_scheduling.py +1 -1
  3. polyaxon/auxiliaries/init.py +1 -1
  4. polyaxon/auxiliaries/sidecar.py +1 -1
  5. polyaxon/cli/operations.py +18 -2
  6. polyaxon/cli/services/docker.py +1 -1
  7. polyaxon/cli/services/initializer.py +1 -1
  8. polyaxon/client/run.py +23 -26
  9. polyaxon/compiler/contexts/contexts.py +0 -2
  10. polyaxon/compiler/contexts/service.py +14 -9
  11. polyaxon/compiler/resolver/agent.py +1 -1
  12. polyaxon/compiler/resolver/runtime.py +0 -1
  13. polyaxon/constants/metadata.py +1 -0
  14. polyaxon/deploy/schemas/auth.py +1 -1
  15. polyaxon/deploy/schemas/celery.py +1 -1
  16. polyaxon/deploy/schemas/deployment.py +7 -1
  17. polyaxon/deploy/schemas/email.py +1 -1
  18. polyaxon/deploy/schemas/ingress.py +1 -1
  19. polyaxon/deploy/schemas/intervals.py +1 -1
  20. polyaxon/deploy/schemas/operators.py +0 -1
  21. polyaxon/deploy/schemas/proxy.py +1 -1
  22. polyaxon/deploy/schemas/root_user.py +1 -1
  23. polyaxon/deploy/schemas/security_context.py +1 -1
  24. polyaxon/deploy/schemas/service.py +1 -1
  25. polyaxon/deploy/schemas/ssl.py +1 -1
  26. polyaxon/deploy/schemas/ui.py +1 -1
  27. polyaxon/docker/docker_types.py +1 -1
  28. polyaxon/env_vars/keys.py +0 -2
  29. polyaxon/k8s/converter/converters/__init__.py +0 -2
  30. polyaxon/k8s/converter/converters/dask_job.py +3 -0
  31. polyaxon/k8s/converter/mixins.py +0 -7
  32. polyaxon/k8s/custom_resources/dask_job.py +14 -2
  33. polyaxon/lifecycle.py +1 -1
  34. polyaxon/pkg.py +1 -1
  35. polyaxon/polyflow/__init__.py +0 -4
  36. polyaxon/polyflow/builds/__init__.py +1 -1
  37. polyaxon/polyflow/cache/__init__.py +1 -1
  38. polyaxon/polyflow/component/base.py +1 -1
  39. polyaxon/polyflow/component/component.py +1 -2
  40. polyaxon/polyflow/component/component_reference.py +1 -1
  41. polyaxon/polyflow/early_stopping/__init__.py +1 -1
  42. polyaxon/polyflow/early_stopping/policies.py +1 -1
  43. polyaxon/polyflow/environment/__init__.py +1 -1
  44. polyaxon/polyflow/events/__init__.py +1 -1
  45. polyaxon/polyflow/hooks/__init__.py +1 -1
  46. polyaxon/polyflow/init/__init__.py +1 -1
  47. polyaxon/polyflow/io/io.py +1 -1
  48. polyaxon/polyflow/joins/__init__.py +1 -1
  49. polyaxon/polyflow/matrix/__init__.py +1 -1
  50. polyaxon/polyflow/matrix/bayes.py +7 -1
  51. polyaxon/polyflow/matrix/grid_search.py +1 -1
  52. polyaxon/polyflow/matrix/hyperband.py +1 -1
  53. polyaxon/polyflow/matrix/hyperopt.py +1 -1
  54. polyaxon/polyflow/matrix/iterative.py +1 -1
  55. polyaxon/polyflow/matrix/mapping.py +1 -1
  56. polyaxon/polyflow/matrix/params.py +2 -2
  57. polyaxon/polyflow/matrix/random_search.py +1 -1
  58. polyaxon/polyflow/matrix/tuner.py +1 -1
  59. polyaxon/polyflow/mounts/artifacts_mounts.py +1 -1
  60. polyaxon/polyflow/notifications/__init__.py +1 -1
  61. polyaxon/polyflow/operations/base.py +1 -1
  62. polyaxon/polyflow/operations/operation.py +1 -2
  63. polyaxon/polyflow/optimization/__init__.py +1 -1
  64. polyaxon/polyflow/params/params.py +1 -1
  65. polyaxon/polyflow/plugins/__init__.py +1 -1
  66. polyaxon/polyflow/references/dag.py +1 -1
  67. polyaxon/polyflow/references/hub.py +1 -1
  68. polyaxon/polyflow/references/path.py +1 -1
  69. polyaxon/polyflow/references/url.py +1 -1
  70. polyaxon/polyflow/run/__init__.py +1 -13
  71. polyaxon/polyflow/run/dag.py +7 -1
  72. polyaxon/polyflow/run/dask/replica.py +1 -1
  73. polyaxon/polyflow/run/job.py +1 -1
  74. polyaxon/polyflow/run/kinds.py +14 -1
  75. polyaxon/polyflow/run/kubeflow/mpi_job.py +1 -1
  76. polyaxon/polyflow/run/kubeflow/mx_job.py +1 -1
  77. polyaxon/polyflow/run/kubeflow/paddle_job.py +1 -1
  78. polyaxon/polyflow/run/kubeflow/pytorch_job.py +1 -1
  79. polyaxon/polyflow/run/kubeflow/replica.py +1 -1
  80. polyaxon/polyflow/run/kubeflow/scheduling_policy.py +1 -1
  81. polyaxon/polyflow/run/kubeflow/tf_job.py +1 -1
  82. polyaxon/polyflow/run/kubeflow/xgboost_job.py +1 -1
  83. polyaxon/polyflow/run/patch.py +1 -7
  84. polyaxon/polyflow/run/ray/ray.py +1 -1
  85. polyaxon/polyflow/run/ray/replica.py +1 -1
  86. polyaxon/polyflow/run/resources.py +1 -1
  87. polyaxon/polyflow/run/service.py +1 -1
  88. polyaxon/polyflow/schedules/__init__.py +1 -1
  89. polyaxon/polyflow/schedules/cron.py +1 -1
  90. polyaxon/polyflow/schedules/datetime.py +1 -1
  91. polyaxon/polyflow/schedules/interval.py +1 -1
  92. polyaxon/polyflow/templates/__init__.py +1 -1
  93. polyaxon/polyflow/termination/__init__.py +2 -2
  94. polyaxon/schemas/api/authentication.py +1 -1
  95. polyaxon/schemas/api/home.py +1 -1
  96. polyaxon/schemas/api/installation.py +1 -1
  97. polyaxon/schemas/api/log_handler.py +1 -1
  98. polyaxon/schemas/api/resources.py +1 -1
  99. polyaxon/schemas/api/user.py +1 -1
  100. polyaxon/schemas/api/version.py +1 -1
  101. polyaxon/schemas/base.py +1 -1
  102. polyaxon/schemas/cli/agent_config.py +1 -1
  103. polyaxon/schemas/cli/cli_config.py +1 -1
  104. polyaxon/schemas/cli/client_config.py +1 -1
  105. polyaxon/schemas/responses/v1_activity.py +1 -1
  106. polyaxon/schemas/responses/v1_agent.py +1 -1
  107. polyaxon/schemas/responses/v1_agent_status_body_request.py +1 -1
  108. polyaxon/schemas/responses/v1_analytics_spec.py +1 -1
  109. polyaxon/schemas/responses/v1_artifact_tree.py +1 -1
  110. polyaxon/schemas/responses/v1_auth.py +1 -1
  111. polyaxon/schemas/responses/v1_cloning.py +1 -1
  112. polyaxon/schemas/responses/v1_connection_response.py +1 -1
  113. polyaxon/schemas/responses/v1_dashboard.py +1 -1
  114. polyaxon/schemas/responses/v1_entities_tags.py +1 -1
  115. polyaxon/schemas/responses/v1_entities_transfer.py +1 -1
  116. polyaxon/schemas/responses/v1_entity_notification_body.py +1 -1
  117. polyaxon/schemas/responses/v1_entity_stage_body_request.py +1 -1
  118. polyaxon/schemas/responses/v1_entity_status_body_request.py +1 -1
  119. polyaxon/schemas/responses/v1_list_activities_response.py +1 -1
  120. polyaxon/schemas/responses/v1_list_agents_response.py +1 -1
  121. polyaxon/schemas/responses/v1_list_bookmarks_response.py +1 -1
  122. polyaxon/schemas/responses/v1_list_connections_response.py +1 -1
  123. polyaxon/schemas/responses/v1_list_dashboards_response.py +1 -1
  124. polyaxon/schemas/responses/v1_list_organization_members_response.py +1 -1
  125. polyaxon/schemas/responses/v1_list_organizations_response.py +1 -1
  126. polyaxon/schemas/responses/v1_list_presets_response.py +1 -1
  127. polyaxon/schemas/responses/v1_list_project_versions_response.py +1 -1
  128. polyaxon/schemas/responses/v1_list_projects_response.py +1 -1
  129. polyaxon/schemas/responses/v1_list_queues_response.py +1 -1
  130. polyaxon/schemas/responses/v1_list_run_artifacts_response.py +1 -1
  131. polyaxon/schemas/responses/v1_list_run_connections_response.py +1 -1
  132. polyaxon/schemas/responses/v1_list_run_edges_response.py +1 -1
  133. polyaxon/schemas/responses/v1_list_runs_response.py +1 -1
  134. polyaxon/schemas/responses/v1_list_searches_response.py +1 -1
  135. polyaxon/schemas/responses/v1_list_service_accounts_response.py +1 -1
  136. polyaxon/schemas/responses/v1_list_tags_response.py +1 -1
  137. polyaxon/schemas/responses/v1_list_team_members_response.py +1 -1
  138. polyaxon/schemas/responses/v1_list_teams_response.py +1 -1
  139. polyaxon/schemas/responses/v1_list_token_response.py +1 -1
  140. polyaxon/schemas/responses/v1_operation_body.py +1 -1
  141. polyaxon/schemas/responses/v1_organization.py +1 -1
  142. polyaxon/schemas/responses/v1_organization_member.py +1 -1
  143. polyaxon/schemas/responses/v1_password_change.py +1 -1
  144. polyaxon/schemas/responses/v1_pipeline.py +1 -1
  145. polyaxon/schemas/responses/v1_preset.py +1 -1
  146. polyaxon/schemas/responses/v1_project.py +1 -1
  147. polyaxon/schemas/responses/v1_project_settings.py +1 -1
  148. polyaxon/schemas/responses/v1_project_user_access.py +1 -1
  149. polyaxon/schemas/responses/v1_project_version.py +1 -1
  150. polyaxon/schemas/responses/v1_queue.py +1 -1
  151. polyaxon/schemas/responses/v1_run.py +1 -1
  152. polyaxon/schemas/responses/v1_run_connection.py +1 -1
  153. polyaxon/schemas/responses/v1_run_reference_catalog.py +1 -1
  154. polyaxon/schemas/responses/v1_run_settings.py +1 -1
  155. polyaxon/schemas/responses/v1_search.py +1 -1
  156. polyaxon/schemas/responses/v1_search_spec.py +1 -1
  157. polyaxon/schemas/responses/v1_section_spec.py +1 -1
  158. polyaxon/schemas/responses/v1_service_account.py +1 -1
  159. polyaxon/schemas/responses/v1_settings_catalog.py +2 -1
  160. polyaxon/schemas/responses/v1_tag.py +1 -1
  161. polyaxon/schemas/responses/v1_team.py +1 -1
  162. polyaxon/schemas/responses/v1_team_member.py +1 -1
  163. polyaxon/schemas/responses/v1_token.py +1 -1
  164. polyaxon/schemas/responses/v1_trial_start.py +1 -1
  165. polyaxon/schemas/responses/v1_user.py +1 -1
  166. polyaxon/schemas/responses/v1_user_singup.py +1 -1
  167. polyaxon/schemas/services.py +1 -1
  168. polyaxon/schemas/types/artifacts.py +1 -1
  169. polyaxon/schemas/types/dockerfile.py +1 -1
  170. polyaxon/schemas/types/event.py +1 -1
  171. polyaxon/schemas/types/file.py +1 -1
  172. polyaxon/schemas/types/git.py +1 -1
  173. polyaxon/schemas/types/tensorboard.py +1 -1
  174. polyaxon/sdk/api/agents_v1_api.py +1 -1
  175. polyaxon/sdk/api/artifacts_stores_v1_api.py +1 -1
  176. polyaxon/sdk/api/auth_v1_api.py +1 -1
  177. polyaxon/sdk/api/connections_v1_api.py +1 -1
  178. polyaxon/sdk/api/dashboards_v1_api.py +1 -1
  179. polyaxon/sdk/api/organizations_v1_api.py +1 -1
  180. polyaxon/sdk/api/presets_v1_api.py +1 -1
  181. polyaxon/sdk/api/project_dashboards_v1_api.py +1 -1
  182. polyaxon/sdk/api/project_searches_v1_api.py +1 -1
  183. polyaxon/sdk/api/projects_v1_api.py +1 -1
  184. polyaxon/sdk/api/queues_v1_api.py +1 -1
  185. polyaxon/sdk/api/runs_v1_api.py +88 -10
  186. polyaxon/sdk/api/searches_v1_api.py +1 -1
  187. polyaxon/sdk/api/service_accounts_v1_api.py +1 -1
  188. polyaxon/sdk/api/tags_v1_api.py +1 -1
  189. polyaxon/sdk/api/teams_v1_api.py +1 -1
  190. polyaxon/sdk/api/users_v1_api.py +1 -1
  191. polyaxon/sdk/api/versions_v1_api.py +1 -1
  192. polyaxon/settings.py +1 -1
  193. polyaxon/utils/urls_utils.py +3 -1
  194. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/METADATA +31 -31
  195. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/RECORD +199 -205
  196. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/WHEEL +1 -1
  197. polyaxon/compiler/contexts/spark_job.py +0 -39
  198. polyaxon/k8s/converter/converters/spark_job.py +0 -64
  199. polyaxon/k8s/custom_resources/spark_job.py +0 -97
  200. polyaxon/polyflow/run/spark/__init__.py +0 -2
  201. polyaxon/polyflow/run/spark/replica.py +0 -165
  202. polyaxon/polyflow/run/spark/spark.py +0 -341
  203. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/LICENSE +0 -0
  204. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/entry_points.txt +0 -0
  205. {polyaxon-2.0.0rc28.dist-info → polyaxon-2.0.0rc29.dist-info}/top_level.txt +0 -0
@@ -1,341 +0,0 @@
1
- from typing import Dict, List, Optional, Union
2
- from typing_extensions import Literal
3
-
4
- from clipped.types.ref_or_obj import RefField
5
- from clipped.utils.enums import PEnum
6
- from pydantic import Field, StrictStr, validator
7
-
8
- from polyaxon.k8s import k8s_schemas, k8s_validation
9
- from polyaxon.polyflow.run.base import BaseRun
10
- from polyaxon.polyflow.run.kinds import V1RunKind
11
- from polyaxon.polyflow.run.resources import V1RunResources
12
- from polyaxon.polyflow.run.spark.replica import V1SparkReplica
13
- from polyaxon.polyflow.run.utils import DestinationImageMixin
14
-
15
-
16
- class V1SparkType(str, PEnum):
17
- JAVA = "java"
18
- SCALA = "scala"
19
- PYTHON = "python"
20
- R = "r"
21
-
22
-
23
- class V1SparkDeploy(str, PEnum):
24
- CLUSTER = "cluster"
25
- CLIENT = "client"
26
- IN_CLUSTER_CLIENT = "in_cluster_client"
27
-
28
-
29
- class V1SparkJob(BaseRun, DestinationImageMixin):
30
- """Spark jobs are used to run Spark applications on Kubernetes.
31
-
32
- [Apache Spark](https://spark.apache.org/) is data-processing engine.
33
-
34
- Args:
35
- kind: str, should be equal `sparkjob`
36
- connections: List[str], optional
37
- volumes: List[[Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes/)],
38
- optional
39
- type: str [`JAVA`, `SCALA`, `PYTHON`, `R`]
40
- spark_version: str, optional
41
- python_version: str, optional
42
- deploy_mode: str, optional
43
- main_class: str, optional
44
- main_application_file: str, optional
45
- arguments: List[str], optional
46
- hadoop_conf: Dict[str, str], optional
47
- spark_conf: Dict[str, str], optional
48
- hadoop_config_map: str, optional
49
- spark_config_map: str, optional
50
- executor: [V1SparkReplica](/docs/experimentation/distributed/spark-replica/)
51
- driver: [V1SparkReplica](/docs/experimentation/distributed/spark-replica/)
52
-
53
- ## YAML usage
54
-
55
- ```yaml
56
- >>> run:
57
- >>> kind: sparkjob
58
- >>> connections:
59
- >>> volumes:
60
- >>> type:
61
- >>> sparkVersion:
62
- >>> deployMode:
63
- >>> mainClass:
64
- >>> mainApplicationFile:
65
- >>> arguments:
66
- >>> hadoopConf:
67
- >>> sparkConf:
68
- >>> hadoopConfigMap:
69
- >>> sparkConfigMap:
70
- >>> executor:
71
- >>> driver:
72
- ```
73
-
74
- ## Python usage
75
-
76
- ```python
77
- >>> from polyaxon.polyflow import V1Environment, V1Init, V1SparkJob, V1SparkReplica, V1SparkType
78
- >>> from polyaxon.k8s import k8s_schemas
79
- >>> spark_job = V1SparkJob(
80
- >>> connections=["connection-name1"],
81
- >>> volumes=[k8s_schemas.V1Volume(...)],
82
- >>> type=V1SparkType.PYTHON,
83
- >>> spark_version="3.0.0",
84
- >>> spark_conf={...},
85
- >>> driver=V1SparkReplica(...),
86
- >>> executor=V1SparkReplica(...),
87
- >>> )
88
- ```
89
-
90
- ## Fields
91
-
92
- ### kind
93
-
94
- The kind signals to the CLI, client, and other tools that this component's runtime is a job.
95
-
96
- If you are using the python client to create the runtime,
97
- this field is not required and is set by default.
98
-
99
- ```yaml
100
- >>> run:
101
- >>> kind: sparkjob
102
- ```
103
-
104
- ### connections
105
-
106
- A list of [connection names](/docs/setup/connections/) to resolve for the job.
107
-
108
- <blockquote class="light">
109
- If you are referencing a connection it must be configured.
110
- All referenced connections will be checked:
111
-
112
- * If they are accessible in the context of the project of this run
113
-
114
- * If the user running the operation can have access to those connections
115
- </blockquote>
116
-
117
- After checks, the connections will be resolved and inject any volumes, secrets, configMaps,
118
- environment variables for your main container to function correctly.
119
-
120
- ```yaml
121
- >>> run:
122
- >>> kind: sparkjob
123
- >>> connections: [connection1, connection2]
124
- ```
125
-
126
- ### volumes
127
-
128
- A list of [Kubernetes Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)
129
- to resolve and mount for your jobs.
130
-
131
- This is an advanced use-case where configuring a connection is not an option.
132
-
133
- When you add a volume you need to mount it manually to your container(s).
134
-
135
- ```yaml
136
- >>> run:
137
- >>> kind: sparkjob
138
- >>> volumes:
139
- >>> - name: volume1
140
- >>> persistentVolumeClaim:
141
- >>> claimName: pvc1
142
- >>> ...
143
- ```
144
-
145
- ### type
146
-
147
- Tells the type of the Spark application, possible values: `Java`, `Scala`, `Python`, `R`
148
-
149
- ```yaml
150
- >>> run:
151
- >>> kind: sparkjob
152
- >>> type: Python
153
- >>> ...
154
- ```
155
-
156
- ### sparkVersion
157
-
158
- The version of Spark the application uses.
159
-
160
- ```yaml
161
- >>> run:
162
- >>> kind: sparkjob
163
- >>> sparkVersion: 3.0.0
164
- >>> ...
165
- ```
166
-
167
- ### deployMode
168
-
169
- The deployment mode of the Spark application.
170
-
171
- ```yaml
172
- >>> run:
173
- >>> kind: sparkjob
174
- >>> deployMode: cluster
175
- >>> ...
176
- ```
177
-
178
- ### mainClass
179
-
180
- The fully-qualified main class of the Spark application.
181
- This only applies to Java/Scala Spark applications.
182
-
183
- ```yaml
184
- >>> run:
185
- >>> kind: sparkjob
186
- >>> mainClass: ...
187
- >>> ...
188
- ```
189
-
190
- ### mainApplicationFile
191
-
192
- The path to a bundled JAR, Python, or R file of the application.
193
-
194
- ```yaml
195
- >>> run:
196
- >>> kind: sparkjob
197
- >>> mainApplicationFile: ...
198
- >>> ...
199
- ```
200
-
201
- ### arguments
202
-
203
- List of arguments to be passed to the application.
204
-
205
- ```yaml
206
- >>> run:
207
- >>> kind: sparkjob
208
- >>> arguments: [...]
209
- >>> ...
210
- ```
211
-
212
- ### hadoopConf
213
-
214
- HadoopConf carries user-specified Hadoop configuration properties as they would use
215
- the "--conf" option in spark-submit.
216
- The SparkApplication controller automatically adds prefix "spark.hadoop."
217
- to Hadoop configuration properties.
218
-
219
- ```yaml
220
- >>> run:
221
- >>> kind: sparkjob
222
- >>> hadoopConf: {...}
223
- >>> ...
224
- ```
225
-
226
- ### sparkConf
227
-
228
- Carries user-specified Spark configuration properties as they would use the "--conf" option in
229
- spark-submit.
230
-
231
- ```yaml
232
- >>> run:
233
- >>> kind: sparkjob
234
- >>> sparkConf: {...}
235
- >>> ...
236
- ```
237
-
238
- ### hadoopConfigMap
239
-
240
- Carries the name of the ConfigMap containing Spark configuration files such as log4j.properties.
241
- The controller will add environment variable SPARK_CONF_DIR to
242
- the path where the ConfigMap is mounted to.
243
-
244
- ```yaml
245
- >>> run:
246
- >>> kind: sparkjob
247
- >>> hadoopConfigMap: {...}
248
- >>> ...
249
- ```
250
-
251
- ### sparkConfigMap
252
-
253
- Carries the name of the ConfigMap containing Spark configuration files such as log4j.properties.
254
- The controller will add environment variable SPARK_CONF_DIR to the
255
- path where the ConfigMap is mounted to.
256
-
257
- ```yaml
258
- >>> run:
259
- >>> kind: sparkjob
260
- >>> sparkConfigMap: {...}
261
- >>> ...
262
- ```
263
-
264
- ### executor
265
-
266
- Executor is a spark replica specification
267
-
268
- ```yaml
269
- >>> run:
270
- >>> kind: sparkjob
271
- >>> executor:
272
- >>> replicas: 1
273
- >>> ...
274
- >>> ...
275
- ```
276
-
277
- ### driver
278
-
279
- Driver a spark replica specification
280
-
281
- ```yaml
282
- >>> run:
283
- >>> kind: sparkjob
284
- >>> driver:
285
- >>> replicas: 1
286
- >>> ...
287
- >>> ...
288
- ```
289
- """
290
-
291
- _IDENTIFIER = V1RunKind.SPARKJOB
292
- _SWAGGER_FIELDS = [
293
- "volumes",
294
- ]
295
-
296
- kind: Literal[_IDENTIFIER] = _IDENTIFIER
297
- connections: Optional[Union[List[StrictStr], RefField]]
298
- volumes: Optional[Union[List[k8s_schemas.V1Volume], RefField]]
299
- type: Optional[V1SparkType]
300
- spark_version: Optional[StrictStr] = Field(alias="sparkVersion")
301
- python_version: Optional[StrictStr] = Field(alias="pythonVersion")
302
- deploy_mode: Optional[V1SparkDeploy] = Field(alias="deployMode")
303
- main_class: Optional[StrictStr] = Field(alias="mainClass")
304
- main_application_file: Optional[StrictStr] = Field(alias="mainApplicationFile")
305
- arguments: Optional[Union[List[StrictStr], RefField]]
306
- hadoop_conf: Optional[Union[Dict[StrictStr, StrictStr], RefField]] = Field(
307
- alias="hadoopConf"
308
- )
309
- spark_conf: Optional[Union[Dict[StrictStr, StrictStr], RefField]] = Field(
310
- alias="sparkConf"
311
- )
312
- hadoop_config_map: Optional[Union[Dict[StrictStr, StrictStr], RefField]] = Field(
313
- alias="hadoopConfigMap"
314
- )
315
- spark_config_map: Optional[Union[Dict[StrictStr, StrictStr], RefField]] = Field(
316
- alias="sparkConfigMap"
317
- )
318
- executor: Optional[Union[V1SparkReplica, RefField]]
319
- driver: Optional[Union[V1SparkReplica, RefField]]
320
-
321
- @validator("volumes", always=True, pre=True)
322
- def validate_volumes(cls, v):
323
- if not v:
324
- return v
325
- return [k8s_validation.validate_k8s_volume(vi) for vi in v]
326
-
327
- def get_resources(self):
328
- resources = V1RunResources()
329
- for i in range(self.replicas or 1):
330
- resources += V1RunResources.from_container(self.container)
331
-
332
- return resources
333
-
334
- def get_all_containers(self):
335
- return [self.container] if self.container else []
336
-
337
- def get_all_connections(self):
338
- return self.connections or []
339
-
340
- def get_all_init(self):
341
- return self.init or []