This is an automated email from the ASF dual-hosted git repository.

spricoder pushed a commit to branch ci/add-metric-it
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/ci/add-metric-it by this push:
     new e21d4c0d9bc fix IT
e21d4c0d9bc is described below

commit e21d4c0d9bc8c01e4628b526677906e139073dd1
Author: spricoder <[email protected]>
AuthorDate: Sat Nov 4 15:59:56 2023 +0800

    fix IT
---
 .../org/apache/iotdb/it/env/cluster/config/MppConfigNodeConfig.java | 3 +--
 .../org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java   | 3 +--
 .../main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java  | 4 ++--
 .../org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java     | 5 -----
 .../java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java  | 4 ----
 .../java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java    | 6 ++++--
 iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java   | 2 ++
 7 files changed, 10 insertions(+), 17 deletions(-)

diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppConfigNodeConfig.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppConfigNodeConfig.java
index b81ed4cbbb6..62ccbb0aa4f 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppConfigNodeConfig.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppConfigNodeConfig.java
@@ -52,8 +52,7 @@ public class MppConfigNodeConfig extends MppBaseConfig 
implements ConfigNodeConf
 
   @Override
   public ConfigNodeConfig setMetricReporterType(List<String> 
metricReporterTypes) {
-    properties.setProperty(
-        "cn_metric_reporter_list", "[" + String.join(",", metricReporterTypes) 
+ "]");
+    properties.setProperty("cn_metric_reporter_list", String.join(",", 
metricReporterTypes));
     return this;
   }
 }
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java
index 1c7d11377af..75f1821a93c 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java
@@ -52,8 +52,7 @@ public class MppDataNodeConfig extends MppBaseConfig 
implements DataNodeConfig {
 
   @Override
   public DataNodeConfig setMetricReporterType(List<String> 
metricReporterTypes) {
-    properties.setProperty(
-        "dn_metric_reporter_list", "[" + String.join(",", metricReporterTypes) 
+ "]");
+    properties.setProperty("dn_metric_reporter_list", String.join(",", 
metricReporterTypes));
     return this;
   }
 }
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
index c25ce0b1088..ee873d5bc45 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
@@ -111,7 +111,7 @@ public abstract class AbstractEnv implements BaseEnv {
     for (ConfigNodeWrapper configNode : this.configNodeWrapperList) {
       String configNodeMetricContent =
           getUrlContent(
-              Config.IOTDB_URL_PREFIX
+              Config.IOTDB_HTTP_URL_PREFIX
                   + configNode.getIp()
                   + ":"
                   + configNode.getMetricPort()
@@ -122,7 +122,7 @@ public abstract class AbstractEnv implements BaseEnv {
     for (DataNodeWrapper dataNode : this.dataNodeWrapperList) {
       String dataNodeMetricContent =
           getUrlContent(
-              Config.IOTDB_URL_PREFIX
+              Config.IOTDB_HTTP_URL_PREFIX
                   + dataNode.getIp()
                   + ":"
                   + dataNode.getMetricPort()
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
index 96b93e754b6..91a53b04e0e 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
@@ -32,8 +32,6 @@ import static 
org.apache.iotdb.consensus.ConsensusFactory.SIMPLE_CONSENSUS;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.CN_CONNECTION_TIMEOUT_MS;
 import static org.apache.iotdb.it.env.cluster.ClusterConstant.CN_CONSENSUS_DIR;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.CN_METRIC_IOTDB_REPORTER_HOST;
-import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.CN_METRIC_IOTDB_REPORTER_PORT;
-import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.CN_METRIC_PROMETHEUS_REPORTER_PORT;
 import static org.apache.iotdb.it.env.cluster.ClusterConstant.CN_SYSTEM_DIR;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.COMMON_PROPERTIES_FILE;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS;
@@ -88,10 +86,7 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
     immutableNodeProperties.setProperty(IoTDBConstant.CN_SEED_CONFIG_NODE, 
seedConfigNodes);
     immutableNodeProperties.setProperty(CN_SYSTEM_DIR, 
MppBaseConfig.NULL_VALUE);
     immutableNodeProperties.setProperty(CN_CONSENSUS_DIR, 
MppBaseConfig.NULL_VALUE);
-    immutableNodeProperties.setProperty(
-        CN_METRIC_PROMETHEUS_REPORTER_PORT, MppBaseConfig.NULL_VALUE);
     immutableNodeProperties.setProperty(CN_METRIC_IOTDB_REPORTER_HOST, 
MppBaseConfig.NULL_VALUE);
-    immutableNodeProperties.setProperty(CN_METRIC_IOTDB_REPORTER_PORT, 
MppBaseConfig.NULL_VALUE);
   }
 
   @Override
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
index 5f6d45446de..2515d24e7a2 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
@@ -47,8 +47,6 @@ import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_DATA_REGION_CON
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_JOIN_CLUSTER_RETRY_INTERVAL_MS;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_METRIC_INTERNAL_REPORTER_TYPE;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_METRIC_IOTDB_REPORTER_HOST;
-import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_METRIC_PROMETHEUS_REPORTER_PORT;
-import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_MPP_DATA_EXCHANGE_PORT;
 import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.DN_SCHEMA_REGION_CONSENSUS_PORT;
 import static org.apache.iotdb.it.env.cluster.ClusterConstant.DN_SYNC_DIR;
 import static org.apache.iotdb.it.env.cluster.ClusterConstant.DN_SYSTEM_DIR;
@@ -117,8 +115,6 @@ public class DataNodeWrapper extends AbstractNodeWrapper {
     immutableNodeProperties.setProperty(DN_TRACING_DIR, 
MppBaseConfig.NULL_VALUE);
     immutableNodeProperties.setProperty(DN_SYNC_DIR, MppBaseConfig.NULL_VALUE);
     immutableNodeProperties.setProperty(DN_METRIC_IOTDB_REPORTER_HOST, 
MppBaseConfig.NULL_VALUE);
-    immutableNodeProperties.setProperty(
-        DN_METRIC_PROMETHEUS_REPORTER_PORT, MppBaseConfig.NULL_VALUE);
   }
 
   @Override
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java
 
b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java
index 7d73d16b24e..15f07a14370 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java
@@ -106,9 +106,11 @@ public class RemoteServerEnv implements BaseEnv {
   public List<String> getMetricPrometheusReporterContents() {
     List<String> result = new ArrayList<>();
     result.add(
-        getUrlContent(Config.IOTDB_URL_PREFIX + ip_addr + ":" + 
configNodeMetricPort + "/metrics"));
+        getUrlContent(
+            Config.IOTDB_HTTP_URL_PREFIX + ip_addr + ":" + 
configNodeMetricPort + "/metrics"));
     result.add(
-        getUrlContent(Config.IOTDB_URL_PREFIX + ip_addr + ":" + 
dataNodeMetricPort + "/metrics"));
+        getUrlContent(
+            Config.IOTDB_HTTP_URL_PREFIX + ip_addr + ":" + dataNodeMetricPort 
+ "/metrics"));
     return result;
   }
 
diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
index 1e98bc56f2e..adb0125dbc9 100644
--- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
+++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
@@ -30,6 +30,8 @@ public class Config {
   /** The required prefix for the connection URL. */
   public static final String IOTDB_URL_PREFIX = "jdbc:iotdb://";
 
+  public static final String IOTDB_HTTP_URL_PREFIX = "http://";;
+
   public static final String IOTDB_ERROR_PREFIX = "Error";
 
   static final String IOTDB_DEFAULT_HOST = "localhost";

Reply via email to