dengjin001 opened a new issue #12000:
URL: https://github.com/apache/shardingsphere/issues/12000


   `[INFO ] 2021-08-25 16:07:58.226 [nioEventLoopGroup-3-14] 
o.a.s.scaling.web.HttpServerHandler - Http request path: /scaling/job/start
   [INFO ] 2021-08-25 16:07:58.230 [nioEventLoopGroup-3-14] 
o.a.s.scaling.web.HttpServerHandler - Http request body: 
{"ruleConfiguration":{"source":{"type":"shardingSphereJdbc","parameter":{"dataSource":"dataSources:
 ds:   url: 
jdbc:mysql://xxxx:3306/xx?serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
   username: echain   password: LA7kFo8WoDUpT6389AE3Lcxr3kJetnoi   
connectionTimeoutMilliseconds: 30000   idleTimeoutMilliseconds: 60000   
maxLifetimeMilliseconds: 1800000   maxPoolSize: 50   minPoolSize: 1   
maintenanceIntervalMilliseconds: 30000","rule":"rules:- !SHARDING tables:   
asset_balance_detail:     actualDataNodes: ds.asset_balance_detail_${0..4}     
tableStrategy:       standard:         shardingColumn: user_id         
shardingAlgorithmName: balance_inline            asset_ticket_detail:     
actualDataNodes: ds.asset_ticket_detail_${0..4}     tableStrategy:       
standard:         shardingColumn: user_id         shardingAlgorithmName: 
ticket_inline            
 asset_expense_detail:     actualDataNodes: ds.asset_expense_detail${0..4}     
tableStrategy:       standard:         shardingColumn: user_id         
shardingAlgorithmName: expense_inline bindingTables:   - asset_balance_detail   
- asset_ticket_detail   - asset_expense_detail defaultDatabaseStrategy:   none: 
defaultTableStrategy:   none:  shardingAlgorithms:   balance_inline:     type: 
INLINE     props:       algorithm-expression: 
asset_balance_detail_${user_id.toBigInteger() % 5}    ticket_inline:     type: 
INLINE     props:       algorithm-expression: 
asset_ticket_detail_${user_id.toBigInteger() % 5}   expense_inline:     type: 
INLINE     props:       algorithm-expression: 
asset_expense_detail_${user_id.toBigInteger() % 5}         keyGenerators:   
snowflake:     type: SNOWFLAKE     props:       worker-id: 
123"}},"target":{"type":"jdbc","parameter":{"username":"xx","password":"xx","jdbcUrl":"jdbc:mysql:/xx:3306/xx?characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false"}}},"jobC
 onfiguration":{"concurrency":"3"}}
   [ERROR] 2021-08-25 16:07:58.231 [nioEventLoopGroup-3-14] 
o.a.s.scaling.web.HttpServerHandler - Http request handle occur error:
   java.lang.NullPointerException: null
           at 
org.apache.shardingsphere.scaling.core.util.JobConfigurationUtil.fillInProperties(JobConfigurationUtil.java:97)
           at 
org.apache.shardingsphere.scaling.core.api.impl.ScalingAPIImpl.start(ScalingAPIImpl.java:84)
           at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.startJob(HttpServerHandler.java:92)
           at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:65)
           at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:51)
           at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
           at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
           at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
           at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
           at 
io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
           at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)`
   
   
   
   Result Rule:
   `{
        "rules": [
                {
                        "tables": {
                                "asset_balance_detail": {
                                        "actualDataNodes": 
"ds.asset_balance_detail_${0..4}",
                                        "tableStrategy": {
                                                "standard": {
                                                        "shardingColumn": 
"user_id",
                                                        
"shardingAlgorithmName": "balance_inline"
                                                }
                                        }
                                },
                                "asset_ticket_detail": {
                                        "actualDataNodes": 
"ds.asset_ticket_detail_${0..4}",
                                        "tableStrategy": {
                                                "standard": {
                                                        "shardingColumn": 
"user_id",
                                                        
"shardingAlgorithmName": "ticket_inline"
                                                }
                                        }
                                },
                                "asset_expense_detail": {
                                        "actualDataNodes": 
"ds.asset_expense_detail${0..4}",
                                        "tableStrategy": {
                                                "standard": {
                                                        "shardingColumn": 
"user_id",
                                                        
"shardingAlgorithmName": "expense_inline"
                                                }
                                        }
                                }
                        },
                        "bindingTables": [
                                "asset_balance_detail",
                                "asset_ticket_detail",
                                "asset_expense_detail"
                        ],
                        "defaultDatabaseStrategy": {
                                "none": null
                        },
                        "defaultTableStrategy": {
                                "none": null
                        },
                        "shardingAlgorithms": {
                                "balance_inline": {
                                        "type": "INLINE",
                                        "props": {
                                                "algorithm-expression": 
"asset_balance_detail_${user_id.toBigInteger() % 5}"
                                        }
                                },
                                "ticket_inline": {
                                        "type": "INLINE",
                                        "props": {
                                                "algorithm-expression": 
"asset_ticket_detail_${user_id.toBigInteger() % 5}"
                                        }
                                },
                                "expense_inline": {
                                        "type": "INLINE",
                                        "props": {
                                                "algorithm-expression": 
"asset_expense_detail_${user_id.toBigInteger() % 5}"
                                        }
                                }
                        },
                        "keyGenerators": {
                                "snowflake": {
                                        "type": "SNOWFLAKE",
                                        "props": {
                                                "worker-id": 123
                                        }
                                }
                        }
                }
        ]
   }`
   
   
   
   Result Datasource:
   ``{
        "dataSources": {
                "ds": {
                        "url": 
"jdbc:mysql://xx:3306/xx2?serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true",
                        "username": "echain",
                        "password": "LA7kFo8WoDUpT6389AE3Lcxr3kJetnoi",
                        "connectionTimeoutMilliseconds": 30000,
                        "idleTimeoutMilliseconds": 60000,
                        "maxLifetimeMilliseconds": 1800000,
                        "maxPoolSize": 50,
                        "minPoolSize": 1,
                        "maintenanceIntervalMilliseconds": 30000
                }
        }
   }
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to