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

fortino pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new abcfb39909 Deprecate all Mongo download strategies except for 
Pipelined. (#1169)
abcfb39909 is described below

commit abcfb39909afbaf58b436a9ad6e34998e864a833
Author: Nuno Santos <[email protected]>
AuthorDate: Fri Oct 20 13:40:17 2023 +0200

    Deprecate all Mongo download strategies except for Pipelined. (#1169)
---
 .../index/indexer/document/flatfile/FlatFileNodeStoreBuilder.java   | 5 ++++-
 .../document/flatfile/MultithreadedTraverseWithSortStrategy.java    | 3 +++
 .../oak/index/indexer/document/flatfile/StoreAndSortStrategy.java   | 5 +++++
 .../index/indexer/document/flatfile/TraverseWithSortStrategy.java   | 6 +++++-
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileNodeStoreBuilder.java
 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileNodeStoreBuilder.java
index 6f2c4e6712..efc9490f44 100644
--- 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileNodeStoreBuilder.java
+++ 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileNodeStoreBuilder.java
@@ -356,15 +356,18 @@ public class FlatFileNodeStoreBuilder {
     IndexStoreSortStrategy createSortStrategy(File dir) throws IOException {
         switch (sortStrategyType) {
             case STORE_AND_SORT:
-                log.info("Using StoreAndSortStrategy");
+                log.info("Using StoreAndSortStrategy.");
+                log.warn("StoreAndSortStrategy is deprecated and will be 
removed in the near future. Use PipelinedStrategy instead.");
                 return new 
StoreAndSortStrategy(nodeStateEntryTraverserFactory, preferredPathElements, 
entryWriter, dir,
                         algorithm, pathPredicate, checkpoint);
             case TRAVERSE_WITH_SORT:
                 log.info("Using TraverseWithSortStrategy");
+                log.warn("TraverseWithSortStrategy is deprecated and will be 
removed in the near future. Use PipelinedStrategy instead.");
                 return new 
TraverseWithSortStrategy(nodeStateEntryTraverserFactory, preferredPathElements, 
entryWriter, dir,
                         algorithm, pathPredicate, checkpoint);
             case MULTITHREADED_TRAVERSE_WITH_SORT:
                 log.info("Using MultithreadedTraverseWithSortStrategy");
+                log.warn("MultithreadedTraverseWithSortStrategy is deprecated 
and will be removed in the near future. Use PipelinedStrategy instead.");
                 return new 
MultithreadedTraverseWithSortStrategy(nodeStateEntryTraverserFactory, 
lastModifiedBreakPoints, preferredPathElements,
                         blobStore, dir, existingDataDumpDirs, algorithm, 
memoryManager, dumpThreshold, pathPredicate, checkpoint);
             case PIPELINED:
diff --git 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MultithreadedTraverseWithSortStrategy.java
 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MultithreadedTraverseWithSortStrategy.java
index c451336b24..9b84b0b3ee 100644
--- 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MultithreadedTraverseWithSortStrategy.java
+++ 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MultithreadedTraverseWithSortStrategy.java
@@ -23,6 +23,7 @@ import org.apache.jackrabbit.guava.common.base.Stopwatch;
 import org.apache.jackrabbit.guava.common.collect.Lists;
 import org.apache.jackrabbit.oak.commons.Compression;
 import org.apache.jackrabbit.oak.index.indexer.document.CompositeException;
+import 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.pipelined.PipelinedStrategy;
 import 
org.apache.jackrabbit.oak.index.indexer.document.indexstore.IndexStoreSortStrategyBase;
 import org.apache.jackrabbit.oak.index.indexer.document.LastModifiedRange;
 import 
org.apache.jackrabbit.oak.index.indexer.document.NodeStateEntryTraverser;
@@ -152,7 +153,9 @@ import static 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFile
  *          </ol>
  *     </li>
  * </ol>
+ * @deprecated Use {@link PipelinedStrategy} instead
  */
+@Deprecated
 public class MultithreadedTraverseWithSortStrategy extends 
IndexStoreSortStrategyBase {
 
     private static final Logger log = 
LoggerFactory.getLogger(MultithreadedTraverseWithSortStrategy.class);
diff --git 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/StoreAndSortStrategy.java
 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/StoreAndSortStrategy.java
index 6c1616c9f5..b9dd13389a 100644
--- 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/StoreAndSortStrategy.java
+++ 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/StoreAndSortStrategy.java
@@ -26,6 +26,7 @@ import 
org.apache.jackrabbit.oak.index.indexer.document.LastModifiedRange;
 import org.apache.jackrabbit.oak.index.indexer.document.NodeStateEntry;
 import 
org.apache.jackrabbit.oak.index.indexer.document.NodeStateEntryTraverser;
 import 
org.apache.jackrabbit.oak.index.indexer.document.NodeStateEntryTraverserFactory;
+import 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.pipelined.PipelinedStrategy;
 import 
org.apache.jackrabbit.oak.index.indexer.document.indexstore.IndexStoreSortStrategyBase;
 import 
org.apache.jackrabbit.oak.index.indexer.document.indexstore.IndexStoreUtils;
 import org.apache.jackrabbit.oak.plugins.document.mongo.TraversingRange;
@@ -44,6 +45,10 @@ import static 
org.apache.jackrabbit.oak.commons.IOUtils.humanReadableByteCount;
 import static 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileNodeStoreBuilder.OAK_INDEXER_MAX_SORT_MEMORY_IN_GB;
 import static 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileNodeStoreBuilder.OAK_INDEXER_MAX_SORT_MEMORY_IN_GB_DEFAULT;
 
+/**
+ * @deprecated Use {@link PipelinedStrategy} instead
+ */
+@Deprecated
 class StoreAndSortStrategy extends IndexStoreSortStrategyBase {
     private static final String OAK_INDEXER_DELETE_ORIGINAL = 
"oak.indexer.deleteOriginal";
     private static final int LINE_SEP_LENGTH = LINE_SEPARATOR.value().length();
diff --git 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseWithSortStrategy.java
 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseWithSortStrategy.java
index 0cc69602eb..4a920d8b19 100644
--- 
a/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseWithSortStrategy.java
+++ 
b/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseWithSortStrategy.java
@@ -23,6 +23,7 @@ import org.apache.commons.io.FileUtils;
 import org.apache.jackrabbit.guava.common.base.Stopwatch;
 import org.apache.jackrabbit.oak.commons.Compression;
 import org.apache.jackrabbit.oak.commons.sort.ExternalSort;
+import 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.pipelined.PipelinedStrategy;
 import 
org.apache.jackrabbit.oak.index.indexer.document.indexstore.IndexStoreSortStrategyBase;
 import org.apache.jackrabbit.oak.index.indexer.document.LastModifiedRange;
 import org.apache.jackrabbit.oak.index.indexer.document.NodeStateEntry;
@@ -61,7 +62,10 @@ import static 
org.apache.jackrabbit.guava.common.base.Charsets.UTF_8;
 import static org.apache.jackrabbit.oak.commons.IOUtils.humanReadableByteCount;
 import static 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileNodeStoreBuilder.OAK_INDEXER_MAX_SORT_MEMORY_IN_GB;
 import static 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileNodeStoreBuilder.OAK_INDEXER_MAX_SORT_MEMORY_IN_GB_DEFAULT;
-
+/**
+ * @deprecated Use {@link PipelinedStrategy} instead
+ */
+@Deprecated
 class TraverseWithSortStrategy extends IndexStoreSortStrategyBase {
     private static final String OAK_INDEXER_MIN_MEMORY = 
"oak.indexer.minMemoryForWork";
     private final Logger log = LoggerFactory.getLogger(getClass());

Reply via email to