AMashenkov commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1093026111
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/metadata/ColocationGroup.java:
##########
@@ -230,29 +266,30 @@ public ColocationGroup mapToNodes(List<String> nodeNames)
{
@NotNull
private ColocationGroup forNodes0(List<String> nodeNames) {
- List<List<String>> assignments = new
ArrayList<>(SYNTHETIC_PARTITIONS_COUNT);
- for (int i = 0; i < SYNTHETIC_PARTITIONS_COUNT; i++) {
- assignments.add(asList(nodeNames.get(i % nodeNames.size())));
- }
return new ColocationGroup(sourceIds, nodeNames, assignments);
}
/**
- * Returns List of partitions to scan on the given node.
+ * Returns list of pairs containing the partition number to scan on the
given node with the corresponding raft group term.
*
- * @param nodeNames Cluster node consistent ID.
- * @return List of partitions to scan on the given node.
+ * @param nodeName Cluster node consistent ID.
+ * @return List of pairs containing the partition number to scan on the
given node with the corresponding raft group term.
*/
- public int[] partitions(String nodeNames) {
- IgniteIntList parts = new IgniteIntList(assignments.size());
+ public List<IgniteBiTuple<Integer, Long>> partitionsWithTerms(String
nodeName) {
Review Comment:
Let avoid using BiTuple and replace it with certain class or replace the
List with
e.g. with Int2LongOpenHashMap
--
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]