In the Fluid framework, the default access mode of a dataset is ReadOnlyMany. You can modify the Dataset.spec.accessModes
field of a dataset to change the access mode of the dataset. This topic describes how to configure the access mode of a dataset.
Use scenarios
Datasets support the ReadOnlyMany and ReadWriteMany access modes:
The ReadOnlyMany mode is ideal for scenarios where only read permissions on data are required. For example, you can use this mode if your application is designed to read data for training machine learning models or load machine learning model files in Object Storage Service (OSS) or File Storage NAS (NAS) for model inference services.
The ReadWriteMany mode is ideal for scenarios where both read and write permissions on data are required. For example, you can use this mode if your application is designed to read data for reprocessing and write the preprocessed data to the caching system or backend file system.
Sample dataset
apiVersion: data.fluid.io/v1alpha1
kind: Dataset
metadata:
name: demo-readwrite
spec:
mounts:
- mountPoint: <mountpoint>
name: demo
accessModes:
- ReadWriteMany
Parameter | Description |
mountPoint | In this example, JindoRuntime (JindoFS) is used. Set the value to oss://<oss_bucket>/<bucket_dir>.
|
accessModes | Set the access mode of the dataset. Valid values:
|