SpriderMan opened a new issue #10065:
URL: https://github.com/apache/shardingsphere/issues/10065


   version:
   sharding/apache-shardingsphere-5.0.0-alpha-shardingsphere-scaling-bin
   
   
   
   request:
   curl -X POST \
     http://localhost:8888/scaling/job/start \
     -H 'content-type: application/json' \
     -d '{
           "ruleConfig": {
             "source": {
               "type": "shardingSphereJdbc",
               "parameter": "
                   dataSources:
                     ds_0:
                       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                       jdbcUrl: 
jdbc:mysql://127.0.0.1:3308/scaling_0?useSSL=false
                       username: sharding_slave
                       password: 123456
                     ds_1:
                       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                       jdbcUrl: 
jdbc:mysql://127.0.0.1:3308/scaling_1?useSSL=false
                       username: sharding_slave
                       password: 123456
                   rules:
                   - !SHARDING
                     tables:
                       t_order:
                         actualDataNodes: ds_0.t_order_$->{0..1}
                         databaseStrategy:
                           standard:
                             shardingColumn: order_id
                             shardingAlgorithmName: t_order_db_algorith
                         logicTable: t_order
                         tableStrategy:
                           standard:
                             shardingColumn: user_id
                             shardingAlgorithmName: t_order_tbl_algorith
                     shardingAlgorithms:
                       t_order_db_algorith:
                         type: INLINE
                         props:
                           algorithm-expression: ds_$->{order_id % 2}
                       t_order_tbl_algorith:
                         type: INLINE
                         props:
                           algorithm-expression: t_order_$->{user_id % 2}
                   "
             },
             "target": {
                 "type": "jdbc",
                 "parameter": "
                   username: root
                   password: 123456
                   jdbcUrl: 
jdbc:mysql://127.0.0.1:3307/sharding_db?serverTimezone=UTC&useSSL=false
                   "
             }
           },
           "jobConfiguration":{
             "concurrency":"1"
           }
         }'
   
   
   wrong :
   
   RROR] 14:30:29.127 [nioEventLoopGroup-3-7] 
o.a.s.scaling.web.HttpServerHandler - Http request handle occur error:
   java.lang.NullPointerException: null
        at 
org.apache.shardingsphere.scaling.core.utils.SyncConfigurationUtil.getSourceConfiguration(SyncConfigurationUtil.java:83)
        at 
org.apache.shardingsphere.scaling.core.utils.SyncConfigurationUtil.toSyncConfigurations(SyncConfigurationUtil.java:67)
        at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.startJob(HttpServerHandler.java:98)
        at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:73)
        at 
org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:52)
        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)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
        at 
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
        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.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)


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


Reply via email to