FewJuho commented on code in PR #200:
URL: 
https://github.com/apache/ignite-teamcity-bot/pull/200#discussion_r2303604689


##########
migrator/src/main/java/migrate/GridIntListMigrator.java:
##########
@@ -0,0 +1,532 @@
+/*
+ * 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 migrate;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.binary.BinaryObjectBuilder;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.cache.Cache;
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * Offline migrator for TeamCity Bot Ignite persistence.
+ * <p>
+ * Recursively scans all entries in Ignite caches and replaces any occurrence 
of the legacy type
+ * org.apache.ignite.internal.util.GridIntList with the new type
+ * org.apache.ignite.tcbot.common.util.GridIntList, preserving the int[] 
payload.
+ * <p>
+ * Usage:
+ * export IGNITE_WORK_DIR=/abs/path/to/work_backup
+ * ./gradlew -p migrator run --args="--verbose --report 200"      # dry run 
with verbose report
+ * ./gradlew -p migrator run --args="--apply --report 500"        # apply to 
all caches
+ */
+
+public final class GridIntListMigrator {

Review Comment:
   This is an online migration class that is called every time the bot is 
started. It doesnt seem necessary to add a one-time offline migration 
functionality there.



-- 
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-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to