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/11/18 09:15:21 UTC

[GitHub] [shardingsphere] xiaoliu10 opened a new issue #8204: docker start sharding-proxy

xiaoliu10 opened a new issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204


   1. docker image use docker hub tag latest,  MAINTAINER apache
   2. add config-sharding.yaml  and server.yaml to /opt/sharding-proxy/conf
   3. this is config-sharding.yaml properties 
   ![image](https://user-images.githubusercontent.com/28430309/99509936-67b0d080-29c1-11eb-8084-87abde9dcf74.png)
   4. docker run  and throw an error 
   Exception in thread "main" java.lang.NumberFormatException: null
   	at java.lang.Integer.parseInt(Integer.java:542)
   	at java.lang.Integer.parseInt(Integer.java:615)
   	at org.apache.shardingsphere.sharding.algorithm.sharding.mod.HashModShardingAlgorithm.getShardingCount(HashModShardingAlgorithm.java:52)
   	at org.apache.shardingsphere.sharding.algorithm.sharding.mod.HashModShardingAlgorithm.init(HashModShardingAlgorithm.java:47)
   	at org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmFactory.createAlgorithm(ShardingSphereAlgorithmFactory.java:43)
   	at org.apache.shardingsphere.sharding.rule.ShardingRule.lambda$new$0(ShardingRule.java:89)
   	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
   	at org.apache.shardingsphere.sharding.rule.ShardingRule.<init>(ShardingRule.java:89)
   	at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:34)
   	at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:30)
   	at org.apache.shardingsphere.infra.rule.ShardingSphereRulesBuilder.lambda$build$0(ShardingSphereRulesBuilder.java:49)
   	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
   	at java.util.Iterator.forEachRemaining(Iterator.java:116)
   	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
   	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
   	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
   	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
   	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
   	at org.apache.shardingsphere.infra.rule.ShardingSphereRulesBuilder.build(ShardingSphereRulesBuilder.java:49)
   	at org.apache.shardingsphere.infra.context.schema.SchemaContextsBuilder.createSchema(SchemaContextsBuilder.java:101)
   	at org.apache.shardingsphere.infra.context.schema.SchemaContextsBuilder.build(SchemaContextsBuilder.java:93)
   	at org.apache.shardingsphere.proxy.initializer.impl.AbstractBootstrapInitializer.createSchemaContexts(AbstractBootstrapInitializer.java:75)
   	at org.apache.shardingsphere.proxy.initializer.impl.AbstractBootstrapInitializer.init(AbstractBootstrapInitializer.java:63)
   	at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:48)


----------------------------------------------------------------
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



[GitHub] [shardingsphere] kimmking commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729646713


   This means `sharding-count: 3` could not affect.
   I will check it.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] dongzl commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729580999


   Hi @xiaoliu10 , what's the version of Sharding-Proxy?


----------------------------------------------------------------
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



[GitHub] [shardingsphere] terrymanu closed issue #8204: Properties with integer can't affect in yaml config

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204


   


----------------------------------------------------------------
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



[GitHub] [shardingsphere] kimmking commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729665682


   I reproduce it, it's a bug.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] xiaoliu10 edited a comment on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
xiaoliu10 edited a comment on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729705794


   ok, i well try  it 


----------------------------------------------------------------
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



[GitHub] [shardingsphere] xiaoliu10 commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729705794


   ok, i will try  it 


----------------------------------------------------------------
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



[GitHub] [shardingsphere] xiaoliu10 commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729545308


   this is rules properties: 
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
         databaseStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: hash_mode
         tableStrategy:
           standard:
             shardingColumn: user_id
             shardingAlgorithmName: hash_mode
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: reset_increment
     bindingTables:
       - t_order,t_order_item
     broadcastTables:
       - t_config
     defaultTableStrategy:
       standard:
         shardingColumn: order_id
         shardingAlgorithmName: hash_mode
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: hash_mode
   
     shardingAlgorithms:
       hash_mod:
         type: HASH_MOD
         props:
           sharding-count: 3
   
     keyGenerators:
       increment:
         type: INCREMENT
       reset_increment:
         type: RESET_INCREMENT


----------------------------------------------------------------
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



[GitHub] [shardingsphere] xiaoliu10 edited a comment on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
xiaoliu10 edited a comment on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729545308


   this is rules properties: 
   ```
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
         databaseStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: hash_mode
         tableStrategy:
           standard:
             shardingColumn: user_id
             shardingAlgorithmName: hash_mode
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: reset_increment
     bindingTables:
       - t_order,t_order_item
     broadcastTables:
       - t_config
     defaultTableStrategy:
       standard:
         shardingColumn: order_id
         shardingAlgorithmName: hash_mode
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: hash_mode
   
     shardingAlgorithms:
       hash_mod:
         type: HASH_MOD
         props:
           sharding-count: 3
   
     keyGenerators:
       increment:
         type: INCREMENT
       reset_increment:
         type: RESET_INCREMENT
   
   ```


----------------------------------------------------------------
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



[GitHub] [shardingsphere] kimmking edited a comment on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729681710


   You can use `sharding-count: !!str 3`  or  `sharding-count: '3'` to avoid this case until we fix it.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] kimmking commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729681710


   You can use `sharding-count: !!str 2`  or  `sharding-count: '2'` to avoid this case until we fix it.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] xiaoliu10 commented on issue #8204: docker start sharding-proxy

Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8204:
URL: https://github.com/apache/shardingsphere/issues/8204#issuecomment-729593143


   5.0.0-alpha
   


----------------------------------------------------------------
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