You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "java-lbb (via GitHub)" <gi...@apache.org> on 2023/06/08 02:59:11 UTC
[GitHub] [shardingsphere] java-lbb opened a new issue, #26117: Why is the parameter marking index obtained not the value of the specified shard column
java-lbb opened a new issue, #26117:
URL: https://github.com/apache/shardingsphere/issues/26117
![image](https://github.com/apache/shardingsphere/assets/111548695/08670115-ef1a-4cc5-b4d8-d39999264220)
**I want to get the value of 8 indexes in the parameter list —"72023050511451639719",but always get the value of the 0th index。**
this my configuration
![image](https://github.com/apache/shardingsphere/assets/111548695/14908fd5-bd3f-4564-829a-ebfb65c9ad7f)
this my ShardingShardingAlgorithm
`@Component("FansDetailShardingAlgorithm")
public class FansDetailShardingAlgorithm implements StandardShardingAlgorithm<String> {
@DubboReference
OrderDubboService orderDubboService;
private final ConcurrentMap<String, String> map = new ConcurrentHashMap<>();
@Override
public String doSharding(Collection<String> tableNames, PreciseShardingValue<String> preciseShardingValue) {
if (CollectionUtil.isNotEmpty(map.keySet())) {
for (String orderId : map.keySet()) {
String uuid = map.get(orderId);
if (ObjectUtil.isNotNull(uuid)) {
return preciseShardingValue.getLogicTableName() + "_" + Math.abs(uuid.hashCode() % 50);
} else {
Order order = orderDubboService.getOrder(preciseShardingValue.getValue());
map.put(order.getOrderId(), order.getUuid());
return preciseShardingValue.getLogicTableName() + "_" + Math.abs(order.getUuid().hashCode() % 50);
}
}
}
Order order = orderDubboService.getOrder(preciseShardingValue.getValue());
map.put(order.getOrderId(), order.getUuid());
return preciseShardingValue.getLogicTableName() + "_" + Math.abs(order.getUuid().hashCode() % 50);
}
@Override
public Collection<String> doSharding(Collection<String> tableNames, RangeShardingValue<String> rangeShardingValue) {
return tableNames;
}
@Override
public void init() {
}
@Override
public String getType() {
return "CLASS_BASED";
}
}`
![image](https://github.com/apache/shardingsphere/assets/111548695/f61bfaeb-55cf-43a1-99d9-1f4fc3c89efa)
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] java-lbb closed issue #26117: Why is the parameter marking index obtained not the value of the specified shard column
Posted by "java-lbb (via GitHub)" <gi...@apache.org>.
java-lbb closed issue #26117: Why is the parameter marking index obtained not the value of the specified shard column
URL: https://github.com/apache/shardingsphere/issues/26117
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #26117: Why is the parameter marking index obtained not the value of the specified shard column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #26117:
URL: https://github.com/apache/shardingsphere/issues/26117#issuecomment-1666195626
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] java-lbb commented on issue #26117: Why is the parameter marking index obtained not the value of the specified shard column
Posted by "java-lbb (via GitHub)" <gi...@apache.org>.
java-lbb commented on issue #26117:
URL: https://github.com/apache/shardingsphere/issues/26117#issuecomment-1667388166
1
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #26117: Why is the parameter marking index obtained not the value of the specified shard column
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #26117:
URL: https://github.com/apache/shardingsphere/issues/26117#issuecomment-1622213648
Please refer to the issue template to provide more details for your question. for example: version
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org