diff --git a/CHANGES.md b/CHANGES.md index 305e8b5367..0eb427e041 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -58,6 +58,7 @@ Release Notes. * Rebuilt ElasticSearch client on top of their REST API. * Fix ElasticSearch storage plugin doesn't work when hot reloading from `secretsManagementFile`. * Support etcd grouped dynamic configurations. +* Unified the config word `namespace` in the project. #### UI diff --git a/docs/en/setup/backend/backend-cluster.md b/docs/en/setup/backend/backend-cluster.md index dcd025a0f9..119a04d0ef 100644 --- a/docs/en/setup/backend/backend-cluster.md +++ b/docs/en/setup/backend/backend-cluster.md @@ -47,7 +47,7 @@ The following settings are provided to set the host and port manually, based on ```yaml zookeeper: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} hostPort: ${SW_CLUSTER_ZK_HOST_PORT:localhost:2181} #Retry Policy baseSleepTimeMs: ${SW_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries diff --git a/docs/en/setup/backend/backend-storage.md b/docs/en/setup/backend/backend-storage.md index c4fd76c9f2..45468f5390 100644 --- a/docs/en/setup/backend/backend-storage.md +++ b/docs/en/setup/backend/backend-storage.md @@ -54,7 +54,7 @@ follows: storage: selector: ${SW_STORAGE:elasticsearch} elasticsearch: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""} @@ -90,7 +90,7 @@ Example: storage: selector: ${SW_STORAGE:elasticsearch} elasticsearch: - # nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} user: ${SW_ES_USER:""} # User needs to be set when Http Basic authentication is enabled password: ${SW_ES_PASSWORD:""} # Password to be set when Http Basic authentication is enabled clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:443} @@ -166,7 +166,7 @@ The configurations are largely the same. storage: selector: ${SW_STORAGE:zipkin-elasticsearch} zipkin-elasticsearch: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} user: ${SW_ES_USER:""} diff --git a/docs/en/setup/backend/configuration-vocabulary.md b/docs/en/setup/backend/configuration-vocabulary.md index d857d3e1fd..5387a69c91 100644 --- a/docs/en/setup/backend/configuration-vocabulary.md +++ b/docs/en/setup/backend/configuration-vocabulary.md @@ -47,7 +47,7 @@ core|default|role|Option values: `Mixed/Receiver/Aggregator`. **Receiver** mode | - | - | prepareThreads| The number of threads used to prepare metrics data to the storage. | SW_CORE_PREPARE_THREADS | 2 | | - | - | enableEndpointNameGroupingByOpenapi | Automatically groups endpoints by the given OpenAPI definitions. | SW_CORE_ENABLE_ENDPOINT_NAME_GROUPING_BY_OPAENAPI | true | |cluster|standalone| - | Standalone is not suitable for running on a single node running. No configuration available. | - | - | -| - | zookeeper|nameSpace| The namespace, represented by root path, isolates the configurations in Zookeeper.|SW_NAMESPACE| `/`, root path| +| - | zookeeper|namespace| The namespace, represented by root path, isolates the configurations in Zookeeper.|SW_NAMESPACE| `/`, root path| | - | - | hostPort| Hosts and ports of Zookeeper Cluster. |SW_CLUSTER_ZK_HOST_PORT| localhost:2181| | - | - | baseSleepTimeMs| The period of Zookeeper client between two retries (in milliseconds). |SW_CLUSTER_ZK_SLEEP_TIME|1000| | - | - | maxRetries| The maximum retry time. |SW_CLUSTER_ZK_MAX_RETRIES|3| @@ -80,7 +80,7 @@ core|default|role|Option values: `Mixed/Receiver/Aggregator`. **Receiver** mode | - | - | accessKey | Nacos Auth accessKey. | SW_CLUSTER_NACOS_ACCESSKEY | - | | - | - | secretKey | Nacos Auth secretKey. | SW_CLUSTER_NACOS_SECRETKEY | - | | storage|elasticsearch| - | ElasticSearch (and OpenSearch) storage implementation. | - | - | -| - | - | nameSpace | Prefix of indexes created and used by SkyWalking. | SW_NAMESPACE | - | +| - | - | namespace | Prefix of indexes created and used by SkyWalking. | SW_NAMESPACE | - | | - | - | clusterNodes | ElasticSearch cluster nodes for client connection.| SW_STORAGE_ES_CLUSTER_NODES |localhost| | - | - | protocol | HTTP or HTTPs. | SW_STORAGE_ES_HTTP_PROTOCOL | HTTP| | - | - | connectTimeout | Connect timeout of ElasticSearch client (in milliseconds). | SW_STORAGE_ES_CONNECT_TIMEOUT | 500| @@ -236,7 +236,7 @@ core|default|role|Option values: `Mixed/Receiver/Aggregator`. **Receiver** mode | - | - | apolloEnv | `env` in Apollo. | SW_CONFIG_APOLLO_ENV | - | | - | - | appId | `app.id` in Apollo. | SW_CONFIG_APOLLO_APP_ID | skywalking | | - | - | period | The period of data sync (in seconds). | SW_CONFIG_APOLLO_PERIOD | 60 | -| - | zookeeper|nameSpace| The namespace (represented by root path) that isolates the configurations in the Zookeeper. |SW_CONFIG_ZK_NAMESPACE| `/`, root path| +| - | zookeeper|namespace| The namespace (represented by root path) that isolates the configurations in the Zookeeper. |SW_CONFIG_ZK_NAMESPACE| `/`, root path| | - | - | hostPort| Hosts and ports of Zookeeper Cluster. |SW_CONFIG_ZK_HOST_PORT| localhost:2181| | - | - | baseSleepTimeMs|The period of Zookeeper client between two retries (in milliseconds). |SW_CONFIG_ZK_BASE_SLEEP_TIME_MS|1000| | - | - | maxRetries| The maximum retry time. |SW_CONFIG_ZK_MAX_RETRIES|3| diff --git a/docs/en/setup/backend/dynamic-config-zookeeper.md b/docs/en/setup/backend/dynamic-config-zookeeper.md index a14d474e8c..e2b7279a06 100755 --- a/docs/en/setup/backend/dynamic-config-zookeeper.md +++ b/docs/en/setup/backend/dynamic-config-zookeeper.md @@ -6,26 +6,26 @@ configuration: selector: ${SW_CONFIGURATION:zookeeper} zookeeper: period: ${SW_CONFIG_ZK_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds. - nameSpace: ${SW_CONFIG_ZK_NAMESPACE:/default} + namespace: ${SW_CONFIG_ZK_NAMESPACE:/default} hostPort: ${SW_CONFIG_ZK_HOST_PORT:localhost:2181} # Retry Policy baseSleepTimeMs: ${SW_CONFIG_ZK_BASE_SLEEP_TIME_MS:1000} # initial amount of time to wait between retries maxRetries: ${SW_CONFIG_ZK_MAX_RETRIES:3} # max number of times to retry ``` -The **nameSpace** is the ZooKeeper path. The config key and value are the properties of the `namespace` folder. +The **namespace** is the ZooKeeper path. The config key and value are the properties of the `namespace` folder. ## Config Storage ### Single Config ``` -znode.path = {nameSpace}/configKey +znode.path = {namespace}/configKey configValue = znode.data ``` e.g. The config is: ``` {agent-analyzer.default.slowDBAccessThreshold}:{default:200,mongodb:50} ``` -If `nameSpace = /default` the config in zookeeper is: +If `namespace = /default` the config in zookeeper is: ``` znode.path = /default/agent-analyzer.default.slowDBAccessThreshold znode.data = default:200,mongodb:50 @@ -33,7 +33,7 @@ znode.data = default:200,mongodb:50 ### Group Config ``` -znode.path = {nameSpace}/configKey +znode.path = {namespace}/configKey znode.child1.path = {znode.path}/subItemkey1 znode.child2.path = {znode.path}/subItemkey2 ... @@ -47,7 +47,7 @@ e.g. The config is: |{productAPI-v1}:{value of productAPI-v1} |{productAPI-v2}:{value of productAPI-v2} ``` -If `nameSpace = /default` the config in zookeeper is: +If `namespace = /default` the config in zookeeper is: ``` znode.path = /default/core.default.endpoint-name-grouping-openapi znode.customerAPI-v1.path = /default/core.default.endpoint-name-grouping-openapi/customerAPI-v1 diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperConfig.java b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperConfig.java index 78a19db923..c0bdef4f95 100644 --- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperConfig.java +++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperConfig.java @@ -27,7 +27,7 @@ class ClusterModuleZookeeperConfig extends ModuleConfig { @Setter @Getter - private String nameSpace; + private String namespace; private String hostPort; private int baseSleepTimeMs; private int maxRetries; diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperProvider.java b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperProvider.java index 1af4fa75ed..595b9d3948 100644 --- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperProvider.java +++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ClusterModuleZookeeperProvider.java @@ -118,7 +118,7 @@ public class ClusterModuleZookeeperProvider extends ModuleProvider { } client = builder.build(); - String path = BASE_PATH + (StringUtil.isEmpty(config.getNameSpace()) ? "" : "/" + config.getNameSpace()); + String path = BASE_PATH + (StringUtil.isEmpty(config.getNamespace()) ? "" : "/" + config.getNamespace()); serviceDiscovery = ServiceDiscoveryBuilder.builder(RemoteInstance.class) .client(client) diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java index 1d38a25a67..3d4420319e 100644 --- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java +++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java @@ -199,7 +199,7 @@ public class ITClusterModuleZookeeperProviderFunctionalTest { moduleConfig.setMaxRetries(3); if (!StringUtil.isEmpty(namespace)) { - moduleConfig.setNameSpace(namespace); + moduleConfig.setNamespace(namespace); } if (!StringUtil.isEmpty(internalComHost)) { diff --git a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigWatcherRegister.java b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigWatcherRegister.java index fe9d07d754..74f459b712 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigWatcherRegister.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigWatcherRegister.java @@ -39,11 +39,11 @@ public class ZookeeperConfigWatcherRegister extends ConfigWatcherRegister { public ZookeeperConfigWatcherRegister(ZookeeperServerSettings settings) throws Exception { super(settings.getPeriod()); - prefix = settings.getNameSpace() + "/"; + prefix = settings.getNamespace() + "/"; RetryPolicy retryPolicy = new ExponentialBackoffRetry(settings.getBaseSleepTimeMs(), settings.getMaxRetries()); this.client = CuratorFrameworkFactory.newClient(settings.getHostPort(), retryPolicy); client.start(); - this.childrenCache = new PathChildrenCache(client, settings.getNameSpace(), true); + this.childrenCache = new PathChildrenCache(client, settings.getNamespace(), true); this.childrenCache.start(); } diff --git a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigurationProvider.java b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigurationProvider.java index 618297f794..a3397a7aa6 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigurationProvider.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperConfigurationProvider.java @@ -49,8 +49,8 @@ public class ZookeeperConfigurationProvider extends AbstractConfigurationProvide if (Strings.isNullOrEmpty(settings.getHostPort())) { throw new ModuleStartException("Zookeeper hostPort cannot be null or empty."); } - if (Strings.isNullOrEmpty(settings.getNameSpace())) { - throw new ModuleStartException("Zookeeper nameSpace cannot be null or empty."); + if (Strings.isNullOrEmpty(settings.getNamespace())) { + throw new ModuleStartException("Zookeeper namespace cannot be null or empty."); } try { diff --git a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperServerSettings.java b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperServerSettings.java index 43603a4a33..9f7ec33484 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperServerSettings.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/main/java/org/apache/skywalking/oap/server/configuration/zookeeper/ZookeeperServerSettings.java @@ -27,7 +27,7 @@ import org.apache.skywalking.oap.server.library.module.ModuleConfig; @Setter @ToString public class ZookeeperServerSettings extends ModuleConfig { - private String nameSpace = "/default"; + private String namespace = "/default"; private String hostPort; private int baseSleepTimeMs = 1000; private int maxRetries = 3; diff --git a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java index f5e6b5b3b5..abf71ae7fc 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java @@ -78,23 +78,23 @@ public class ITZookeeperConfigurationTest { @SuppressWarnings("StatementWithEmptyBody") @Test(timeout = 20000) public void shouldReadUpdated() throws Exception { - String nameSpace = "/default"; + String namespace = "/default"; String key = "test-module.default.testKey"; assertNull(provider.watcher.value()); RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3); CuratorFramework client = CuratorFrameworkFactory.newClient(zkAddress, retryPolicy); client.start(); - log.info("per path: " + nameSpace + "/" + key); + log.info("per path: " + namespace + "/" + key); - assertTrue(client.create().creatingParentsIfNeeded().forPath(nameSpace + "/" + key, "500".getBytes()) != null); + assertTrue(client.create().creatingParentsIfNeeded().forPath(namespace + "/" + key, "500".getBytes()) != null); - log.info("data: " + new String(client.getData().forPath(nameSpace + "/" + key))); + log.info("data: " + new String(client.getData().forPath(namespace + "/" + key))); for (String v = provider.watcher.value(); v == null; v = provider.watcher.value()) { } - assertTrue(client.delete().forPath(nameSpace + "/" + key) == null); + assertTrue(client.delete().forPath(namespace + "/" + key) == null); for (String v = provider.watcher.value(); v != null; v = provider.watcher.value()) { } @@ -104,28 +104,28 @@ public class ITZookeeperConfigurationTest { @Test(timeout = 20000) public void shouldReadUpdated4GroupConfig() throws Exception { - String nameSpace = "/default"; + String namespace = "/default"; String key = "test-module.default.testKeyGroup"; assertEquals("{}", provider.groupWatcher.groupItems().toString()); RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3); CuratorFramework client = CuratorFrameworkFactory.newClient(zkAddress, retryPolicy); client.start(); - log.info("per path: " + nameSpace + "/" + key); + log.info("per path: " + namespace + "/" + key); - assertTrue(client.create().creatingParentsIfNeeded().forPath(nameSpace + "/" + key + "/item1", "100".getBytes()) != null); - assertTrue(client.create().creatingParentsIfNeeded().forPath(nameSpace + "/" + key + "/item2", "200".getBytes()) != null); + assertTrue(client.create().creatingParentsIfNeeded().forPath(namespace + "/" + key + "/item1", "100".getBytes()) != null); + assertTrue(client.create().creatingParentsIfNeeded().forPath(namespace + "/" + key + "/item2", "200".getBytes()) != null); - log.info("data: " + new String(client.getData().forPath(nameSpace + "/" + key + "/item1"))); - log.info("data: " + new String(client.getData().forPath(nameSpace + "/" + key + "/item2"))); + log.info("data: " + new String(client.getData().forPath(namespace + "/" + key + "/item1"))); + log.info("data: " + new String(client.getData().forPath(namespace + "/" + key + "/item2"))); for (String v = provider.groupWatcher.groupItems().get("item1"); v == null; v = provider.groupWatcher.groupItems().get("item1")) { } for (String v = provider.groupWatcher.groupItems().get("item2"); v == null; v = provider.groupWatcher.groupItems().get("item2")) { } - assertTrue(client.delete().forPath(nameSpace + "/" + key + "/item1") == null); - assertTrue(client.delete().forPath(nameSpace + "/" + key + "/item2") == null); + assertTrue(client.delete().forPath(namespace + "/" + key + "/item1") == null); + assertTrue(client.delete().forPath(namespace + "/" + key + "/item2") == null); for (String v = provider.groupWatcher.groupItems().get("item1"); v != null; v = provider.groupWatcher.groupItems().get("item1")) { } diff --git a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/MockZookeeperConfigWatcherRegister.java b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/MockZookeeperConfigWatcherRegister.java index 8145a660de..3b2800e689 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/MockZookeeperConfigWatcherRegister.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/MockZookeeperConfigWatcherRegister.java @@ -33,7 +33,7 @@ public class MockZookeeperConfigWatcherRegister extends ConfigWatcherRegister { public MockZookeeperConfigWatcherRegister(ZookeeperServerSettings settings) throws Exception { super(settings.getPeriod()); - prefix = settings.getNameSpace() + "/"; + prefix = settings.getNamespace() + "/"; } @Override diff --git a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/ZookeeperConfigWatcherRegisterTestCase.java b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/ZookeeperConfigWatcherRegisterTestCase.java index e4e08fb7d1..ac22408f29 100644 --- a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/ZookeeperConfigWatcherRegisterTestCase.java +++ b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/ut/ZookeeperConfigWatcherRegisterTestCase.java @@ -34,16 +34,16 @@ import static org.mockito.Mockito.when; public class ZookeeperConfigWatcherRegisterTestCase { @Test public void TestCase() throws Exception { - final String nameSpace = "/default"; + final String namespace = "/default"; final String key = "receiver-trace.default.slowDBAccessThreshold"; final String value = "default:100,mongodb:50"; final ZookeeperServerSettings mockSettings = mock(ZookeeperServerSettings.class); - when(mockSettings.getNameSpace()).thenReturn(nameSpace); + when(mockSettings.getNamespace()).thenReturn(namespace); final MockZookeeperConfigWatcherRegister mockRegister = spy(new MockZookeeperConfigWatcherRegister(mockSettings)); final PathChildrenCache mockPathChildrenCache = mock(PathChildrenCache.class); - when(mockPathChildrenCache.getCurrentData(nameSpace + "/" + key)).thenReturn(new ChildData(nameSpace + "/" + key, null, value + when(mockPathChildrenCache.getCurrentData(namespace + "/" + key)).thenReturn(new ChildData(namespace + "/" + key, null, value .getBytes())); Whitebox.setInternalState(mockRegister, "childrenCache", mockPathChildrenCache); diff --git a/oap-server/server-configuration/configuration-zookeeper/src/test/resources/application.yml b/oap-server/server-configuration/configuration-zookeeper/src/test/resources/application.yml index b8c16cd4aa..aa4338b18c 100755 --- a/oap-server/server-configuration/configuration-zookeeper/src/test/resources/application.yml +++ b/oap-server/server-configuration/configuration-zookeeper/src/test/resources/application.yml @@ -20,7 +20,7 @@ test-module: configuration: zookeeper: period : 1 # Unit seconds, sync period. Default fetch every 60 seconds. - nameSpace: /default + namespace: /default hostPort: ${zk.address} baseSleepTimeMs: 1000 # initial amount of time to wait between retries maxRetries: 3 # max number of times to retry diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java index d33d1582dd..57dce65a14 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java @@ -28,7 +28,7 @@ import org.apache.skywalking.oap.server.library.module.ModuleConfig; @Getter public class CoreModuleConfig extends ModuleConfig { private String role = "Mixed"; - private String nameSpace; + private String namespace; private String restHost; private int restPort; private String restContextPath; diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index e71db21a25..6be5df621f 100755 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -19,7 +19,7 @@ cluster: # Please check your ZooKeeper is 3.5+, However, it is also compatible with ZooKeeper 3.4.x. Replace the ZooKeeper 3.5+ # library the oap-libs folder with your ZooKeeper 3.4.x library. zookeeper: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} hostPort: ${SW_CLUSTER_ZK_HOST_PORT:localhost:2181} # Retry Policy baseSleepTimeMs: ${SW_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries @@ -120,7 +120,7 @@ core: storage: selector: ${SW_STORAGE:h2} elasticsearch: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} connectTimeout: ${SW_STORAGE_ES_CONNECT_TIMEOUT:500} @@ -207,7 +207,7 @@ storage: maxSizeOfArrayColumn: ${SW_STORAGE_MAX_SIZE_OF_ARRAY_COLUMN:20} numOfSearchableValuesPerTag: ${SW_STORAGE_NUM_OF_SEARCHABLE_VALUES_PER_TAG:2} zipkin-elasticsearch: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""} @@ -425,7 +425,7 @@ configuration: period: ${SW_CONFIG_APOLLO_PERIOD:5} zookeeper: period: ${SW_CONFIG_ZK_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds. - nameSpace: ${SW_CONFIG_ZK_NAMESPACE:/default} + namespace: ${SW_CONFIG_ZK_NAMESPACE:/default} hostPort: ${SW_CONFIG_ZK_HOST_PORT:localhost:2181} # Retry Policy baseSleepTimeMs: ${SW_CONFIG_ZK_BASE_SLEEP_TIME_MS:1000} # initial amount of time to wait between retries diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java index 43758c2f78..aecf642f44 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java @@ -26,7 +26,7 @@ import org.apache.skywalking.oap.server.library.module.ModuleConfig; @Getter @Setter public class StorageModuleElasticsearchConfig extends ModuleConfig { - private String nameSpace; + private String namespace; private String clusterNodes; String protocol = "http"; /** diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java index 88b8635987..b71246e7df 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java @@ -110,10 +110,10 @@ public class StorageModuleElasticsearchProvider extends ModuleProvider { public void prepare() throws ServiceNotProvidedException { this.registerServiceImplementation(StorageBuilderFactory.class, new StorageBuilderFactory.Default()); - if (StringUtil.isEmpty(config.getNameSpace())) { - config.setNameSpace("sw"); + if (StringUtil.isEmpty(config.getNamespace())) { + config.setNamespace("sw"); } else { - config.setNameSpace(config.getNameSpace().toLowerCase()); + config.setNamespace(config.getNamespace().toLowerCase()); } if (config.getDayStep() > 1) { TimeSeriesUtils.setDAY_STEP(config.getDayStep()); @@ -155,7 +155,7 @@ public class StorageModuleElasticsearchProvider extends ModuleProvider { elasticSearchClient = new ElasticSearchClient( config.getClusterNodes(), config.getProtocol(), config.getTrustStorePath(), config .getTrustStorePass(), config.getUser(), config.getPassword(), - indexNameConverter(config.getNameSpace()), config.getConnectTimeout(), + indexNameConverter(config.getNamespace()), config.getConnectTimeout(), config.getSocketTimeout(), config.getNumHttpClientThread() ); this.registerServiceImplementation( diff --git a/tools/profile-exporter/application.yml b/tools/profile-exporter/application.yml index 62851f2efc..e6ebff4031 100644 --- a/tools/profile-exporter/application.yml +++ b/tools/profile-exporter/application.yml @@ -18,7 +18,7 @@ core: storage: selector: ${SW_STORAGE:h2} elasticsearch: - nameSpace: ${SW_NAMESPACE:""} + namespace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} #trustStorePath: ${SW_SW_STORAGE_ES_SSL_JKS_PATH:"../es_keystore.jks"}