Re: Re: Problems in using shardingsphere

2019-12-04 Thread zhangli...@apache.org
Please try to version 4.0.0-RC3 -- Liang Zhang (John) Apache ShardingSphere & Dubbo xu 于2019年12月5日周四 上午9:46写道: > 1.The version of shardingsphere I use is 4.0.0-RC1, and the version of > MySQL connector Java driven is 5.1.4 > The error log is as follows: > > > [2019-12-05

Re: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread Zhiyi Yan
Hi, I think he's just suggesting a API style, restful API treat jobs as a resource, and do something to this resource. Sion Yang 于2019年12月5日周四 上午9:45写道: > Agree. [PUT] /job/ with stop status in body is not as clear as > using `stop` on uri directly, I think. > > > > > -- > > Yi Yang(Sion) >

Re:Re: Problems in using shardingsphere

2019-12-04 Thread xu
1.The version of shardingsphere I use is 4.0.0-RC1, and the version of MySQL connector Java driven is 5.1.4 The error log is as follows: [2019-12-05 09:34:12] DEBUG org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver(http-nio-8088-exec-10); :Resolving

Re:Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread Sion Yang
Agree. [PUT] /job/ with stop status in body is not as clear as using `stop` on uri directly, I think. -- Yi Yang(Sion) Apache ShardingSphere At 2019-12-05 09:29:20, "sushixiang" wrote: >Hi, PUT may be used for modification, but we really not modify anything. And I >think this may be not

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread sushixiang
Hi, PUT may be used for modification, but we really not modify anything. And I think this may be not as straightforward as putting 'stop' in the url.What do you think? --Original-- From:"xia Yanick"

Re:Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread Sion Yang
When create job, the job_id do not generate, so can't input . Progress is part information of job, so I think progress word show in url is better. -- Yi Yang(Sion) Apache ShardingSphere At 2019-12-04 16:31:34, "xia Yanick" wrote: >Hi Xiang: > That's exactly what I needed,

Re: Problems in using shardingsphere

2019-12-04 Thread zhangli...@apache.org
Hi, I just answer the questions. For question 1: The sharding strategy you provide is too complicated, can you try the simple sharding strategy first and make sure the strategy is work fine as you want? We just concentrate the tech point of ShardingSphere, we need split business logic first and

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread xia Yanick
HI Xiang: how about that stop a job like: PUT /shardingscaling/job/ Content-Type: application/json Body: { "status": "stop" } > On Dec 4, 2019, at 17:05, sushixiang wrote: > >

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread sushixiang
Now, stop only means stop the job, function of resume job will be add later. --Original-- From:"zhangli...@apache.org"https://github.com/apache/incubator-shardingsphere/issues/3256 gt

Re: Problems in using shardingsphere

2019-12-04 Thread zhangli...@apache.org
Hi, for english only. -- Liang Zhang (John) Apache ShardingSphere & Dubbo 许开卫 于2019年12月4日周三 下午4:53写道: > 问题一: > > 我配置了一个分表的策略: > > 配置文件如下: > > <*bean **id**="preciseModuloTableShardingAlgorithm" > **class**="com.jd.bdp.cv.common.PreciseModuloShardingTableAlgorithm" > */> >

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread zhangli...@apache.org
Hi, Did the stop job mean we can resume the job, or just delete it forever? -- Liang Zhang (John) Apache ShardingSphere & Dubbo sushixiang 于2019年12月4日周三 下午4:42写道: > Hi, xia Yanick: > > > Stop api doesn't do a delete action, so we use [POST] and jobid will be > transferd as

Re: [Discuss] Add new feature - shadow database

2019-12-04 Thread zhangli...@apache.org
Agree, and use the way for SQL parse is a good scope with ShardingSphere. ShardingSphere should be a database, not java SDK. -- Liang Zhang (John) Apache ShardingSphere & Dubbo xia Yanick 于2019年12月4日周三 下午4:37写道: > Hi liang & yan: > I think so, because reactive

dev@shardingsphere.apache.org

2019-12-04 Thread xu
After I use sharding, the function now () in SQL is not supported (using mybatis)Report errors: Data truncation: Incorrect datetime value: 'now()' for column 'created' at row 1

Problems in using shardingsphere

2019-12-04 Thread xu
Question 1: I have configured a strategy of sub table: The configuration file is as follows: true My sub table logic is as follows: if (shardingValue.getValue()<7800){ return "cv_user_task_0"; } else {

Problems in using shardingsphere

2019-12-04 Thread xu
问题一: 我配置了一个分表的策略: 配置文件如下: true 我的分表逻辑是这么写的: if (shardingValue.getValue()<7800){ return "cv_user_task_0"; } else { Long modValue = shardingValue.getValue() % tableNames.size(); String modStr =

Problems in using shardingsphere

2019-12-04 Thread 许开卫
问题一: 我配置了一个分表的策略: 配置文件如下: true 我的分表逻辑是这么写的: if (shardingValue.getValue()<7800){ return "cv_user_task_0"; } else { Long modValue = shardingValue.getValue() % tableNames.size(); String modStr =

Problems in using shardingsphere

2019-12-04 Thread xu
Question 1: I have configured a strategy of sub table: The configuration file is as follows: true My sub table logic is as follows: if (shardingValue.getValue()<7800){ return "cv_user_task_0"; } else {

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread sushixiang
Hi, xia Yanick: Stop api doesn't do a delete action, so we use [POST] and jobid will be transferd as request body. For others,Is it more readable to add such 'start', 'stop' or 'progress'? --Original-- From:"xia

Re: [Discuss] Add new feature - shadow database

2019-12-04 Thread xia Yanick
Hi liang & yan: I think so, because reactive framework become more and more popular, the most function that base on ThreadLocal will be hard to refactor to support Rxjava/Projectreactor。if sharing base on Sql parse way, it’s be a broad road. > On Dec 4, 2019, at 01:09,

Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread xia Yanick
Hi Xiang: That's exactly what I needed, otherwise, do you want like a restful style? create a job: /shardingscaling/job/ [POST] query a job status: /shardingscaling/job/ [GET] stop a job

[ShardingScaling][Discuss] Http request APIS about shardingscaling

2019-12-04 Thread sushixiang
Hi, everybody: Http request apis will be provided for shardingscaling to let people easily manager the scaling job. Here are the definitions of such apis: /shardingscaling/job/start [POST] /shardingscaling/job/progress/${jobId} [GET] /shardingscaling/job/stop [POST] Above apis will be