You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/07/14 05:18:01 UTC

[GitHub] [shardingsphere] tristaZero commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

tristaZero commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669296487



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/factory/JDBCRawBackendDataSourceFactory.java
##########
@@ -22,28 +22,28 @@
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
 import org.apache.shardingsphere.infra.config.datasource.DataSourceParameter;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecoratorHelper;
 import org.apache.shardingsphere.infra.exception.ShardingSphereException;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.recognizer.JDBCDriverURLRecognizerEngine;
 
 import javax.sql.DataSource;
-import java.util.Optional;
 
 /**
  * Backend data source factory using {@code HikariDataSource} for JDBC raw.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 @Slf4j
 public final class JDBCRawBackendDataSourceFactory implements JDBCBackendDataSourceFactory {
-    
+
     private static final JDBCRawBackendDataSourceFactory INSTANCE = new JDBCRawBackendDataSourceFactory();
-    
+

Review comment:
       Please reverse these invalid changes. 

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/JDBCParameterDecoratorHelper.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package org.apache.shardingsphere.infra.config.datasource;
+
+import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
+
+import javax.sql.DataSource;
+import java.util.Optional;
+
+public class JDBCParameterDecoratorHelper {

Review comment:
       If it is just a util class, it is better to define it as a final class and add `@NoArgsConstructor(access = AccessLevel.PRIVATE)` for it.

##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/factory/JDBCRawBackendDataSourceFactory.java
##########
@@ -22,28 +22,28 @@
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
 import org.apache.shardingsphere.infra.config.datasource.DataSourceParameter;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecoratorHelper;
 import org.apache.shardingsphere.infra.exception.ShardingSphereException;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.recognizer.JDBCDriverURLRecognizerEngine;
 
 import javax.sql.DataSource;
-import java.util.Optional;
 
 /**
  * Backend data source factory using {@code HikariDataSource} for JDBC raw.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 @Slf4j
 public final class JDBCRawBackendDataSourceFactory implements JDBCBackendDataSourceFactory {
-    
+
     private static final JDBCRawBackendDataSourceFactory INSTANCE = new JDBCRawBackendDataSourceFactory();
-    
+

Review comment:
       [Settings for IDEA](https://shardingsphere.apache.org/community/data/shardingsphere-settings.jar) FYI.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org