Skip to content

Commit f8f45d3

Browse files
committed
Add mount_name as a required parameter for FluidClient.create_dataset()
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
1 parent 0eb6068 commit f8f45d3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/kubernetes/create_dataset_and_runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def main():
2929

3030
dataset_name = "demo"
3131
try:
32-
fluid_client.create_dataset(dataset_name, "https://mirrors.bit.edu.cn/apache/hbase/stable/", "/hbase")
32+
fluid_client.create_dataset(dataset_name, "hbase", "https://mirrors.bit.edu.cn/apache/hbase/stable/", "/hbase")
3333
except Exception as e:
3434
raise RuntimeError("f""Failed to create dataset: {e}")
3535

fluid/api/fluid_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def __init__(self, config: ClientConfig):
5050
self.k8s_client = FluidK8sClient(config.namespace, config.runtime_kind, config.kube_config_file,
5151
config.kube_context, config.kube_client_configuration)
5252

53-
def create_dataset(self, dataset_name: str, mount_point: str, mount_path="/", mode="ReadOnly", options=None,
53+
def create_dataset(self, dataset_name: str, mount_name: str, mount_point: str, mount_path="", mode="ReadOnly",
54+
options=None,
5455
cred_secret_name=None,
5556
cred_secret_options=None, namespace=None,
5657
**kwargs):
@@ -75,7 +76,7 @@ def create_dataset(self, dataset_name: str, mount_point: str, mount_path="/", mo
7576
api_version=constants.API_VERSION,
7677
kind=constants.DATASET_KIND,
7778
metadata=client.V1ObjectMeta(
78-
name=dataset_name,
79+
name=mount_name,
7980
namespace=namespace or self.config.namespace,
8081
),
8182
spec=models.DatasetSpec(

0 commit comments

Comments
 (0)