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/05/18 23:45:50 UTC
[GitHub] [shardingsphere] xiaoxiong581 commented on issue #5544: Range from 0 to more than Integer.MAX_VALUE occur exception
xiaoxiong581 commented on issue #5544:
URL: https://github.com/apache/shardingsphere/issues/5544#issuecomment-630492069
> @xiaoxiong581 Hi, can you provide the source code of AutoPartitionByLong?
```java
package org.apache.shardingsphere.shardingproxy.algorithm.complex;
import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingValue;
import java.util.Collection;
public class AutoPartitionByLong implements ComplexKeysShardingAlgorithm<Long> {
@Override
public Collection<String> doSharding(Collection<String> availableTargetNames, ComplexKeysShardingValue<Long> shardingValue) {
System.out.println(availableTargetNames);
System.out.println(shardingValue);
return availableTargetNames;
}
}
```
----------------------------------------------------------------
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