Skip to content

Commit

Permalink
Replace super(AsyncAgentBase) with super(DatabricksAgent) (#2590)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw authored Jul 19, 2024
1 parent 5a4ba2f commit f04f206
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/flytekit-spark/flytekitplugins/spark/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class DatabricksAgentV2(DatabricksAgent):
"""

def __init__(self):
super(AsyncAgentBase, self).__init__(task_type_name="databricks", metadata_type=DatabricksJobMetadata)
super(DatabricksAgent, self).__init__(task_type_name="databricks", metadata_type=DatabricksJobMetadata)


def get_header() -> typing.Dict[str, str]:
Expand Down
7 changes: 6 additions & 1 deletion plugins/flytekit-spark/flytekitplugins/spark/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ def __init__(
self._default_applications_path or "local:///usr/local/bin/entrypoint.py"
)

if isinstance(task_config, DatabricksV2):
task_type = "databricks"
else:
task_type = "spark"

super(PysparkFunctionTask, self).__init__(
task_config=task_config,
task_type=self._SPARK_TASK_TYPE,
task_type=task_type,
task_function=task_function,
container_image=container_image,
**kwargs,
Expand Down

0 comments on commit f04f206

Please sign in to comment.