You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/08/07 12:29:08 UTC

[incubator-inlong] branch master updated: [INLONG-1424][InLong-Manager]change the format of the configuration file: make the yaml to properties (#1425)

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

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new acfb0a3  [INLONG-1424][InLong-Manager]change the format of the configuration file: make the yaml to properties (#1425)
acfb0a3 is described below

commit acfb0a3020a5eb16104f0c5acce8a78e849e2993
Author: healchow <he...@gmail.com>
AuthorDate: Sat Aug 7 20:29:03 2021 +0800

    [INLONG-1424][InLong-Manager]change the format of the configuration file: make the yaml to properties (#1425)
    
    Co-authored-by: healzhou <he...@tencent.com>
---
 .../src/main/resources/application-dev.properties  | 62 ++++++++++++++++++
 .../src/main/resources/application-dev.yml         | 73 ----------------------
 .../src/main/resources/application-prod.properties | 61 ++++++++++++++++++
 .../src/main/resources/application-prod.yml        | 69 --------------------
 .../src/main/resources/application-test.properties | 62 ++++++++++++++++++
 .../src/main/resources/application-test.yml        | 73 ----------------------
 .../{application.yml => application.properties}    | 60 ++++++------------
 7 files changed, 204 insertions(+), 256 deletions(-)

diff --git a/inlong-manager/manager-web/src/main/resources/application-dev.properties b/inlong-manager/manager-web/src/main/resources/application-dev.properties
new file mode 100644
index 0000000..cf6473c
--- /dev/null
+++ b/inlong-manager/manager-web/src/main/resources/application-dev.properties
@@ -0,0 +1,62 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Log level
+logging.level.root=INFO
+logging.level.org.apache.inlong.manager=debug
+
+spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+spring.datasource.username=xxxxxx
+spring.datasource.password=xxxxxx
+
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.druid.validationQuery=SELECT 'x'
+# Initialization size, minimum, maximum
+spring.datasource.druid.initialSize=20
+spring.datasource.druid.minIdle=20
+spring.datasource.druid.maxActive=300
+# Configure the timeout period to wait for the connection to be acquired
+spring.datasource.druid.maxWait=600000
+# Configure the minimum survival time of a connection in the pool, in milliseconds
+spring.datasource.druid.minEvictableIdleTimeMillis=3600000
+# Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
+spring.datasource.druid.testWhileIdle=true
+# Perform detection when obtaining a connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnBorrow=false
+# Perform detection when returning the connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnReturn=false
+# Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
+spring.datasource.druid.filters=stat,wall
+# Open the mergeSql function through the connectProperties property, Slow SQL records
+spring.datasource.druid.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+# Manager address of Tube cluster, used to create Topic
+cluster.tube.manager=http://127.0.0.1:8081
+# Master address, used to manage Tube broker
+cluster.tube.master=127.0.0.1:8000,127.0.0.1:8010
+# Tube cluster ID
+cluster.tube.clusterId=1
+
+# Push configuration to the path on ZooKeeper
+cluster.zk.url=127.0.0.1:2181
+cluster.zk.root=inlong_hive
+
+# Application name in Sort
+sort.appName=inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application-dev.yml b/inlong-manager/manager-web/src/main/resources/application-dev.yml
deleted file mode 100644
index b8392a3..0000000
--- a/inlong-manager/manager-web/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-logging:
-  level:
-    root: INFO
-    org:
-      apache:
-        inlong:
-          manager: debug
-
-spring:
-  datasource:
-    jdbc-url: jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
-    username: xxxxxx
-    password: xxxxxx
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      # Configure test query
-      validationQuery: SELECT 'x'
-      # Initialization size, minimum, maximum
-      initialSize: 20
-      minIdle: 20
-      maxActive: 300
-      # Configure the timeout period to wait for the connection to be acquired
-      maxWait: 600000
-      # Configure the minimum survival time of a connection in the pool, in milliseconds
-      minEvictableIdleTimeMillis: 3600000
-      # Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
-      testWhileIdle: true
-      # Perform detection when obtaining a connection, it is recommended to close it, which affects performance
-      testOnBorrow: false
-      # Perform detection when returning the connection, it is recommended to close it, which affects performance
-      testOnReturn: false
-      # Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
-      filters: stat,wall
-      # Open the mergeSql function through the connectProperties property, Slow SQL records
-      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-
-# Cluster info
-cluster:
-  tube:
-    # Manager address of Tube cluster, used to create Topic
-    manager: http://127.0.0.1:8081
-    # Master address, used to manage Tube broker
-    master: 127.0.0.1:8000,127.0.0.1:8010
-    # Tube cluster ID
-    clusterId: 1
-  zk:
-    url: 127.0.0.1:2181
-    # Push configuration to the path on ZooKeeper
-    root: inlong_hive
-
-sort:
-  # Application name in Sort
-  appName: inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application-prod.properties b/inlong-manager/manager-web/src/main/resources/application-prod.properties
new file mode 100644
index 0000000..c619b71
--- /dev/null
+++ b/inlong-manager/manager-web/src/main/resources/application-prod.properties
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Log level
+logging.level.root=INFO
+
+spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+spring.datasource.username=xxxxxx
+spring.datasource.password=xxxxxx
+
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.druid.validationQuery=SELECT 'x'
+# Initialization size, minimum, maximum
+spring.datasource.druid.initialSize=20
+spring.datasource.druid.minIdle=20
+spring.datasource.druid.maxActive=300
+# Configure the timeout period to wait for the connection to be acquired
+spring.datasource.druid.maxWait=600000
+# Configure the minimum survival time of a connection in the pool, in milliseconds
+spring.datasource.druid.minEvictableIdleTimeMillis=3600000
+# Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
+spring.datasource.druid.testWhileIdle=true
+# Perform detection when obtaining a connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnBorrow=false
+# Perform detection when returning the connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnReturn=false
+# Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
+spring.datasource.druid.filters=stat,wall
+# Open the mergeSql function through the connectProperties property, Slow SQL records
+spring.datasource.druid.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+# Manager address of Tube cluster, used to create Topic
+cluster.tube.manager=http://127.0.0.1:8081
+# Master address, used to manage Tube broker
+cluster.tube.master=127.0.0.1:8000,127.0.0.1:8010
+# Tube cluster ID
+cluster.tube.clusterId=1
+
+# Push configuration to the path on ZooKeeper
+cluster.zk.url=127.0.0.1:2181
+cluster.zk.root=inlong_hive
+
+# Application name in Sort
+sort.appName=inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application-prod.yml b/inlong-manager/manager-web/src/main/resources/application-prod.yml
deleted file mode 100644
index c0e3a36..0000000
--- a/inlong-manager/manager-web/src/main/resources/application-prod.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-logging:
-  level:
-    root: INFO
-
-spring:
-  datasource:
-    jdbc-url: jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
-    username: xxxxxx
-    password: xxxxxx
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      # Configure test query
-      validationQuery: SELECT 'x'
-      # Initialization size, minimum, maximum
-      initialSize: 20
-      minIdle: 20
-      maxActive: 300
-      # Configure the timeout period to wait for the connection to be acquired
-      maxWait: 600000
-      # Configure the minimum survival time of a connection in the pool, in milliseconds
-      minEvictableIdleTimeMillis: 3600000
-      # Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
-      testWhileIdle: true
-      # Perform detection when obtaining a connection, it is recommended to close it, which affects performance
-      testOnBorrow: false
-      # Perform detection when returning the connection, it is recommended to close it, which affects performance
-      testOnReturn: false
-      # Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
-      filters: stat,wall
-      # Open the mergeSql function through the connectProperties property, Slow SQL records
-      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-
-# Cluster info
-cluster:
-  tube:
-    # Manager address of Tube cluster, used to create Topic
-    manager: http://127.0.0.1:8081
-    # Master address, used to manage Tube broker
-    master: 127.0.0.1:8000,127.0.0.1:8010
-    # Tube cluster ID
-    clusterId: 1
-  zk:
-    url: 127.0.0.1:2181
-    # Push configuration to the path on ZooKeeper
-    root: inlong_hive
-
-sort:
-  # Application name in Sort
-  appName: inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application-test.properties b/inlong-manager/manager-web/src/main/resources/application-test.properties
new file mode 100644
index 0000000..cf6473c
--- /dev/null
+++ b/inlong-manager/manager-web/src/main/resources/application-test.properties
@@ -0,0 +1,62 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Log level
+logging.level.root=INFO
+logging.level.org.apache.inlong.manager=debug
+
+spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+spring.datasource.username=xxxxxx
+spring.datasource.password=xxxxxx
+
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.druid.validationQuery=SELECT 'x'
+# Initialization size, minimum, maximum
+spring.datasource.druid.initialSize=20
+spring.datasource.druid.minIdle=20
+spring.datasource.druid.maxActive=300
+# Configure the timeout period to wait for the connection to be acquired
+spring.datasource.druid.maxWait=600000
+# Configure the minimum survival time of a connection in the pool, in milliseconds
+spring.datasource.druid.minEvictableIdleTimeMillis=3600000
+# Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
+spring.datasource.druid.testWhileIdle=true
+# Perform detection when obtaining a connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnBorrow=false
+# Perform detection when returning the connection, it is recommended to close it, which affects performance
+spring.datasource.druid.testOnReturn=false
+# Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
+spring.datasource.druid.filters=stat,wall
+# Open the mergeSql function through the connectProperties property, Slow SQL records
+spring.datasource.druid.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+# Manager address of Tube cluster, used to create Topic
+cluster.tube.manager=http://127.0.0.1:8081
+# Master address, used to manage Tube broker
+cluster.tube.master=127.0.0.1:8000,127.0.0.1:8010
+# Tube cluster ID
+cluster.tube.clusterId=1
+
+# Push configuration to the path on ZooKeeper
+cluster.zk.url=127.0.0.1:2181
+cluster.zk.root=inlong_hive
+
+# Application name in Sort
+sort.appName=inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application-test.yml b/inlong-manager/manager-web/src/main/resources/application-test.yml
deleted file mode 100644
index b8392a3..0000000
--- a/inlong-manager/manager-web/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-logging:
-  level:
-    root: INFO
-    org:
-      apache:
-        inlong:
-          manager: debug
-
-spring:
-  datasource:
-    jdbc-url: jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
-    username: xxxxxx
-    password: xxxxxx
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      # Configure test query
-      validationQuery: SELECT 'x'
-      # Initialization size, minimum, maximum
-      initialSize: 20
-      minIdle: 20
-      maxActive: 300
-      # Configure the timeout period to wait for the connection to be acquired
-      maxWait: 600000
-      # Configure the minimum survival time of a connection in the pool, in milliseconds
-      minEvictableIdleTimeMillis: 3600000
-      # Detect when applying for connection. It is recommended to configure it to true, which does not affect performance and ensures safety
-      testWhileIdle: true
-      # Perform detection when obtaining a connection, it is recommended to close it, which affects performance
-      testOnBorrow: false
-      # Perform detection when returning the connection, it is recommended to close it, which affects performance
-      testOnReturn: false
-      # Configure filters for monitoring statistics interception, stat:monitoring statistics, log4j:log, wall:defense against SQL injection
-      filters: stat,wall
-      # Open the mergeSql function through the connectProperties property, Slow SQL records
-      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-
-# Cluster info
-cluster:
-  tube:
-    # Manager address of Tube cluster, used to create Topic
-    manager: http://127.0.0.1:8081
-    # Master address, used to manage Tube broker
-    master: 127.0.0.1:8000,127.0.0.1:8010
-    # Tube cluster ID
-    clusterId: 1
-  zk:
-    url: 127.0.0.1:2181
-    # Push configuration to the path on ZooKeeper
-    root: inlong_hive
-
-sort:
-  # Application name in Sort
-  appName: inlong_app
diff --git a/inlong-manager/manager-web/src/main/resources/application.yml b/inlong-manager/manager-web/src/main/resources/application.properties
similarity index 50%
rename from inlong-manager/manager-web/src/main/resources/application.yml
rename to inlong-manager/manager-web/src/main/resources/application.properties
index 74a329a..9a31a7f 100644
--- a/inlong-manager/manager-web/src/main/resources/application.yml
+++ b/inlong-manager/manager-web/src/main/resources/application.properties
@@ -17,48 +17,26 @@
 # under the License.
 #
 
-server:
-  port: 8083
-  servlet:
-    context-path: /api/inlong/manager
-
-logging:
-  level:
-    root: INFO
-  file:
-    path: log
-
-spring:
-  application:
-    name: InLong-Manager-Web
-  profiles:
-    active: dev
-
-  jackson:
-    # Serialize the Date type to a timestamp
-    serialization:
-      write-dates-as-timestamps: true
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
+server.port=8083
+server.servlet.context-path=/api/inlong/manager
+logging.level.root=INFO
+logging.file.path=log
+spring.application.name=InLong-Manager-Web
+spring.profiles.active=dev
+
+# Serialize the Date type to a timestamp
+spring.jackson.serialization.write-dates-as-timestamps=true
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
 
 # Configure mybatis
-mybatis:
-  mapper-locations: classpath:mappers/*.xml
-  # Global mapping, no need to write the full path of the entity class in the xml file
-  type-aliases-package: org.apache.inlong.manager.dao.entity
-  configuration:
-    # Turn on camel case mapping
-    map-underscore-to-camel-case: true
+mybatis.mapper-locations=classpath:mappers/*.xml
+# Global mapping, no need to write the full path of the entity class in the xml file
+mybatis.type-aliases-package=org.apache.inlong.manager.dao.entity
+# Turn on camel case mapping
+mybatis.configuration.map-underscore-to-camel-case=true
 
 # Configure mybatis paging plugin
-pagehelper:
-  helperDialect: mysql
-  reasonable: true
-  params: count=countSql
-
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.params=count=countSql