-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(interactive): support non-blocking data loading interface in coor…
…dinator and fix failure during flexbuild process (#3530)
- Loading branch information
1 parent
3e85935
commit d29516b
Showing
41 changed files
with
3,456 additions
and
1,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ | |
|
||
gs_flex_coordinator/controllers/* | ||
setup.py | ||
requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
flex/coordinator/gs_flex_coordinator/controllers/job_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import connexion | ||
from typing import Dict | ||
from typing import Tuple | ||
from typing import Union | ||
|
||
from gs_flex_coordinator.core import client_wrapper | ||
from gs_flex_coordinator.core import handle_api_exception | ||
from gs_flex_coordinator.models.job_status import JobStatus # noqa: E501 | ||
from gs_flex_coordinator.models.schema_mapping import SchemaMapping # noqa: E501 | ||
from gs_flex_coordinator import util | ||
|
||
|
||
@handle_api_exception() | ||
def create_dataloading_job(graph_name, schema_mapping): # noqa: E501 | ||
"""create_dataloading_job | ||
# noqa: E501 | ||
:param graph_name: | ||
:type graph_name: str | ||
:param schema_mapping: | ||
:type schema_mapping: dict | bytes | ||
:rtype: Union[str, Tuple[str, int], Tuple[str, int, Dict[str, str]] | ||
""" | ||
if connexion.request.is_json: | ||
schema_mapping = SchemaMapping.from_dict(connexion.request.get_json()) # noqa: E501 | ||
return client_wrapper.create_dataloading_job(graph_name, schema_mapping) | ||
|
||
|
||
@handle_api_exception() | ||
def delete_job_by_id(job_id): # noqa: E501 | ||
"""delete_job_by_id | ||
# noqa: E501 | ||
:param job_id: | ||
:type job_id: str | ||
:rtype: Union[str, Tuple[str, int], Tuple[str, int, Dict[str, str]] | ||
""" | ||
return client_wrapper.delete_job_by_id(job_id) | ||
|
||
|
||
@handle_api_exception() | ||
def get_job_by_id(job_id): # noqa: E501 | ||
"""get_job_by_id | ||
# noqa: E501 | ||
:param job_id: | ||
:type job_id: str | ||
:rtype: Union[JobStatus, Tuple[JobStatus, int], Tuple[JobStatus, int, Dict[str, str]] | ||
""" | ||
return client_wrapper.get_job_by_id(job_id) | ||
|
||
|
||
@handle_api_exception() | ||
def list_jobs(): # noqa: E501 | ||
"""list_jobs | ||
# noqa: E501 | ||
:rtype: Union[List[JobStatus], Tuple[List[JobStatus], int], Tuple[List[JobStatus], int, Dict[str, str]] | ||
""" | ||
return client_wrapper.list_jobs() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
flex/coordinator/gs_flex_coordinator/core/interactive/hqps_client/api/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
# flake8: noqa | ||
|
||
# import apis into api package | ||
from hqps_client.api.dataloading_api import DataloadingApi | ||
from hqps_client.api.graph_api import GraphApi | ||
from hqps_client.api.node_api import NodeApi | ||
from hqps_client.api.job_api import JobApi | ||
from hqps_client.api.procedure_api import ProcedureApi | ||
from hqps_client.api.service_api import ServiceApi | ||
|
Oops, something went wrong.