This is an automated email from the ASF dual-hosted git repository.

timoninmaxim pushed a commit to branch IGNITE-25309
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git

commit d0ceef4ec794ebbaddaea568a58287fc85f97fe5
Author: Maksim Timonin <timonin.ma...@gmail.com>
AuthorDate: Wed May 7 14:52:01 2025 +0300

    IGNITE-25309 Fix compilation
---
 .../optimized/OptimizedMarshallerAopTest.java      | 99 ----------------------
 .../s3/encrypt/AsymmetricKeyEncryptionService.java |  7 +-
 .../s3/encrypt/SymmetricKeyEncryptionService.java  | 28 +++++-
 .../stream/camel/IgniteCamelStreamerTest.java      |  8 +-
 .../cdc/kafka/KafkaToIgniteMetadataUpdater.java    |  2 +-
 .../hibernate/HibernateL2CacheMultiJvmTest.java    |  4 +-
 .../ignite/stream/mqtt/IgniteMqttStreamerTest.java | 23 ++---
 .../spark/JavaEmbeddedIgniteRDDSelfTest.java       | 16 +++-
 ...avaEmbeddedIgniteRDDWithLocalStoreSelfTest.java | 12 ++-
 .../spark/JavaStandaloneIgniteRDDSelfTest.java     | 19 +++--
 .../CacheTopologyValidatorPluginProvider.java      |  5 +-
 11 files changed, 76 insertions(+), 147 deletions(-)

diff --git 
a/modules/aop-ext/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java
 
b/modules/aop-ext/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java
deleted file mode 100644
index 0a0efddc..00000000
--- 
a/modules/aop-ext/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.marshaller.optimized;
-
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.compute.gridify.Gridify;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.util.typedef.G;
-import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Test;
-
-import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED;
-
-/**
- * Test use GridOptimizedMarshaller and AspectJ AOP.
- *
- * The following configuration needs to be applied to enable AspectJ byte code
- * weaving.
- * <ul>
- * <li>
- *      JVM configuration should include:
- *      <tt>-javaagent:[IGNITE_HOME]/libs/aspectjweaver-1.7.2.jar</tt>
- * </li>
- * <li>
- *      Classpath should contain the 
<tt>[IGNITE_HOME]/modules/tests/config/aop/aspectj</tt> folder.
- * </li>
- * </ul>
- */
-public class OptimizedMarshallerAopTest extends GridCommonAbstractTest {
-    /** */
-    private static final AtomicInteger cntr = new AtomicInteger();
-
-    /**
-     * Constructs a test.
-     */
-    public OptimizedMarshallerAopTest() {
-        super(false /* start grid. */);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        cfg.setMarshaller(new OptimizedMarshaller());
-
-        G.start(cfg);
-
-        assert G.allGrids().size() == 1;
-    }
-
-    /**
-     * JUnit.
-     *
-     * @throws Exception If failed.
-     */
-    @Test
-    public void testUp() throws Exception {
-        G.ignite().events().localListen(new IgnitePredicate<Event>() {
-            @Override public boolean apply(Event evt) {
-                cntr.incrementAndGet();
-
-                return true;
-            }
-        }, EVT_TASK_FINISHED);
-
-        gridify1();
-
-        assertEquals("Method gridify() wasn't executed on grid.", 1, 
cntr.get());
-    }
-
-    /**
-     * Method grid-enabled with {@link 
org.apache.ignite.compute.gridify.Gridify} annotation.
-     * <p>
-     * Note that default {@code Gridify} configuration is used, so this method
-     * will be executed on remote node with the same argument.
-     */
-    @Gridify
-    private void gridify1() {
-        X.println("Executes on grid");
-    }
-}
diff --git 
a/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/AsymmetricKeyEncryptionService.java
 
b/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/AsymmetricKeyEncryptionService.java
index f85a9061..551e0f1e 100644
--- 
a/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/AsymmetricKeyEncryptionService.java
+++ 
b/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/AsymmetricKeyEncryptionService.java
@@ -23,9 +23,10 @@ import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
 import javax.crypto.IllegalBlockSizeException;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
+import static 
org.apache.ignite.spi.discovery.tcp.ipfinder.s3.encrypt.SymmetricKeyEncryptionService.createCipher;
+
 /**
  * Provides an implementation of asymmetric encryption to encrypt/decrypt the 
data.
  */
