3232import java .util .function .Consumer ;
3333import java .util .stream .Collectors ;
3434import org .apache .ignite .cluster .ClusterNode ;
35- import org .apache .ignite .internal .processors .cache .verify .PartitionHashRecordV2 ;
35+ import org .apache .ignite .internal .processors .cache .verify .PartitionHashRecord ;
3636import org .apache .ignite .internal .processors .cache .verify .TransactionsHashRecord ;
3737import org .apache .ignite .internal .processors .cache .version .GridCacheVersion ;
3838import org .apache .ignite .internal .util .tostring .GridToStringInclude ;
@@ -53,19 +53,19 @@ public class IdleVerifyResult extends VisorDataTransferObject {
5353
5454 /** Counter conflicts. */
5555 @ GridToStringInclude
56- private Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> cntrConflicts = new HashMap <>();
56+ private Map <PartitionKey , List <PartitionHashRecord >> cntrConflicts = new HashMap <>();
5757
5858 /** Hash conflicts. */
5959 @ GridToStringInclude
60- private Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> hashConflicts = new HashMap <>();
60+ private Map <PartitionKey , List <PartitionHashRecord >> hashConflicts = new HashMap <>();
6161
6262 /** Moving partitions. */
6363 @ GridToStringInclude
64- private Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> movingPartitions = new HashMap <>();
64+ private Map <PartitionKey , List <PartitionHashRecord >> movingPartitions = new HashMap <>();
6565
6666 /** Lost partitions. */
6767 @ GridToStringInclude
68- private Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> lostPartitions = new HashMap <>();
68+ private Map <PartitionKey , List <PartitionHashRecord >> lostPartitions = new HashMap <>();
6969
7070 /** Transaction hashes conflicts. */
7171 @ GridToStringInclude
@@ -96,7 +96,7 @@ public IdleVerifyResult(Map<ClusterNode, Exception> exceptions) {
9696 * @param txHashConflicts Transaction hashes conflicts.
9797 */
9898 public IdleVerifyResult (
99- Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> clusterHashes ,
99+ Map <PartitionKey , List <PartitionHashRecord >> clusterHashes ,
100100 @ Nullable List <List <TransactionsHashRecord >> txHashConflicts ,
101101 @ Nullable Map <ClusterNode , Collection <GridCacheVersion >> partiallyCommittedTxs
102102 ) {
@@ -111,23 +111,23 @@ public IdleVerifyResult(
111111 * @param exceptions Exceptions on each cluster node.
112112 */
113113 public IdleVerifyResult (
114- Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> clusterHashes ,
114+ Map <PartitionKey , List <PartitionHashRecord >> clusterHashes ,
115115 Map <ClusterNode , Exception > exceptions
116116 ) {
117- for (Map .Entry <PartitionKeyV2 , List <PartitionHashRecordV2 >> e : clusterHashes .entrySet ()) {
117+ for (Map .Entry <PartitionKey , List <PartitionHashRecord >> e : clusterHashes .entrySet ()) {
118118 Integer partHash = null ;
119119 Integer partVerHash = null ;
120120 Object updateCntr = null ;
121121
122- for (PartitionHashRecordV2 record : e .getValue ()) {
123- if (record .partitionState () == PartitionHashRecordV2 .PartitionState .MOVING ) {
122+ for (PartitionHashRecord record : e .getValue ()) {
123+ if (record .partitionState () == PartitionHashRecord .PartitionState .MOVING ) {
124124 movingPartitions .computeIfAbsent (e .getKey (), k -> new ArrayList <>())
125125 .add (record );
126126
127127 continue ;
128128 }
129129
130- if (record .partitionState () == PartitionHashRecordV2 .PartitionState .LOST ) {
130+ if (record .partitionState () == PartitionHashRecord .PartitionState .LOST ) {
131131 lostPartitions .computeIfAbsent (e .getKey (), k -> new ArrayList <>())
132132 .add (record );
133133
@@ -191,28 +191,28 @@ public IdleVerifyResult(
191191 /**
192192 * @return Counter conflicts.
193193 */
194- public Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> counterConflicts () {
194+ public Map <PartitionKey , List <PartitionHashRecord >> counterConflicts () {
195195 return cntrConflicts ;
196196 }
197197
198198 /**
199199 * @return Hash conflicts.
200200 */
201- public Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> hashConflicts () {
201+ public Map <PartitionKey , List <PartitionHashRecord >> hashConflicts () {
202202 return hashConflicts ;
203203 }
204204
205205 /**
206206 * @return Moving partitions.
207207 */
208- public Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> movingPartitions () {
208+ public Map <PartitionKey , List <PartitionHashRecord >> movingPartitions () {
209209 return Collections .unmodifiableMap (movingPartitions );
210210 }
211211
212212 /**
213213 * @return Lost partitions.
214214 */
215- public Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> lostPartitions () {
215+ public Map <PartitionKey , List <PartitionHashRecord >> lostPartitions () {
216216 return lostPartitions ;
217217 }
218218
@@ -244,7 +244,7 @@ public void print(Consumer<String> printer, boolean printExceptionMessages) {
244244 else
245245 printConflicts (printer );
246246
247- Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> moving = movingPartitions ();
247+ Map <PartitionKey , List <PartitionHashRecord >> moving = movingPartitions ();
248248
249249 if (!moving .isEmpty ())
250250 printer .accept ("Possible results are not full due to rebalance still in progress." + nl ());
@@ -287,13 +287,13 @@ public void print(Consumer<String> printer, boolean printExceptionMessages) {
287287 */
288288 private void printSkippedPartitions (
289289 Consumer <String > printer ,
290- Map <PartitionKeyV2 , List <PartitionHashRecordV2 >> map ,
290+ Map <PartitionKey , List <PartitionHashRecord >> map ,
291291 String partitionState
292292 ) {
293293 if (!F .isEmpty (map )) {
294294 printer .accept ("Verification was skipped for " + map .size () + " " + partitionState + " partitions:\n " );
295295
296- for (Map .Entry <PartitionKeyV2 , List <PartitionHashRecordV2 >> entry : map .entrySet ()) {
296+ for (Map .Entry <PartitionKey , List <PartitionHashRecord >> entry : map .entrySet ()) {
297297 printer .accept ("Skipped partition: " + entry .getKey () + "\n " );
298298
299299 printer .accept ("Partition instances: " + entry .getValue () + "\n " );
@@ -314,14 +314,14 @@ private void printConflicts(Consumer<String> printer) {
314314 + (partiallyCommittedTxs == null ? "" : ", partiallyCommittedSize=" + partiallyCommittedTxs .size ())
315315 + "]" + nl ());
316316
317- Set <PartitionKeyV2 > allConflicts = new HashSet <>();
317+ Set <PartitionKey > allConflicts = new HashSet <>();
318318
319319 if (!F .isEmpty (counterConflicts ())) {
320320 allConflicts .addAll (counterConflicts ().keySet ());
321321
322322 printer .accept ("Update counter conflicts:" + nl ());
323323
324- for (Map .Entry <PartitionKeyV2 , List <PartitionHashRecordV2 >> entry : counterConflicts ().entrySet ()) {
324+ for (Map .Entry <PartitionKey , List <PartitionHashRecord >> entry : counterConflicts ().entrySet ()) {
325325 printer .accept ("Conflict partition: " + entry .getKey () + nl ());
326326
327327 printer .accept ("Partition instances: " + entry .getValue () + nl ());
@@ -335,7 +335,7 @@ private void printConflicts(Consumer<String> printer) {
335335
336336 printer .accept ("Hash conflicts:" + nl ());
337337
338- for (Map .Entry <PartitionKeyV2 , List <PartitionHashRecordV2 >> entry : hashConflicts ().entrySet ()) {
338+ for (Map .Entry <PartitionKey , List <PartitionHashRecord >> entry : hashConflicts ().entrySet ()) {
339339 printer .accept ("Conflict partition: " + entry .getKey () + nl ());
340340
341341 printer .accept ("Partition instances: " + entry .getValue () + nl ());
@@ -364,9 +364,9 @@ private void printConflicts(Consumer<String> printer) {
364364
365365 Map <String , TreeSet <Integer >> conflictsSummary = allConflicts .stream ()
366366 .collect (Collectors .groupingBy (
367- PartitionKeyV2 ::groupName ,
367+ PartitionKey ::groupName ,
368368 Collectors .mapping (
369- PartitionKeyV2 ::partitionId ,
369+ PartitionKey ::partitionId ,
370370 Collectors .toCollection (TreeSet ::new ))));
371371
372372 for (Map .Entry <String , TreeSet <Integer >> grpConflicts : conflictsSummary .entrySet ()) {
0 commit comments