Skip to content

Commit

Permalink
rename 'minio' to 's3' in Storage Config section (milvus-io#1088)
Browse files Browse the repository at this point in the history
* milvus-io#1002 rename 'minio' to 's3' in Storage Config section

* milvus-io#1002 clang format
  • Loading branch information
cydrain authored and JinHai-CN committed Jan 18, 2020
1 parent 015f035 commit 364fc25
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 221 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Please mark all change in change log and use the issue from GitHub
- \#908 - Move "primary_path" and "secondary_path" to storage config
- \#931 - Remove "collector" from config
- \#966 - Update NOTICE.md
- \#1002 - Rename minio to s3 in Storage Config section

## Task

Expand Down
24 changes: 12 additions & 12 deletions core/conf/demo/server_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ db_config:
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
# s3_enable | Enable Simple Storage Service or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | IP | 127.0.0.1 |
# s3_address | Simple Storage Service IP address. | IP | 127.0.0.1 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_port | MinIO storage service port. Port range (1024, 65535) | Integer | 9000 |
# s3_port | Simple Storage Service port. Port range (1024, 65535) | Integer | 9000 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_access_key | MinIO storage service access key. | String | minioadmin |
# s3_access_key | Simple Storage Service access key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_secret_key | MinIO storage service secret key. | String | minioadmin |
# s3_secret_key | Simple Storage Service secret key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
# s3_bucket | Simple Storage Service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: /var/lib/milvus
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000
minio_access_key: minioadmin
minio_secret_key: minioadmin
minio_bucket: milvus-bucket
s3_enable: false
s3_address: 127.0.0.1
s3_port: 9000
s3_access_key: minioadmin
s3_secret_key: minioadmin
s3_bucket: milvus-bucket

#----------------------+------------------------------------------------------------+------------+-----------------+
# Metric Config | Description | Type | Default |
Expand Down
24 changes: 12 additions & 12 deletions core/conf/server_cpu_config.template
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ db_config:
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
# s3_enable | Enable Simple Storage Service or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | IP | 127.0.0.1 |
# s3_address | Simple Storage Service IP address. | IP | 127.0.0.1 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_port | MinIO storage service port. Port range (1024, 65535) | Integer | 9000 |
# s3_port | Simple Storage Service port. Port range (1024, 65535) | Integer | 9000 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_access_key | MinIO storage service access key. | String | minioadmin |
# s3_access_key | Simple Storage Service access key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_secret_key | MinIO storage service secret key. | String | minioadmin |
# s3_secret_key | Simple Storage Service secret key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
# s3_bucket | Simple Storage Service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000
minio_access_key: minioadmin
minio_secret_key: minioadmin
minio_bucket: milvus-bucket
s3_enable: false
s3_address: 127.0.0.1
s3_port: 9000
s3_access_key: minioadmin
s3_secret_key: minioadmin
s3_bucket: milvus-bucket

#----------------------+------------------------------------------------------------+------------+-----------------+
# Metric Config | Description | Type | Default |
Expand Down
24 changes: 12 additions & 12 deletions core/conf/server_gpu_config.template
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ db_config:
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
# s3_enable | Enable Simple Storage Service or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | IP | 127.0.0.1 |
# s3_address | Simple Storage Service IP address. | IP | 127.0.0.1 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_port | MinIO storage service port. Port range (1024, 65535) | Integer | 9000 |
# s3_port | Simple Storage Service port. Port range (1024, 65535) | Integer | 9000 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_access_key | MinIO storage service access key. | String | minioadmin |
# s3_access_key | Simple Storage Service access key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_secret_key | MinIO storage service secret key. | String | minioadmin |
# s3_secret_key | Simple Storage Service secret key. | String | minioadmin |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
# s3_bucket | Simple Storage Service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000
minio_access_key: minioadmin
minio_secret_key: minioadmin
minio_bucket: milvus-bucket
s3_enable: false
s3_address: 127.0.0.1
s3_port: 9000
s3_access_key: minioadmin
s3_secret_key: minioadmin
s3_bucket: milvus-bucket

#----------------------+------------------------------------------------------------+------------+-----------------+
# Metric Config | Description | Type | Default |
Expand Down
12 changes: 6 additions & 6 deletions core/src/db/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ DeleteTablePath(const DBMetaOptions& options, const std::string& table_id, bool
}
}

bool minio_enable = false;
bool s3_enable = false;
server::Config& config = server::Config::GetInstance();
config.GetStorageConfigMinioEnable(minio_enable);
config.GetStorageConfigS3Enable(s3_enable);

if (minio_enable) {
if (s3_enable) {
std::string table_path = options.path_ + TABLES_FOLDER + table_id;

auto& storage_inst = milvus::storage::S3ClientWrapper::GetInstance();
Expand Down Expand Up @@ -156,10 +156,10 @@ GetTableFilePath(const DBMetaOptions& options, meta::TableFileSchema& table_file
std::string parent_path = ConstructParentFolder(options.path_, table_file);
std::string file_path = parent_path + "/" + table_file.file_id_;

bool minio_enable = false;
bool s3_enable = false;
server::Config& config = server::Config::GetInstance();
config.GetStorageConfigMinioEnable(minio_enable);
if (minio_enable) {
config.GetStorageConfigS3Enable(s3_enable);
if (s3_enable) {
/* need not check file existence */
table_file.location_ = file_path;
return Status::OK();
Expand Down
Loading

0 comments on commit 364fc25

Please sign in to comment.