File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
main/java/com/scalar/db/storage/objectstorage/cloudstorage
test/java/com/scalar/db/storage/objectstorage/cloudstorage Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11package com .scalar .db .storage .objectstorage .cloudstorage ;
22
33import static com .scalar .db .config .ConfigUtils .getInt ;
4+ import static com .scalar .db .config .ConfigUtils .getString ;
45
56import com .google .auth .Credentials ;
67import com .google .auth .oauth2 .ServiceAccountCredentials ;
1718public class CloudStorageConfig implements ObjectStorageConfig {
1819 public static final String STORAGE_NAME = "cloud-storage" ;
1920 public static final String PREFIX = DatabaseConfig .PREFIX + STORAGE_NAME + "." ;
21+ public static final String TABLE_METADATA_NAMESPACE = PREFIX + "table_metadata.namespace" ;
2022
2123 public static final String PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES =
2224 PREFIX + "parallel_upload_block_size_in_bytes" ;
@@ -40,7 +42,11 @@ public CloudStorageConfig(DatabaseConfig databaseConfig) {
4042 bucket = databaseConfig .getContactPoints ().get (0 );
4143 projectId = databaseConfig .getUsername ().orElse (null );
4244 password = databaseConfig .getPassword ().orElse (null );
43- metadataNamespace = databaseConfig .getSystemNamespaceName ();
45+ metadataNamespace =
46+ getString (
47+ databaseConfig .getProperties (),
48+ TABLE_METADATA_NAMESPACE ,
49+ DatabaseConfig .DEFAULT_SYSTEM_NAMESPACE_NAME );
4450
4551 if (databaseConfig .getScanFetchSize () != DatabaseConfig .DEFAULT_SCAN_FETCH_SIZE ) {
4652 logger .warn (
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public void constructor_AllPropertiesGiven_ShouldLoadProperly() {
2424 props .setProperty (DatabaseConfig .USERNAME , ANY_PROJECT_ID );
2525 props .setProperty (DatabaseConfig .PASSWORD , ANY_PASSWORD );
2626 props .setProperty (DatabaseConfig .STORAGE , CloudStorage_STORAGE );
27- props .setProperty (DatabaseConfig . SYSTEM_NAMESPACE_NAME , ANY_TABLE_METADATA_NAMESPACE );
27+ props .setProperty (CloudStorageConfig . TABLE_METADATA_NAMESPACE , ANY_TABLE_METADATA_NAMESPACE );
2828 props .setProperty (
2929 CloudStorageConfig .PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES ,
3030 ANY_PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES );
You can’t perform that action at this time.
0 commit comments