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 2020/01/21 10:30:32 UTC

[GitHub] [incubator-shardingsphere] kimmking opened a new pull request #4065: Fix config path

kimmking opened a new pull request #4065: Fix config path
URL: https://github.com/apache/incubator-shardingsphere/pull/4065
 
 
   Fixes #4062
   
   Changes proposed in this pull request:
   - allow more than one proxy server running by start scripts with different config directories.
   - rename jta.properties to transactions.properties and make users can use their own jta.properties overwrite the first one and avoid the conflict between log file configs.
   - polish the two script start.sh/start.bat.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu merged pull request #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cherrylzhao removed a comment on issue #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
cherrylzhao removed a comment on issue #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#issuecomment-576622893
 
 
   @kimmking  transactions.properties could not be loaded by atomikos

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cherrylzhao commented on issue #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on issue #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#issuecomment-576622893
 
 
   @kimmking  transactions.properties could not be loaded by atomikos

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#discussion_r368978833
 
 

 ##########
 File path: sharding-proxy/sharding-proxy-bootstrap/src/main/java/org/apache/shardingsphere/shardingproxy/Bootstrap.java
 ##########
 @@ -91,6 +93,18 @@ private static int getPort(final String[] args) {
         Integer paredPort = Ints.tryParse(args[0]);
         return paredPort == null ? DEFAULT_PORT : paredPort;
     }
+
+    private static String getConfigPath(final String[] args) {
+        if (args.length < 2) {
+            return DEFAULT_CONFIG_PATH;
+        }
+        return paddingWithSlash(args[1]);
+    }
+
+    private static String paddingWithSlash(final String str) {
 
 Review comment:
   name of `str` maybe `arg`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#discussion_r368928805
 
 

 ##########
 File path: sharding-proxy/sharding-proxy-bootstrap/src/main/java/org/apache/shardingsphere/shardingproxy/Bootstrap.java
 ##########
 @@ -74,9 +76,12 @@
      * @throws SQLException SQL exception
      */
     public static void main(final String[] args) throws IOException, SQLException {
-        ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
-        logRuleConfigurationMap(getRuleConfiguration(shardingConfig.getRuleConfigurationMap()).values());
         int port = getPort(args);
+        String path = getConfigPath(args);
+
 
 Review comment:
   We should remove useless blank line.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#issuecomment-576632714
 
 
   ## Pull Request Test Coverage Report for [Build 1470](https://coveralls.io/builds/28229918)
   
   * **2** of **9**   **(22.22%)**  changed or added relevant lines in **2** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage decreased (**-0.02%**) to **66.652%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-proxy/sharding-proxy-bootstrap/src/main/java/org/apache/shardingsphere/shardingproxy/Bootstrap.java](https://coveralls.io/builds/28229918/source?filename=sharding-proxy%2Fsharding-proxy-bootstrap%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingproxy%2FBootstrap.java#L80) | 0 | 7 | 0.0%
   <!-- | **Total:** | **2** | **9** | **22.22%** | -->
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/28229918/badge)](https://coveralls.io/builds/28229918) |
   | :-- | --: |
   | Change from base [Build 727](https://coveralls.io/builds/28228315): |  -0.02% |
   | Covered Lines: | 10895 |
   | Relevant Lines: | 16346 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls commented on issue #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#issuecomment-576632714
 
 
   ## Pull Request Test Coverage Report for [Build 1468](https://coveralls.io/builds/28229188)
   
   * **2** of **10**   **(20.0%)**  changed or added relevant lines in **2** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage decreased (**-0.02%**) to **66.648%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-proxy/sharding-proxy-bootstrap/src/main/java/org/apache/shardingsphere/shardingproxy/Bootstrap.java](https://coveralls.io/builds/28229188/source?filename=sharding-proxy%2Fsharding-proxy-bootstrap%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingproxy%2FBootstrap.java#L80) | 0 | 8 | 0.0%
   <!-- | **Total:** | **2** | **10** | **20.0%** | -->
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/28229188/badge)](https://coveralls.io/builds/28229188) |
   | :-- | --: |
   | Change from base [Build 727](https://coveralls.io/builds/28228315): |  -0.02% |
   | Covered Lines: | 10895 |
   | Relevant Lines: | 16347 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull request #4065: Fix #4062 to allow more than one proxy server running by start scripts with different config directories.

Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4065: Fix  #4062 to allow more than one proxy server running by start scripts with different config directories.
URL: https://github.com/apache/incubator-shardingsphere/pull/4065#discussion_r368946592
 
 

 ##########
 File path: sharding-proxy/sharding-proxy-bootstrap/src/main/java/org/apache/shardingsphere/shardingproxy/Bootstrap.java
 ##########
 @@ -74,9 +76,12 @@
      * @throws SQLException SQL exception
      */
     public static void main(final String[] args) throws IOException, SQLException {
-        ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
-        logRuleConfigurationMap(getRuleConfiguration(shardingConfig.getRuleConfigurationMap()).values());
         int port = getPort(args);
+        String path = getConfigPath(args);
+
 
 Review comment:
   > We should remove useless blank line.
   
   done.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services