You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2017/05/31 05:28:31 UTC

svn commit: r1796977 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java

Author: chetanm
Date: Wed May 31 05:28:31 2017
New Revision: 1796977

URL: http://svn.apache.org/viewvc?rev=1796977&view=rev
Log:
OAK-6246 - Support for out of band indexing with read only access to NodeStore

Dump the correct directory location which contains the index files

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java?rev=1796977&r1=1796976&r2=1796977&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/OutOfBandIndexer.java Wed May 31 05:28:31 2017
@@ -128,10 +128,10 @@ public class OutOfBandIndexer implements
         switchIndexLanesAndReindexFlag();
         preformIndexUpdate(baseState);
         writeMetaInfo();
-        copyIndexFilesToOutput();
+        File destDir = copyIndexFilesToOutput();
 
         log.info("Indexing completed for indexes {} in {} and index files are copied to {}",
-                indexHelper.getIndexPaths(), w, IndexCommand.getPath(indexHelper.getOutputDir()));
+                indexHelper.getIndexPaths(), w, IndexCommand.getPath(destDir));
     }
 
     private File getLocalIndexDir() throws IOException {
@@ -263,8 +263,10 @@ public class OutOfBandIndexer implements
         }
     }
 
-    private void copyIndexFilesToOutput() throws IOException {
+    private File copyIndexFilesToOutput() throws IOException {
+        File destDir = new File(indexHelper.getOutputDir(), getLocalIndexDir().getName());
         FileUtils.moveDirectoryToDirectory(getLocalIndexDir(), indexHelper.getOutputDir(), true);
+        return destDir;
     }
 
     private void configureEstimators(IndexUpdate indexUpdate) {