@@ -66,8 +67,8 @@ public class AsymmetricKeyEncryptionService implements 
EncryptionService {
         if (publicKey == null)
             throw new IgniteException("Public key was not set / was set to 
null.");
 
-        encCipher = IgniteUtils.createCipher(privateKey, Cipher.ENCRYPT_MODE);
-        decCipher = IgniteUtils.createCipher(publicKey, Cipher.DECRYPT_MODE);
+        encCipher = createCipher(privateKey, Cipher.ENCRYPT_MODE);
+        decCipher = createCipher(publicKey, Cipher.DECRYPT_MODE);
     }
 
     /** {@inheritDoc} */
diff --git 
a/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/SymmetricKeyEncryptionService.java
 
b/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/SymmetricKeyEncryptionService.java
index 89f04027..1b444d76 100644
--- 
a/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/SymmetricKeyEncryptionService.java
+++ 
b/modules/aws-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/encrypt/SymmetricKeyEncryptionService.java
@@ -17,12 +17,14 @@
 
 package org.apache.ignite.spi.discovery.tcp.ipfinder.s3.encrypt;
 
+import java.security.InvalidKeyException;
 import java.security.Key;
+import java.security.NoSuchAlgorithmException;
 import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
 import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
@@ -55,8 +57,8 @@ public class SymmetricKeyEncryptionService implements 
EncryptionService {
         if (secretKey == null)
             throw new IgniteException("Secret key was not set / was set to 
null.");
 
-        encCipher = IgniteUtils.createCipher(secretKey, Cipher.ENCRYPT_MODE);
-        decCipher = IgniteUtils.createCipher(secretKey, Cipher.DECRYPT_MODE);
+        encCipher = createCipher(secretKey, Cipher.ENCRYPT_MODE);
+        decCipher = createCipher(secretKey, Cipher.DECRYPT_MODE);
     }
 
     /** {@inheritDoc} */
@@ -95,4 +97,24 @@ public class SymmetricKeyEncryptionService implements 
EncryptionService {
     @Override public String toString() {
         return S.toString(SymmetricKeyEncryptionService.class, this, "super", 
super.toString());
     }
+
+    /**
+     * @param key Cipher Key.
+     * @param encMode Enc mode see {@link Cipher#ENCRYPT_MODE}, {@link 
Cipher#DECRYPT_MODE}, etc.
+     */
+    public static Cipher createCipher(Key key, int encMode) {
+        if (key == null)
+            throw new IgniteException("Cipher Key cannot be null");
+
+        try {
+            Cipher cipher = Cipher.getInstance(key.getAlgorithm());
+
+            cipher.init(encMode, key);
+
+            return cipher;
+        }
+        catch (NoSuchAlgorithmException | NoSuchPaddingException | 
InvalidKeyException e) {
+            throw new IgniteException(e);
+        }
+    }
 }
diff --git 
a/modules/camel-ext/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
 
b/modules/camel-ext/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
index 06e581e5..efe817cf 100644
--- 
a/modules/camel-ext/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
+++ 
b/modules/camel-ext/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
@@ -47,9 +47,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.CacheEvent;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.util.lang.GridMapEntry;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteBiPredicate;
-import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.stream.StreamMultipleTupleExtractor;
 import org.apache.ignite.stream.StreamSingleTupleExtractor;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -376,11 +374,7 @@ public class IgniteCamelStreamerTest extends 
GridCommonAbstractTest {
 
                 final Map<Integer, String> answer = new HashMap<>();
 
-                F.forEach(map.keySet(), new IgniteInClosure<String>() {
-                    @Override public void apply(String s) {
-                        answer.put(Integer.parseInt(s), map.get(s));
-                    }
-                });
+                map.keySet().forEach(s -> answer.put(Integer.parseInt(s), 
map.get(s)));
 
                 return answer;
             }
diff --git 
a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteMetadataUpdater.java
 
b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteMetadataUpdater.java
index 236dc2f7..b6a8bfb2 100644
--- 
a/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteMetadataUpdater.java
+++ 
b/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteMetadataUpdater.java
@@ -137,7 +137,7 @@ public class KafkaToIgniteMetadataUpdater implements 
AutoCloseable, OffsetCommit
         // (stored in 'offsets' field). If there are no offsets changes, 
polling cycle is skipped.
         Map<TopicPartition, Long> offsets0 = cnsmr.endOffsets(parts, 
Duration.ofMillis(kafkaReqTimeout));
 
-        if (!F.isEmpty(offsets0) && F.eqNotOrdered(offsets, offsets0)) {
+        if (!F.isEmpty(offsets0) && offsets0.equals(offsets)) {
             if (log.isDebugEnabled())
                 log.debug("Offsets unchanged, poll skipped");
 
diff --git 
a/modules/hibernate-ext/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java
 
b/modules/hibernate-ext/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java
index 3fb51df9..17d3b3de 100644
--- 
a/modules/hibernate-ext/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java
+++ 
b/modules/hibernate-ext/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.IgniteCompute;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.lang.IgniteRunnable;
 import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.resources.LoggerResource;
@@ -37,6 +36,7 @@ import org.hibernate.annotations.CacheConcurrencyStrategy;
 import org.hibernate.boot.MetadataSources;
 import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
 import org.junit.Test;
+
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -60,8 +60,6 @@ public class HibernateL2CacheMultiJvmTest extends 
GridCommonAbstractTest {
             cacheConfiguration(Entity3.class.getName())
         );
 
-        cfg.setMarshaller(new BinaryMarshaller());
-
         cfg.setPeerClassLoadingEnabled(false);
 
         return cfg;
diff --git 
a/modules/mqtt-ext/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
 
b/modules/mqtt-ext/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
index 89530f34..f76c2c1e 100644
--- 
a/modules/mqtt-ext/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
+++ 
b/modules/mqtt-ext/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
@@ -27,6 +27,7 @@ import java.util.TreeSet;
 import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
 import com.github.rholder.retry.StopStrategies;
 import com.github.rholder.retry.WaitStrategies;
 import com.google.common.base.Splitter;
@@ -42,9 +43,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.CacheEvent;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.util.lang.GridMapEntry;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteBiPredicate;
-import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.stream.StreamMultipleTupleExtractor;
 import org.apache.ignite.stream.StreamSingleTupleExtractor;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -534,18 +533,12 @@ public class IgniteMqttStreamerTest extends 
GridCommonAbstractTest {
             final List<StringBuilder> sbs = new ArrayList<>(topics.size());
 
             // initialize String Builders for each topic
-            F.forEach(topics, new IgniteInClosure<String>() {
-                @Override public void apply(String s) {
-                    sbs.add(new StringBuilder());
-                }
-            });
+            topics.forEach(t -> sbs.add(new StringBuilder()));
 
             // fill String Builders for each topic
-            F.forEach(F.range(fromIdx, fromIdx + cnt), new 
IgniteInClosure<Integer>() {
-                @Override public void apply(Integer integer) {
-                    sbs.get(integer % topics.size()).append(integer.toString() 
+ "," + TEST_DATA.get(integer) + "\n");
-                }
-            });
+            IntStream.range(fromIdx, fromIdx + cnt)
+                .forEach(integer ->
+                    sbs.get(integer % 
topics.size()).append(integer).append(",").append(TEST_DATA.get(integer)).append("\n"));
 
             // send each buffer out
             for (int i = 0; i < topics.size(); i++) {
@@ -633,11 +626,7 @@ public class IgniteMqttStreamerTest extends 
GridCommonAbstractTest {
 
                 final Map<Integer, String> answer = new HashMap<>();
 
-                F.forEach(map.keySet(), new IgniteInClosure<String>() {
-                    @Override public void apply(String s) {
-                        answer.put(Integer.parseInt(s), map.get(s));
-                    }
-                });
+                map.keySet().forEach(s -> answer.put(Integer.parseInt(s), 
map.get(s)));
 
                 return answer;
             }
diff --git 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java
 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java
index fbd4363e..fa3478f4 100644
--- 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java
+++ 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java
@@ -19,11 +19,12 @@ package org.apache.ignite.spark;
 
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.spark.SparkConf;
@@ -128,8 +129,10 @@ public class JavaEmbeddedIgniteRDDSelfTest extends 
GridCommonAbstractTest {
         try {
             ic = new JavaIgniteContext<>(sc, new IgniteConfigProvider(), 
false);
 
+            List<Integer> keyList = IntStream.range(0, 
KEYS_CNT).boxed().collect(Collectors.toList());
+
             ic.fromCache(PARTITIONED_CACHE_NAME)
-                .savePairs(sc.parallelize(F.range(0, KEYS_CNT), 
GRID_CNT).mapToPair(TO_PAIR_F), true, false);
+                .savePairs(sc.parallelize(keyList, 
GRID_CNT).mapToPair(TO_PAIR_F), true, false);
 
             Ignite ignite = ic.ignite();
 
@@ -200,7 +203,10 @@ public class JavaEmbeddedIgniteRDDSelfTest extends 
GridCommonAbstractTest {
             JavaIgniteRDD<String, Entity> cache = 
ic.fromCache(PARTITIONED_CACHE_NAME);
 
             int cnt = 1001;
-            cache.savePairs(sc.parallelize(F.range(0, cnt), 
GRID_CNT).mapToPair(INT_TO_ENTITY_F), true, false);
+
+            List<Integer> cntList = IntStream.range(0, 
cnt).boxed().collect(Collectors.toList());
+
+            cache.savePairs(sc.parallelize(cntList, 
GRID_CNT).mapToPair(INT_TO_ENTITY_F), true, false);
 
             List<Entity> res = cache.objectSql("Entity", "name = ? and salary 
= ?", "name50", 5000)
                 .map(STR_ENTITY_PAIR_TO_ENTITY_F).collect();
@@ -238,7 +244,9 @@ public class JavaEmbeddedIgniteRDDSelfTest extends 
GridCommonAbstractTest {
 
             JavaIgniteRDD<String, Entity> cache = 
ic.fromCache(PARTITIONED_CACHE_NAME);
 
-            cache.savePairs(sc.parallelize(F.range(0, 1001), 
GRID_CNT).mapToPair(INT_TO_ENTITY_F), true, false);
+            List<Integer> cntList = IntStream.range(0, 
1001).boxed().collect(Collectors.toList());
+
+            cache.savePairs(sc.parallelize(cntList, 
GRID_CNT).mapToPair(INT_TO_ENTITY_F), true, false);
 
             Dataset<Row> df =
                 cache.sql("select id, name, salary from Entity where name = ? 
and salary = ?", "name50", 5000);
diff --git 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDWithLocalStoreSelfTest.java
 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDWithLocalStoreSelfTest.java
index 2f13d25d..d24acd64 100644
--- 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDWithLocalStoreSelfTest.java
+++ 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDWithLocalStoreSelfTest.java
@@ -17,8 +17,11 @@
 
 package org.apache.ignite.spark;
 
+import java.util.List;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import javax.cache.Cache;
 import javax.cache.configuration.FactoryBuilder;
 import org.apache.ignite.Ignite;
@@ -26,7 +29,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.spark.SparkConf;
@@ -117,14 +119,18 @@ public class JavaEmbeddedIgniteRDDWithLocalStoreSelfTest 
extends GridCommonAbstr
             for (int i = 0; i < 1000; i++)
                 storeMap.put(i, i);
 
+            List<Integer> cntList = IntStream.range(1000, 
2000).boxed().collect(Collectors.toList());
+
             ic.fromCache(PARTITIONED_CACHE_NAME)
-                .savePairs(sc.parallelize(F.range(1000, 2000), 
GRID_CNT).mapToPair(SIMPLE_FUNCTION), true, false);
+                .savePairs(sc.parallelize(cntList, 
GRID_CNT).mapToPair(SIMPLE_FUNCTION), true, false);
 
             for (int i = 0; i < 2000; i++)
                 assertEquals(i, storeMap.get(i));
 
+            cntList = IntStream.range(2000, 
3000).boxed().collect(Collectors.toList());
+
             ic.fromCache(PARTITIONED_CACHE_NAME)
-                .savePairs(sc.parallelize(F.range(2000, 3000), 
GRID_CNT).mapToPair(SIMPLE_FUNCTION), true, true);
+                .savePairs(sc.parallelize(cntList, 
GRID_CNT).mapToPair(SIMPLE_FUNCTION), true, true);
 
             for (int i = 2000; i < 3000; i++)
                 assertNull(storeMap.get(i));
diff --git 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
index 828daf0a..acfc690c 100644
--- 
a/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
+++ 
b/modules/spark-ext/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
@@ -20,12 +20,13 @@ package org.apache.ignite.spark;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
@@ -127,8 +128,10 @@ public class JavaStandaloneIgniteRDDSelfTest extends 
GridCommonAbstractTest {
         try {
             JavaIgniteContext<String, String> ic = new JavaIgniteContext<>(sc, 
new IgniteConfigProvider());
 
+            List<Integer> keyList = IntStream.range(0, 
KEYS_CNT).boxed().collect(Collectors.toList());
+
             ic.fromCache(ENTITY_CACHE_NAME)
-                .savePairs(sc.parallelize(F.range(0, KEYS_CNT), 
2).mapToPair(TO_PAIR_F));
+                .savePairs(sc.parallelize(keyList, 2).mapToPair(TO_PAIR_F));
 
             Ignite ignite = Ignition.ignite("grid-0");
 
@@ -188,7 +191,9 @@ public class JavaStandaloneIgniteRDDSelfTest extends 
GridCommonAbstractTest {
 
             JavaIgniteRDD<String, Entity> cache = 
ic.fromCache(ENTITY_CACHE_NAME);
 
-            cache.savePairs(sc.parallelize(F.range(0, 1001), 
2).mapToPair(INT_TO_ENTITY_F));
+            List<Integer> cntList = IntStream.range(0, 
1001).boxed().collect(Collectors.toList());
+
+            cache.savePairs(sc.parallelize(cntList, 
2).mapToPair(INT_TO_ENTITY_F));
 
             List<Entity> res = cache.objectSql("Entity", "name = ? and salary 
= ?", "name50", 5000)
                 .map(STR_ENTITY_PAIR_TO_ENTITY_F).collect();
@@ -216,7 +221,9 @@ public class JavaStandaloneIgniteRDDSelfTest extends 
GridCommonAbstractTest {
 
             JavaIgniteRDD<String, Entity> cache = 
ic.fromCache(ENTITY_CACHE_NAME);
 
-            cache.savePairs(sc.parallelize(F.range(0, 1001), 
2).mapToPair(INT_TO_ENTITY_F));
+            List<Integer> cntList = IntStream.range(0, 
1001).boxed().collect(Collectors.toList());
+
+            cache.savePairs(sc.parallelize(cntList, 
2).mapToPair(INT_TO_ENTITY_F));
 
             Dataset<Row> df =
                 cache.sql("select id, name, salary from Entity where name = ? 
and salary = ?", "name50", 5000);
@@ -264,7 +271,9 @@ public class JavaStandaloneIgniteRDDSelfTest extends 
GridCommonAbstractTest {
 
             JavaIgniteRDD<String, EntityTestAllTypeFields> cache = 
ic.fromCache(ENTITY_ALL_TYPES_CACHE_NAME);
 
-            cache.savePairs(sc.parallelize(F.range(0, cnt), 
2).mapToPair(INT_TO_ENTITY_ALL_FIELDS_F));
+            List<Integer> cntList = IntStream.range(0, 
1001).boxed().collect(Collectors.toList());
+
+            cache.savePairs(sc.parallelize(cntList, 
2).mapToPair(INT_TO_ENTITY_ALL_FIELDS_F));
 
             EntityTestAllTypeFields e = new EntityTestAllTypeFields(cnt / 2);
             for (Field f : EntityTestAllTypeFields.class.getDeclaredFields()) {
diff --git 
a/modules/topology-validator-ext/src/main/java/org/apache/ignite/plugin/cache/CacheTopologyValidatorPluginProvider.java
 
b/modules/topology-validator-ext/src/main/java/org/apache/ignite/plugin/cache/CacheTopologyValidatorPluginProvider.java
index b34ac2d7..e3092586 100644
--- 
a/modules/topology-validator-ext/src/main/java/org/apache/ignite/plugin/cache/CacheTopologyValidatorPluginProvider.java
+++ 
b/modules/topology-validator-ext/src/main/java/org/apache/ignite/plugin/cache/CacheTopologyValidatorPluginProvider.java
@@ -38,6 +38,7 @@ import 
org.apache.ignite.internal.processors.cluster.ChangeGlobalStateFinishMess
 import 
org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationLifecycleListener;
 import 
org.apache.ignite.internal.processors.configuration.distributed.DistributedPropertyDispatcher;
 import 
org.apache.ignite.internal.processors.configuration.distributed.SimpleDistributedProperty;
+import org.apache.ignite.internal.util.lang.ClusterNodeFunc;
 import org.apache.ignite.internal.util.lang.GridPlainRunnable;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.LT;
@@ -351,7 +352,7 @@ public class CacheTopologyValidatorPluginProvider 
implements PluginProvider<Plug
                                         " mode. Cache writes were already 
restricted for all configured caches, but this" +
                                         " step is still required in order to 
be able to unlock cache writes in the future." +
                                         " Retry this operation manually, if 
possible [segmentedNodes=" +
-                                        F.viewReadOnly(discoCache.allNodes(), 
F.node2id()) + "]", e);
+                                        F.viewReadOnly(discoCache.allNodes(), 
ClusterNodeFunc.node2id()) + "]", e);
                             }
                         }
                     }, PUBLIC_POOL);
@@ -361,7 +362,7 @@ public class CacheTopologyValidatorPluginProvider 
implements PluginProvider<Plug
                 }
 
                 U.warn(log, "Cluster segmentation was detected. Write to all 
user caches were blocked" +
-                    " [segmentedNodes=" + 
F.viewReadOnly(discoCache.allNodes(), F.node2id()) + ']');
+                    " [segmentedNodes=" + 
F.viewReadOnly(discoCache.allNodes(), ClusterNodeFunc.node2id()) + ']');
             }
 
             state = locStateCopy;

Reply via email to