Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOPSWORKS-2085] redshift connector #177

Merged
merged 16 commits into from
Dec 5, 2020
Prev Previous commit
Next Next commit
remove get by id
ErmiasG committed Dec 3, 2020
commit 00df47957d15b1a78d09d3c03dbd8fa5356f5633
16 changes: 0 additions & 16 deletions python/hsfs/core/storage_connector_api.py
Original file line number Diff line number Diff line change
@@ -49,22 +49,6 @@ def get(self, name, connector_type):
_client._send_request("GET", path_params, query_params=query_params)
)

def get_by_id(self, connector_id, connector_type):
_client = client.get_instance()
path_params = [
"project",
_client._project_id,
"featurestores",
self._feature_store_id,
"storageconnectors",
connector_type,
connector_id,
]
query_params = {"temporaryCredentials": True}
return storage_connector.StorageConnector.from_response_json(
_client._send_request("GET", path_params, query_params=query_params)
)

def get_online_connector(self):
_client = client.get_instance()
path_params = [
5 changes: 2 additions & 3 deletions python/hsfs/training_dataset.py
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ def __init__(
jobs=None,
inode_id=None,
storage_connector_name=None,
storage_connector_id=None,
storage_connector_type=None,
training_dataset_type=None,
from_query=None,
@@ -105,8 +104,8 @@ def __init__(
else:
# type available -> init from backend response
# make rest call to get all connector information, description etc.
self._storage_connector = self._storage_connector_api.get_by_id(
storage_connector_id, storage_connector_type
self._storage_connector = self._storage_connector_api.get(
storage_connector_name, storage_connector_type
)
self._features = [
training_dataset_feature.TrainingDatasetFeature.from_response_json(feat)