asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject [9/9] asterixdb git commit: Remove Append Only Flag
Date Fri, 16 Dec 2016 07:49:51 GMT
Remove Append Only Flag

Change-Id: Id5d6917db8ab29aa01521596f556006e25a502fe
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1385
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hubailmor@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/bc3d1b05
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/bc3d1b05
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/bc3d1b05

Branch: refs/heads/master
Commit: bc3d1b05cbaf6af5fcf47026b671348e9e8aad34
Parents: 87fa4d8
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Thu Dec 15 11:20:25 2016 -0800
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Thu Dec 15 23:48:52 2016 -0800

----------------------------------------------------------------------
 .../physical/InvertedIndexPOperator.java        |  10 +-
 .../external/ExternalIndexingOperations.java    |   8 +-
 .../apache/asterix/file/DatasetOperations.java  |   8 +-
 .../apache/asterix/file/IndexOperations.java    |   6 +-
 .../file/SecondaryBTreeOperationsHelper.java    |   7 +-
 .../file/SecondaryIndexOperationsHelper.java    |  14 +-
 .../SecondaryInvertedIndexOperationsHelper.java |  10 +-
 .../file/SecondaryRTreeOperationsHelper.java    |   9 +-
 .../app/bootstrap/TestNodeController.java       |   7 +-
 .../common/dataflow/AsterixLSMIndexUtil.java    |   6 +
 ...rtedIndexInsertDeleteOperatorDescriptor.java |   8 +-
 ...ixLSMTreeInsertDeleteOperatorDescriptor.java |   7 +-
 .../AbstractLSMIOOperationCallback.java         |  15 +-
 .../LSMBTreeIOOperationCallback.java            |   6 +-
 .../LSMBTreeWithBuddyIOOperationCallback.java   |   6 +-
 .../LSMInvertedIndexIOOperationCallback.java    |   6 +-
 .../LSMRTreeIOOperationCallback.java            |   6 +-
 .../ExternalBTreeSearchOperatorDescriptor.java  |   6 +-
 .../ExternalFilesIndexOperatorDescriptor.java   |   7 +-
 ...ternalIndexBulkModifyOperatorDescriptor.java |   6 +-
 .../ExternalLookupOperatorDescriptor.java       |   6 +-
 .../ExternalRTreeSearchOperatorDescriptor.java  |   6 +-
 .../operators/IndexInfoOperatorDescriptor.java  |   6 +-
 .../metadata/bootstrap/MetadataBootstrap.java   |   5 +-
 .../metadata/declared/MetadataProvider.java     |  50 ++-
 .../management/ReplicationChannel.java          |   6 +-
 .../management/ReplicationManager.java          |   6 +-
 .../storage/LSMIndexFileProperties.java         |   4 +-
 ...SMInvertedIndexUpsertOperatorDescriptor.java |   5 +-
 .../AsterixLSMTreeUpsertOperatorDescriptor.java |   6 +-
 .../ExternalBTreeLocalResourceMetadata.java     |   4 +-
 ...rnalBTreeWithBuddyLocalResourceMetadata.java |   3 +-
 .../ExternalRTreeLocalResourceMetadata.java     |   3 +-
 .../resource/LSMBTreeLocalResourceMetadata.java |   4 +-
 .../LSMInvertedIndexLocalResourceMetadata.java  |   7 +-
 .../resource/LSMRTreeLocalResourceMetadata.java |   4 +-
 .../btree/client/InsertPipelineExample.java     |   7 +-
 .../client/PrimaryIndexBulkLoadExample.java     |   4 +-
 .../btree/client/PrimaryIndexSearchExample.java |   3 +-
 .../client/SecondaryIndexBulkLoadExample.java   |   6 +-
 .../client/SecondaryIndexSearchExample.java     |   6 +-
 .../am/btree/AbstractBTreeOperatorTest.java     |  22 +-
 .../BTreePrimaryIndexScanOperatorTest.java      |   3 +-
 .../BTreePrimaryIndexSearchOperatorTest.java    |   3 +-
 .../BTreePrimaryIndexStatsOperatorTest.java     |   3 +-
 .../BTreeSecondaryIndexInsertOperatorTest.java  |   6 +-
 .../BTreeSecondaryIndexSearchOperatorTest.java  |   6 +-
 .../BTreeSecondaryIndexUpsertOperatorTest.java  |   6 +-
 .../am/rtree/AbstractRTreeOperatorTest.java     |  22 +-
 .../RTreeSecondaryIndexInsertOperatorTest.java  |   5 +-
 .../RTreeSecondaryIndexScanOperatorTest.java    |   2 +-
 .../RTreeSecondaryIndexSearchOperatorTest.java  |   5 +-
 .../RTreeSecondaryIndexStatsOperatorTest.java   |   2 +-
 .../am/bloomfilter/impls/BloomFilter.java       |   1 -
 .../am/btree/dataflow/BTreeDataflowHelper.java  |   7 +-
 .../dataflow/BTreeSearchOperatorDescriptor.java |   5 +-
 .../BTreeUpdateSearchOperatorDescriptor.java    |   7 +-
 .../frames/BTreeFieldPrefixNSMLeafFrame.java    |  31 +-
 .../hyracks/storage/am/btree/impls/BTree.java   |  49 +--
 .../storage/am/btree/impls/BTreeOpContext.java  |  24 +-
 .../storage/am/btree/util/BTreeUtils.java       |  12 +-
 .../hyracks/storage/am/common/api/IIndex.java   |   3 -
 .../am/common/api/IMetaDataPageManager.java     | 179 --------
 .../am/common/api/IMetadataManagerFactory.java  |  25 --
 .../am/common/api/IMetadataPageManager.java     |  73 ++++
 .../common/api/IMetadataPageManagerFactory.java |  27 ++
 .../storage/am/common/api/IPageManager.java     | 161 +++++++
 .../am/common/api/IPageManagerFactory.java      |  28 ++
 .../storage/am/common/api/ITreeIndex.java       |   2 +-
 .../am/common/api/ITreeIndexMetaDataFrame.java  |   8 +-
 .../common/api/IVirtualMetaDataPageManager.java |  25 --
 .../AbstractIndexOperatorDescriptor.java        |  11 +-
 .../AbstractTreeIndexOperatorDescriptor.java    |   7 +-
 .../dataflow/IIndexOperatorDescriptor.java      |  27 +-
 .../am/common/dataflow/IndexDataflowHelper.java |   3 +
 .../dataflow/IndexDropOperatorDescriptor.java   |  10 +-
 .../TreeIndexBulkLoadOperatorDescriptor.java    |   5 +-
 .../TreeIndexCreateOperatorDescriptor.java      |   7 +-
 ...reeIndexDiskOrderScanOperatorDescriptor.java |   9 +-
 ...dexInsertUpdateDeleteOperatorDescriptor.java |   9 +-
 .../TreeIndexStatsOperatorDescriptor.java       |  11 +-
 .../TreeIndexStatsOperatorNodePushable.java     |   5 +-
 .../am/common/frames/LIFOMetaDataFrame.java     |  21 +-
 .../common/frames/LIFOMetaDataFrameFactory.java |   1 -
 .../am/common/frames/TreeIndexNSMFrame.java     |   3 +-
 .../AppendOnlyLinkedMetadataPageManager.java    | 417 ++++++++++++++++++
 ...endOnlyLinkedMetadataPageManagerFactory.java |  34 ++
 .../LinkedListMetadataManagerFactory.java       |  42 --
 .../freepage/LinkedMetaDataPageManager.java     | 429 +++++++------------
 .../LinkedMetadataPageManagerFactory.java       |  34 ++
 .../am/common/impls/AbstractTreeIndex.java      | 156 ++-----
 .../common/util/TreeIndexBufferCacheWarmup.java |   8 +-
 .../storage/am/common/util/TreeIndexStats.java  |   8 +-
 .../am/common/util/TreeIndexStatsGatherer.java  |  10 +-
 .../dataflow/ExternalBTreeDataflowHelper.java   |   4 +-
 .../ExternalBTreeWithBuddyDataflowHelper.java   |   4 +-
 .../btree/dataflow/LSMBTreeDataflowHelper.java  |   3 +-
 .../am/lsm/btree/impls/ExternalBTree.java       |   6 +-
 .../lsm/btree/impls/ExternalBTreeWithBuddy.java |  25 +-
 .../storage/am/lsm/btree/impls/LSMBTree.java    |  79 ++--
 .../lsm/btree/impls/LSMBTreeDiskComponent.java  |   4 +-
 .../am/lsm/btree/util/LSMBTreeUtils.java        |  43 +-
 .../LSMTreeIndexCompactOperatorDescriptor.java  |  10 +-
 ...dexInsertUpdateDeleteOperatorDescriptor.java |   5 +-
 .../common/freepage/VirtualFreePageManager.java | 142 ++++++
 .../freepage/VirtualFreePageManagerFactory.java |  31 ++
 .../freepage/VirtualMetaDataPageManager.java    | 200 ---------
 .../am/lsm/common/impls/AbstractLSMIndex.java   |   2 +-
 .../impls/AbstractLSMIndexFileManager.java      |   5 +-
 .../am/lsm/common/impls/BTreeFactory.java       |  13 +-
 .../am/lsm/common/impls/IndexFactory.java       |   6 +-
 .../common/impls/LSMComponentFilterManager.java |  53 +--
 .../am/lsm/common/impls/TreeIndexFactory.java   |   4 +-
 .../am/lsm/common/impls/VirtualBufferCache.java |   8 +-
 ...tractLSMInvertedIndexOperatorDescriptor.java |   7 +-
 ...InvertedIndexBulkLoadOperatorDescriptor.java |   5 +-
 .../LSMInvertedIndexCompactOperator.java        |   8 +-
 ...SMInvertedIndexCreateOperatorDescriptor.java |   8 +-
 .../LSMInvertedIndexDataflowHelper.java         |   4 +-
 ...InvertedIndexInsertUpdateDeleteOperator.java |   9 +-
 ...SMInvertedIndexSearchOperatorDescriptor.java |   6 +-
 ...rtitionedLSMInvertedIndexDataflowHelper.java |   2 +-
 .../invertedindex/impls/LSMInvertedIndex.java   |  55 +--
 .../impls/PartitionedLSMInvertedIndex.java      |   4 +-
 .../inmemory/InMemoryInvertedIndex.java         |  17 +-
 .../PartitionedInMemoryInvertedIndex.java       |  10 +-
 .../ondisk/OnDiskInvertedIndex.java             |  69 ++-
 .../ondisk/OnDiskInvertedIndexFactory.java      |   9 +-
 .../ondisk/PartitionedOnDiskInvertedIndex.java  |   7 +-
 .../PartitionedOnDiskInvertedIndexFactory.java  |  10 +-
 .../invertedindex/util/InvertedIndexUtils.java  |  42 +-
 .../dataflow/ExternalRTreeDataflowHelper.java   |   3 +-
 .../rtree/dataflow/LSMRTreeDataflowHelper.java  |   4 +-
 ...RTreeWithAntiMatterTuplesDataflowHelper.java |  11 +-
 .../am/lsm/rtree/impls/AbstractLSMRTree.java    |  23 +-
 .../am/lsm/rtree/impls/ExternalRTree.java       |   8 +-
 .../storage/am/lsm/rtree/impls/LSMRTree.java    |  21 +-
 .../impls/LSMRTreeWithAntiMatterTuples.java     |  15 +-
 .../am/lsm/rtree/impls/RTreeFactory.java        |  13 +-
 .../am/lsm/rtree/utils/LSMRTreeUtils.java       |  37 +-
 .../am/rtree/dataflow/RTreeDataflowHelper.java  |   2 +-
 .../dataflow/RTreeSearchOperatorDescriptor.java |   6 +-
 .../hyracks/storage/am/rtree/impls/RTree.java   |  48 +--
 .../storage/am/rtree/impls/RTreeOpContext.java  |  17 +-
 .../storage/am/rtree/util/RTreeUtils.java       |  13 +-
 .../storage/common/buffercache/BufferCache.java |   4 +-
 .../storage/common/buffercache/CachedPage.java  |   8 +-
 .../TestStorageManagerComponentHolder.java      |  12 +-
 .../storage/am/btree/BTreeBulkLoadTest.java     |   8 +-
 .../storage/am/btree/BTreeDeleteTest.java       |   8 +-
 .../storage/am/btree/BTreeExamplesTest.java     |  14 +-
 .../storage/am/btree/BTreeInsertTest.java       |   8 +-
 .../storage/am/btree/BTreeLifecycleTest.java    |   3 +-
 .../BTreeModificationOperationCallbackTest.java |  12 +-
 .../storage/am/btree/BTreeSearchCursorTest.java |   8 +-
 .../btree/BTreeSearchOperationCallbackTest.java |   8 +-
 .../storage/am/btree/BTreeSortedInsertTest.java |   8 +-
 .../storage/am/btree/BTreeStatsTest.java        |   4 +-
 .../storage/am/btree/BTreeUpdateSearchTest.java |   4 +-
 .../storage/am/btree/BTreeUpdateTest.java       |   8 +-
 .../storage/am/btree/BTreeUpsertTest.java       |   8 +-
 .../btree/multithread/BTreeMultiThreadTest.java |   5 +-
 .../storage/am/btree/util/BTreeTestContext.java |   7 +-
 .../storage/am/btree/util/BTreeTestHarness.java |   9 +
 .../am/lsm/btree/LSMBTreeBulkLoadTest.java      |   2 +-
 .../am/lsm/btree/LSMBTreeDeleteTest.java        |   2 +-
 .../am/lsm/btree/LSMBTreeExamplesTest.java      |  11 +-
 .../am/lsm/btree/LSMBTreeInsertTest.java        |   8 +-
 .../am/lsm/btree/LSMBTreeLifecycleTest.java     |   2 +-
 .../storage/am/lsm/btree/LSMBTreeMergeTest.java |   2 +-
 ...MBTreeModificationOperationCallbackTest.java |   3 +-
 .../am/lsm/btree/LSMBTreeMultiBulkLoadTest.java |   2 +-
 .../LSMBTreeSearchOperationCallbackTest.java    |   5 +-
 .../am/lsm/btree/LSMBTreeUpdateTest.java        |   8 +-
 .../multithread/LSMBTreeMultiThreadTest.java    |   7 +-
 .../storage/am/lsm/btree/perf/BTreeRunner.java  |   9 +-
 .../am/lsm/btree/perf/InMemoryBTreeRunner.java  |   6 +-
 .../am/lsm/btree/perf/LSMTreeRunner.java        |   5 +-
 .../am/lsm/btree/util/LSMBTreeTestContext.java  |  14 +-
 .../am/lsm/btree/util/LSMBTreeTestHarness.java  |   8 +
 .../lsm/common/VirtualFreePageManagerTest.java  |  31 +-
 .../common/AbstractInvertedIndexLoadTest.java   |   9 +-
 .../common/LSMInvertedIndexTestHarness.java     |   8 +
 .../OnDiskInvertedIndexLifecycleTest.java       |   2 +-
 .../util/LSMInvertedIndexTestContext.java       |  19 +-
 .../util/LSMInvertedIndexTestUtils.java         |   8 +-
 .../am/lsm/rtree/LSMRTreeBulkLoadTest.java      |   3 +-
 .../am/lsm/rtree/LSMRTreeDeleteTest.java        |   3 +-
 .../am/lsm/rtree/LSMRTreeExamplesTest.java      |   3 +-
 .../am/lsm/rtree/LSMRTreeInsertTest.java        |   3 +-
 .../am/lsm/rtree/LSMRTreeLifecycleTest.java     |   3 +-
 .../storage/am/lsm/rtree/LSMRTreeMergeTest.java |   8 +-
 ...SMRTreeWithAntiMatterTuplesBulkLoadTest.java |   3 +-
 .../LSMRTreeWithAntiMatterTuplesDeleteTest.java |   3 +-
 ...SMRTreeWithAntiMatterTuplesExamplesTest.java |   3 +-
 .../LSMRTreeWithAntiMatterTuplesInsertTest.java |   3 +-
 ...MRTreeWithAntiMatterTuplesLifecycleTest.java |   8 +-
 .../LSMRTreeWithAntiMatterTuplesMergeTest.java  |   3 +-
 .../multithread/LSMRTreeMultiThreadTest.java    |   6 +-
 ...TreeWithAntiMatterTuplesMultiThreadTest.java |   3 +-
 .../am/lsm/rtree/util/LSMRTreeTestContext.java  |  10 +-
 .../am/lsm/rtree/util/LSMRTreeTestHarness.java  |   8 +
 ...LSMRTreeWithAntiMatterTuplesTestContext.java |   6 +-
 .../storage/am/rtree/RTreeBulkLoadTest.java     |   3 +-
 .../storage/am/rtree/RTreeDeleteTest.java       |   3 +-
 .../storage/am/rtree/RTreeExamplesTest.java     |   3 +-
 .../storage/am/rtree/RTreeInsertTest.java       |   3 +-
 .../storage/am/rtree/RTreeLifecycleTest.java    |   3 +-
 .../storage/am/rtree/RTreeSearchCursorTest.java |   4 +-
 .../rtree/multithread/RTreeMultiThreadTest.java |   3 +-
 .../am/rtree/utils/RTreeTestContext.java        |   6 +-
 .../am/rtree/utils/RTreeTestHarness.java        |  16 +-
 .../common/BufferCacheRegressionTest.java       |  12 +-
 .../hyracks/storage/common/BufferCacheTest.java |  21 +-
 214 files changed, 2182 insertions(+), 1759 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
index 4a00ce1..0d8c940 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
@@ -24,6 +24,7 @@ import java.util.Map;
 
 import org.apache.asterix.common.config.AsterixStorageProperties;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.dataflow.IAsterixApplicationContextInfo;
 import org.apache.asterix.common.ioopcallbacks.LSMInvertedIndexIOOperationCallbackFactory;
 import org.apache.asterix.metadata.MetadataException;
@@ -210,7 +211,7 @@ public class InvertedIndexPOperator extends IndexSearchPOperator {
             IVariableTypeEnvironment typeEnv = context.getTypeEnvironment(unnestMap);
             List<LogicalVariable> outputVars = unnestMap.getVariables();
             if (retainInput) {
-                outputVars = new ArrayList<LogicalVariable>();
+                outputVars = new ArrayList<>();
                 VariableUtilities.getLiveVariables(unnestMap, outputVars);
             }
             RecordDescriptor outputRecDesc = JobGenHelper.mkRecordDescriptor(typeEnv, opSchema, context);
@@ -286,10 +287,9 @@ public class InvertedIndexPOperator extends IndexSearchPOperator {
                     appContext.getIndexLifecycleManagerProvider(), tokenTypeTraits, tokenComparatorFactories,
                     invListsTypeTraits, invListsComparatorFactories, dataflowHelperFactory, queryTokenizerFactory,
                     searchModifierFactory, outputRecDesc, retainInput, retainMissing, context.getMissingWriterFactory(),
-                    NoOpOperationCallbackFactory.INSTANCE, minFilterFieldIndexes, maxFilterFieldIndexes);
-
-            return new Pair<IOperatorDescriptor, AlgebricksPartitionConstraint>(invIndexSearchOp,
-                    secondarySplitsAndConstraint.second);
+                    NoOpOperationCallbackFactory.INSTANCE, minFilterFieldIndexes, maxFilterFieldIndexes,
+                    AsterixLSMIndexUtil.getMetadataPageManagerFactory());
+            return new Pair<>(invIndexSearchOp, secondarySplitsAndConstraint.second);
         } catch (MetadataException e) {
             throw new AlgebricksException(e);
         }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
index 7f0f0d0..2b0f60c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
@@ -33,6 +33,7 @@ import org.apache.asterix.common.config.DatasetConfig.ExternalFilePendingOp;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
@@ -239,7 +240,7 @@ public class ExternalIndexingOperations {
         ExternalFilesIndexOperatorDescriptor externalFilesOp = new ExternalFilesIndexOperatorDescriptor(spec,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 secondaryFileSplitProvider, indexDataflowHelperFactory, localResourceFactoryProvider,
-                externalFilesSnapshot, createIndex);
+                externalFilesSnapshot, createIndex, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, externalFilesOp,
                 secondarySplitsAndConstraint.second);
         spec.addRoot(externalFilesOp);
@@ -421,7 +422,8 @@ public class ExternalIndexingOperations {
                         compactionInfo.first, compactionInfo.second,
                         new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
-                        storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, !temp));
+                        storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, !temp),
+                AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, btreeDrop,
                 splitsAndConstraint.second);
         spec.addRoot(btreeDrop);
@@ -756,7 +758,7 @@ public class ExternalIndexingOperations {
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 secondaryFileSplitProvider, filesIndexDescription.EXTERNAL_FILE_INDEX_TYPE_TRAITS,
                 filesIndexDescription.FILES_INDEX_COMP_FACTORIES, new int[] { 0 }, indexDataflowHelperFactory,
-                NoOpOperationCallbackFactory.INSTANCE);
+                NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         spec.addRoot(compactOp);
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
                 secondarySplitsAndConstraint.second);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
index f970e50..0b55a64 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
@@ -27,6 +27,7 @@ import java.util.logging.Logger;
 import org.apache.asterix.common.config.AsterixStorageProperties;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
@@ -126,7 +127,7 @@ public class DatasetOperations {
                         new PrimaryIndexOperationTrackerProvider(dataset.getDatasetId()),
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
                         storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
-                        btreeFields, filterFields, !temp));
+                        btreeFields, filterFields, !temp), AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(specPrimary, primaryBtreeDrop,
                 splitsAndConstraint.second);
 
@@ -197,7 +198,8 @@ public class DatasetOperations {
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
                         storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
                         btreeFields, filterFields, !temp),
-                localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE);
+                localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil
+                        .getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, indexCreateOp,
                 splitsAndConstraint.second);
         spec.addRoot(indexCreateOp);
@@ -245,7 +247,7 @@ public class DatasetOperations {
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
                         storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
                         btreeFields, filterFields, !temp),
-                NoOpOperationCallbackFactory.INSTANCE);
+                NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
                 splitsAndConstraint.second);
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
index cd774fb..975ae90 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
@@ -24,9 +24,9 @@ import java.util.Map;
 import org.apache.asterix.common.config.AsterixStorageProperties;
 import org.apache.asterix.common.config.OptimizationConfUtil;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
-import org.apache.asterix.runtime.util.AsterixRuntimeComponentsProvider;
 import org.apache.asterix.external.indexing.ExternalFile;
 import org.apache.asterix.metadata.MetadataException;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -34,6 +34,7 @@ import org.apache.asterix.metadata.entities.Dataset;
 import org.apache.asterix.metadata.utils.DatasetUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.asterix.runtime.util.AsterixRuntimeComponentsProvider;
 import org.apache.asterix.transaction.management.opcallbacks.SecondaryIndexOperationTrackerProvider;
 import org.apache.asterix.translator.CompiledStatements.CompiledCreateIndexStatement;
 import org.apache.asterix.translator.CompiledStatements.CompiledIndexCompactStatement;
@@ -115,7 +116,8 @@ public class IndexOperations {
                         compactionInfo.first, compactionInfo.second,
                         new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
-                        storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, !temp));
+                        storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, !temp),
+                AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, btreeDrop,
                 splitsAndConstraint.second);
         spec.addRoot(btreeDrop);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
index 459f20e..358ef78 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
@@ -26,6 +26,7 @@ import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
@@ -123,7 +124,7 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 secondaryFileSplitProvider, secondaryTypeTraits, secondaryComparatorFactories,
                 secondaryBloomFilterKeyFields, indexDataflowHelperFactory, localResourceFactoryProvider,
-                NoOpOperationCallbackFactory.INSTANCE);
+                NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, secondaryIndexCreateOp,
                 secondaryPartitionConstraint);
         spec.addRoot(secondaryIndexCreateOp);
@@ -282,7 +283,7 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
                             LSMBTreeIOOperationCallbackFactory.INSTANCE,
                             storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits,
                             filterCmpFactories, secondaryBTreeFields, secondaryFilterFields, !temp),
-                    NoOpOperationCallbackFactory.INSTANCE);
+                    NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         } else {
             // External dataset
             compactOp = new LSMTreeIndexCompactOperatorDescriptor(spec,
@@ -295,7 +296,7 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
                             LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
                             storageProperties.getBloomFilterFalsePositiveRate(), new int[] { numSecondaryKeys },
                             ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true),
-                    NoOpOperationCallbackFactory.INSTANCE);
+                    NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         }
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
                 secondaryPartitionConstraint);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
index 7decdf7..389ad0c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
@@ -32,10 +32,9 @@ import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
 import org.apache.asterix.common.context.ITransactionSubsystemProvider;
 import org.apache.asterix.common.context.TransactionSubsystemProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
-import org.apache.asterix.metadata.declared.MetadataProvider;
-import org.apache.asterix.runtime.util.AsterixRuntimeComponentsProvider;
 import org.apache.asterix.common.transactions.IRecoveryManager.ResourceType;
 import org.apache.asterix.common.transactions.JobId;
 import org.apache.asterix.external.indexing.ExternalFile;
@@ -47,6 +46,7 @@ import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.formats.nontagged.TypeTraitProvider;
 import org.apache.asterix.metadata.MetadataException;
+import org.apache.asterix.metadata.declared.MetadataProvider;
 import org.apache.asterix.metadata.entities.Dataset;
 import org.apache.asterix.metadata.entities.InternalDatasetDetails;
 import org.apache.asterix.metadata.utils.DatasetUtils;
@@ -58,6 +58,7 @@ import org.apache.asterix.runtime.evaluators.functions.IsUnknownDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NotDescriptor;
 import org.apache.asterix.runtime.job.listener.JobEventListenerFactory;
 import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.asterix.runtime.util.AsterixRuntimeComponentsProvider;
 import org.apache.asterix.transaction.management.opcallbacks.PrimaryIndexInstantSearchOperationCallbackFactory;
 import org.apache.asterix.transaction.management.opcallbacks.PrimaryIndexOperationTrackerProvider;
 import org.apache.asterix.transaction.management.service.transaction.JobIdFactory;
@@ -359,7 +360,8 @@ public abstract class SecondaryIndexOperationsHelper {
                         AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
                         storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
                         primaryBTreeFields, primaryFilterFields, !temp),
-                false, false, null, searchCallbackFactory, null, null);
+                false, false, null, searchCallbackFactory, null, null, AsterixLSMIndexUtil
+                        .getMetadataPageManagerFactory());
 
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, primarySearchOp,
                 primaryPartitionConstraint);
@@ -448,7 +450,8 @@ public abstract class SecondaryIndexOperationsHelper {
                 secondaryRecDesc, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, secondaryFileSplitProvider,
                 secondaryRecDesc.getTypeTraits(), secondaryComparatorFactories, secondaryBloomFilterKeyFields,
-                fieldPermutation, fillFactor, false, numElementsHint, false, dataflowHelperFactory);
+                fieldPermutation, fillFactor, false, numElementsHint, false, dataflowHelperFactory, AsterixLSMIndexUtil
+                        .getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, treeIndexBulkLoadOp,
                 secondaryPartitionConstraint);
         return treeIndexBulkLoadOp;
@@ -564,7 +567,8 @@ public abstract class SecondaryIndexOperationsHelper {
                 spec, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, secondaryFileSplitProvider, secondaryTypeTraits,
                 secondaryComparatorFactories, secondaryBloomFilterKeyFields, dataflowHelperFactory,
-                NoOpOperationCallbackFactory.INSTANCE, deletedFiles, fieldPermutation, fillFactor, numElementsHint);
+                NoOpOperationCallbackFactory.INSTANCE, deletedFiles, fieldPermutation, fillFactor, numElementsHint,
+                AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, treeIndexBulkLoadOp,
                 secondaryPartitionConstraint);
         return treeIndexBulkLoadOp;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryInvertedIndexOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryInvertedIndexOperationsHelper.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryInvertedIndexOperationsHelper.java
index cacf44e..dc31515 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryInvertedIndexOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryInvertedIndexOperationsHelper.java
@@ -24,6 +24,7 @@ import org.apache.asterix.common.config.AsterixStorageProperties;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMInvertedIndexIOOperationCallbackFactory;
 import org.apache.asterix.common.transactions.IResourceFactory;
@@ -230,7 +231,8 @@ public class SecondaryInvertedIndexOperationsHelper extends SecondaryIndexOperat
                 new LSMInvertedIndexCreateOperatorDescriptor(spec, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                         secondaryFileSplitProvider, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, tokenTypeTraits,
                         tokenComparatorFactories, invListsTypeTraits, primaryComparatorFactories, tokenizerFactory,
-                        dataflowHelperFactory, localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE);
+                        dataflowHelperFactory, localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE,
+                        AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, invIndexCreateOp,
                 secondaryPartitionConstraint);
         spec.addRoot(invIndexCreateOp);
@@ -329,7 +331,8 @@ public class SecondaryInvertedIndexOperationsHelper extends SecondaryIndexOperat
                 spec, secondaryRecDesc, fieldPermutation, false, numElementsHint, false,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, secondaryFileSplitProvider,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, tokenTypeTraits, tokenComparatorFactories,
-                invListsTypeTraits, primaryComparatorFactories, tokenizerFactory, dataflowHelperFactory);
+                invListsTypeTraits, primaryComparatorFactories, tokenizerFactory, dataflowHelperFactory,
+                AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, invIndexBulkLoadOp,
                 secondaryPartitionConstraint);
         return invIndexBulkLoadOp;
@@ -368,7 +371,8 @@ public class SecondaryInvertedIndexOperationsHelper extends SecondaryIndexOperat
                 new LSMInvertedIndexCompactOperator(spec, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                         secondaryFileSplitProvider, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, tokenTypeTraits,
                         tokenComparatorFactories, invListsTypeTraits, primaryComparatorFactories, tokenizerFactory,
-                        dataflowHelperFactory, NoOpOperationCallbackFactory.INSTANCE);
+                        dataflowHelperFactory, NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil
+                                .getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
                 secondaryPartitionConstraint);
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
index 53c48f1..7051810 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
@@ -27,6 +27,7 @@ import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMRTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.transactions.IResourceFactory;
@@ -146,8 +147,8 @@ public class SecondaryRTreeOperationsHelper extends SecondaryIndexOperationsHelp
         TreeIndexCreateOperatorDescriptor secondaryIndexCreateOp = new TreeIndexCreateOperatorDescriptor(spec,
                 AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 secondaryFileSplitProvider, secondaryTypeTraits, secondaryComparatorFactories, null,
-                indexDataflowHelperFactory, localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE);
-
+                indexDataflowHelperFactory, localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE,
+                AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, secondaryIndexCreateOp,
                 secondaryPartitionConstraint);
         spec.addRoot(secondaryIndexCreateOp);
@@ -484,7 +485,7 @@ public class SecondaryRTreeOperationsHelper extends SecondaryIndexOperationsHelp
                     new LSMTreeIndexCompactOperatorDescriptor(spec, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                             AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, secondaryFileSplitProvider,
                             secondaryTypeTraits, secondaryComparatorFactories, secondaryBloomFilterKeyFields, idff,
-                            NoOpOperationCallbackFactory.INSTANCE);
+                            NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         } else {
             // External dataset
             compactOp =
@@ -500,7 +501,7 @@ public class SecondaryRTreeOperationsHelper extends SecondaryIndexOperationsHelp
                                     storageProperties.getBloomFilterFalsePositiveRate(),
                                     new int[] { numNestedSecondaryKeyFields },
                                     ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true, isPointMBR),
-                            NoOpOperationCallbackFactory.INSTANCE);
+                            NoOpOperationCallbackFactory.INSTANCE, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         }
 
         AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/bootstrap/TestNodeController.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/bootstrap/TestNodeController.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/bootstrap/TestNodeController.java
index 0901463..926968d 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/bootstrap/TestNodeController.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/bootstrap/TestNodeController.java
@@ -29,6 +29,7 @@ import org.apache.asterix.common.config.AsterixTransactionProperties;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
 import org.apache.asterix.common.context.DatasetLifecycleManager;
 import org.apache.asterix.common.context.TransactionSubsystemProvider;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.dataflow.AsterixLSMInsertDeleteOperatorNodePushable;
 import org.apache.asterix.common.dataflow.AsterixLSMTreeInsertDeleteOperatorDescriptor;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
@@ -196,7 +197,7 @@ public class TestNodeController {
                 primaryIndexInfo.primaryIndexComparatorFactories, primaryIndexInfo.primaryIndexBloomFilterKeyFields,
                 primaryIndexInfo.primaryKeyIndexes, primaryIndexInfo.primaryKeyIndexes, true, true,
                 indexDataflowHelperFactory, false, false, null, NoOpOperationCallbackFactory.INSTANCE, filterFields,
-                filterFields);
+                filterFields, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
         BTreeSearchOperatorNodePushable searchOp = new BTreeSearchOperatorNodePushable(searchOpDesc, ctx, 0,
                 primaryIndexInfo.getSearchRecordDescriptorProvider(), /*primaryIndexInfo.primaryKeyIndexes*/null,
                 /*primaryIndexInfo.primaryKeyIndexes*/null, true, true, filterFields, filterFields);
@@ -231,6 +232,8 @@ public class TestNodeController {
         Mockito.when(indexOpDesc.getTreeIndexBloomFilterKeyFields())
                 .thenReturn(primaryIndexInfo.primaryIndexBloomFilterKeyFields);
         Mockito.when(indexOpDesc.getModificationOpCallbackFactory()).thenReturn(modOpCallbackFactory);
+        Mockito.when(indexOpDesc.getPageManagerFactory()).thenReturn(AsterixLSMIndexUtil
+                .getMetadataPageManagerFactory());
         return indexOpDesc;
     }
 
@@ -247,6 +250,8 @@ public class TestNodeController {
                 .thenReturn(primaryIndexInfo.primaryIndexComparatorFactories);
         Mockito.when(indexOpDesc.getTreeIndexBloomFilterKeyFields())
                 .thenReturn(primaryIndexInfo.primaryIndexBloomFilterKeyFields);
+        Mockito.when(indexOpDesc.getPageManagerFactory()).thenReturn(AsterixLSMIndexUtil
+                .getMetadataPageManagerFactory());
         return indexOpDesc;
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMIndexUtil.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMIndexUtil.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMIndexUtil.java
index c7b7e3e..45362ef 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMIndexUtil.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMIndexUtil.java
@@ -21,6 +21,8 @@ package org.apache.asterix.common.dataflow;
 import org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback;
 import org.apache.asterix.common.transactions.ILogManager;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
+import org.apache.hyracks.storage.am.common.freepage.AppendOnlyLinkedMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
 import org.apache.hyracks.storage.am.lsm.common.impls.AbstractLSMIndex;
 
@@ -47,4 +49,8 @@ public class AsterixLSMIndexUtil {
                 .getIOOperationCallback();
         return ioOpCallback.getComponentFileLSNOffset(lsmComponent, componentFilePath);
     }
+
+    public static IMetadataPageManagerFactory getMetadataPageManagerFactory() {
+        return new AppendOnlyLinkedMetadataPageManagerFactory();
+    }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor.java
index 6255172..e7802b9 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor.java
@@ -28,6 +28,7 @@ import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.api.ITupleFilterFactory;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
@@ -48,10 +49,13 @@ public class AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor extends LSMIn
             IBinaryComparatorFactory[] tokenComparatorFactories, ITypeTraits[] invListsTypeTraits,
             IBinaryComparatorFactory[] invListComparatorFactories, IBinaryTokenizerFactory tokenizerFactory,
             int[] fieldPermutation, IndexOperation op, IIndexDataflowHelperFactory dataflowHelperFactory,
-            ITupleFilterFactory tupleFilterFactory, IModificationOperationCallbackFactory modificationOpCallbackFactory, String indexName) {
+            ITupleFilterFactory tupleFilterFactory,
+            IModificationOperationCallbackFactory modificationOpCallbackFactory, String indexName,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, recDesc, storageManager, fileSplitProvider, lifecycleManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListComparatorFactories, tokenizerFactory,
-                fieldPermutation, op, dataflowHelperFactory, tupleFilterFactory, modificationOpCallbackFactory);
+                fieldPermutation, op, dataflowHelperFactory, tupleFilterFactory, modificationOpCallbackFactory,
+                metadataPageManagerFactory);
         this.indexName = indexName;
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
index d78abb6..177a943 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
@@ -29,6 +29,7 @@ import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.api.ITupleFilterFactory;
@@ -54,10 +55,12 @@ public class AsterixLSMTreeInsertDeleteOperatorDescriptor extends LSMTreeIndexIn
             ITupleFilterFactory tupleFilterFactory, boolean isPrimary, String indexName,
             IMissingWriterFactory nullWriterFactory,
             IModificationOperationCallbackFactory modificationOpCallbackProvider,
-            ISearchOperationCallbackFactory searchOpCallbackProvider) {
+            ISearchOperationCallbackFactory searchOpCallbackProvider,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, fieldPermutation, op, dataflowHelperFactory,
-                tupleFilterFactory, nullWriterFactory, modificationOpCallbackProvider, searchOpCallbackProvider);
+                tupleFilterFactory, nullWriterFactory, modificationOpCallbackProvider, searchOpCallbackProvider,
+                metadataPageManagerFactory);
         this.isPrimary = isPrimary;
         this.indexName = indexName;
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
index 64201e2..ad4d9e1 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
@@ -22,7 +22,7 @@ package org.apache.asterix.common.ioopcallbacks;
 import java.util.List;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.storage.am.common.api.IMetaDataPageManager;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManager;
 import org.apache.hyracks.storage.am.common.api.ITreeIndex;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallback;
@@ -78,7 +78,8 @@ public abstract class AbstractLSMIOOperationCallback implements ILSMIOOperationC
         if (opType == LSMOperationType.FLUSH && newComponent != null) {
             synchronized (this) {
                 flushRequested[readIndex] = false;
-                // if the component which just finished flushing is the component that will be modified next, we set its first LSN to its previous LSN
+                // if the component which just finished flushing is the component that will be modified next,
+                // we set its first LSN to its previous LSN
                 if (readIndex == writeIndex) {
                     firstLSNs[writeIndex] = mutableLastLSNs[writeIndex];
                 }
@@ -92,11 +93,11 @@ public abstract class AbstractLSMIOOperationCallback implements ILSMIOOperationC
     protected void putLSNIntoMetadata(ITreeIndex treeIndex, List<ILSMComponent> oldComponents)
             throws HyracksDataException {
         long componentLSN = getComponentLSN(oldComponents);
-        treeIndex.getMetaManager().setLSN(componentLSN);
+        ((IMetadataPageManager) treeIndex.getPageManager()).setLSN(componentLSN);
     }
 
     public static long getTreeIndexLSN(ITreeIndex treeIndex) throws HyracksDataException {
-        return treeIndex.getMetaManager().getLSN();
+        return ((IMetadataPageManager) treeIndex.getPageManager()).getLSN();
     }
 
     public void updateLastLSN(long lastLSN) {
@@ -110,7 +111,8 @@ public abstract class AbstractLSMIOOperationCallback implements ILSMIOOperationC
 
     public synchronized long getFirstLSN() {
         // We make sure that this method is only called on a non-empty component so the returned LSN is meaningful
-        // The firstLSN is always the lsn of the currently being flushed component or the next to be flushed when no flush operation is on going
+        // The firstLSN is always the lsn of the currently being flushed component or the next
+        // to be flushed when no flush operation is on going
         return firstLSNs[readIndex];
     }
 
@@ -127,7 +129,8 @@ public abstract class AbstractLSMIOOperationCallback implements ILSMIOOperationC
     /**
      * @param component
      * @param componentFilePath
-     * @return The LSN byte offset in the LSM disk component if the index is valid, otherwise {@link IMetaDataPageManager#INVALID_LSN_OFFSET}.
+     * @return The LSN byte offset in the LSM disk component if the index is valid,
+     *         otherwise {@link IMetadataPageManager#INVALID_LSN_OFFSET}.
      * @throws HyracksDataException
      */
     public abstract long getComponentFileLSNOffset(ILSMComponent component, String componentFilePath)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeIOOperationCallback.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeIOOperationCallback.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeIOOperationCallback.java
index b522687..f0296ea 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeIOOperationCallback.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeIOOperationCallback.java
@@ -23,7 +23,7 @@ import java.util.List;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.storage.am.btree.impls.BTree;
-import org.apache.hyracks.storage.am.common.api.IMetaDataPageManager;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManager;
 import org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeDiskComponent;
 import org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeFileManager;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
@@ -68,8 +68,8 @@ public class LSMBTreeIOOperationCallback extends AbstractLSMIOOperationCallback
             throws HyracksDataException {
         if (diskComponentFilePath.endsWith(LSMBTreeFileManager.BTREE_STRING)) {
             LSMBTreeDiskComponent btreeComponent = (LSMBTreeDiskComponent) diskComponent;
-            return btreeComponent.getBTree().getMetaManager().getLSNOffset();
+            return ((IMetadataPageManager) btreeComponent.getBTree().getPageManager()).getLSNOffset();
         }
-        return IMetaDataPageManager.INVALID_LSN_OFFSET;
+        return IMetadataPageManager.Constants.INVALID_LSN_OFFSET;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeWithBuddyIOOperationCallback.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeWithBuddyIOOperationCallback.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeWithBuddyIOOperationCallback.java
index 1d0c0a5..2b384fa 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeWithBuddyIOOperationCallback.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMBTreeWithBuddyIOOperationCallback.java
@@ -21,7 +21,7 @@ package org.apache.asterix.common.ioopcallbacks;
 import java.util.List;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.storage.am.common.api.IMetaDataPageManager;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManager;
 import org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeWithBuddyDiskComponent;
 import org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeWithBuddyFileManager;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
@@ -61,8 +61,8 @@ public class LSMBTreeWithBuddyIOOperationCallback extends AbstractLSMIOOperation
             throws HyracksDataException {
         if (diskComponentFilePath.endsWith(LSMBTreeWithBuddyFileManager.BTREE_STRING)) {
             LSMBTreeWithBuddyDiskComponent btreeComponent = (LSMBTreeWithBuddyDiskComponent) diskComponent;
-            return btreeComponent.getBTree().getMetaManager().getLSNOffset();
+            return ((IMetadataPageManager) btreeComponent.getBTree().getPageManager()).getLSNOffset();
         }
-        return IMetaDataPageManager.INVALID_LSN_OFFSET;
+        return IMetadataPageManager.Constants.INVALID_LSN_OFFSET;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMInvertedIndexIOOperationCallback.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMInvertedIndexIOOperationCallback.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMInvertedIndexIOOperationCallback.java
index faa9166..3be31d6 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMInvertedIndexIOOperationCallback.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMInvertedIndexIOOperationCallback.java
@@ -22,7 +22,7 @@ package org.apache.asterix.common.ioopcallbacks;
 import java.util.List;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.storage.am.common.api.IMetaDataPageManager;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManager;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.LSMOperationType;
 import org.apache.hyracks.storage.am.lsm.invertedindex.impls.LSMInvertedIndexDiskComponent;
@@ -66,8 +66,8 @@ public class LSMInvertedIndexIOOperationCallback extends AbstractLSMIOOperationC
             throws HyracksDataException {
         if (diskComponentFilePath.endsWith(LSMInvertedIndexFileManager.DELETED_KEYS_BTREE_SUFFIX)) {
             LSMInvertedIndexDiskComponent invIndexComponent = (LSMInvertedIndexDiskComponent) diskComponent;
-            return invIndexComponent.getDeletedKeysBTree().getMetaManager().getLSNOffset();
+            return ((IMetadataPageManager) invIndexComponent.getDeletedKeysBTree().getPageManager()).getLSNOffset();
         }
-        return IMetaDataPageManager.INVALID_LSN_OFFSET;
+        return IMetadataPageManager.Constants.INVALID_LSN_OFFSET;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMRTreeIOOperationCallback.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMRTreeIOOperationCallback.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMRTreeIOOperationCallback.java
index 4725d7a..7b04b74 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMRTreeIOOperationCallback.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMRTreeIOOperationCallback.java
@@ -22,7 +22,7 @@ package org.apache.asterix.common.ioopcallbacks;
 import java.util.List;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.storage.am.common.api.IMetaDataPageManager;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManager;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.LSMOperationType;
 import org.apache.hyracks.storage.am.lsm.rtree.impls.LSMRTreeDiskComponent;
@@ -66,8 +66,8 @@ public class LSMRTreeIOOperationCallback extends AbstractLSMIOOperationCallback
             throws HyracksDataException {
         if (diskComponentFilePath.endsWith(LSMRTreeFileManager.RTREE_STRING)) {
             LSMRTreeDiskComponent rtreeComponent = (LSMRTreeDiskComponent) diskComponent;
-            return rtreeComponent.getRTree().getMetaManager().getLSNOffset();
+            return ((IMetadataPageManager) rtreeComponent.getRTree().getPageManager()).getLSNOffset();
         }
-        return IMetaDataPageManager.INVALID_LSN_OFFSET;
+        return IMetadataPageManager.Constants.INVALID_LSN_OFFSET;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
index 8202316..5f4e159 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
@@ -30,6 +30,7 @@ import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.btree.dataflow.BTreeSearchOperatorDescriptor;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
 import org.apache.hyracks.storage.common.IStorageManagerInterface;
@@ -44,11 +45,12 @@ public class ExternalBTreeSearchOperatorDescriptor extends BTreeSearchOperatorDe
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] lowKeyFields,
             int[] highKeyFields, boolean lowKeyInclusive, boolean highKeyInclusive,
             IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
-            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider) {
+            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, lowKeyFields, highKeyFields, lowKeyInclusive,
                 highKeyInclusive, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
-                searchOpCallbackProvider, null, null);
+                searchOpCallbackProvider, null, null, metadataPageManagerFactory);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
index 0d51956..02aa715 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
@@ -39,6 +39,7 @@ import org.apache.hyracks.storage.am.common.api.IIndex;
 import org.apache.hyracks.storage.am.common.api.IIndexBulkLoader;
 import org.apache.hyracks.storage.am.common.api.IIndexDataflowHelper;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
@@ -64,12 +65,14 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
     public ExternalFilesIndexOperatorDescriptor(IOperatorDescriptorRegistry spec,
             IStorageManagerInterface storageManager, IIndexLifecycleManagerProvider lifecycleManagerProvider,
             IFileSplitProvider fileSplitProvider, IIndexDataflowHelperFactory dataflowHelperFactory,
-            ILocalResourceFactoryProvider localResourceFactoryProvider, List<ExternalFile> files, boolean createNewIndex) {
+            ILocalResourceFactoryProvider localResourceFactoryProvider, List<ExternalFile> files,
+            boolean createNewIndex, IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, 0, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider,
                 new FilesIndexDescription().EXTERNAL_FILE_INDEX_TYPE_TRAITS,
                 new FilesIndexDescription().FILES_INDEX_COMP_FACTORIES, FilesIndexDescription.BLOOM_FILTER_FIELDS,
                 dataflowHelperFactory, null, false, false, null, localResourceFactoryProvider,
-                NoOpOperationCallbackFactory.INSTANCE, NoOpOperationCallbackFactory.INSTANCE);
+                NoOpOperationCallbackFactory.INSTANCE, NoOpOperationCallbackFactory.INSTANCE,
+                metadataPageManagerFactory);
         this.createNewIndex = createNewIndex;
         this.files = files;
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorDescriptor.java
index 1476c14..59352a0 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorDescriptor.java
@@ -27,6 +27,7 @@ import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
@@ -48,11 +49,12 @@ public class ExternalIndexBulkModifyOperatorDescriptor extends AbstractTreeIndex
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields,
             IIndexDataflowHelperFactory dataflowHelperFactory,
             IModificationOperationCallbackFactory modificationOpCallbackFactory, int[] deletedFiles,
-            int[] fieldPermutation, float fillFactor, long numElementsHint) {
+            int[] fieldPermutation, float fillFactor, long numElementsHint,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, 1, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, dataflowHelperFactory, null, false, false, null,
                 NoOpLocalResourceFactoryProvider.INSTANCE, NoOpOperationCallbackFactory.INSTANCE,
-                modificationOpCallbackFactory);
+                modificationOpCallbackFactory, metadataPageManagerFactory);
         this.deletedFiles = deletedFiles;
         this.fieldPermutation = fieldPermutation;
         this.fillFactor = fillFactor;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
index f4c7644..24e9cbe 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
@@ -34,6 +34,7 @@ import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.base.AbstractUnaryInputUnaryOutputOperatorNodePushable;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeDataflowHelper;
@@ -52,12 +53,13 @@ public class ExternalLookupOperatorDescriptor extends AbstractTreeIndexOperatorD
             boolean propagateInput, IIndexLifecycleManagerProvider lcManagerProvider,
             IStorageManagerInterface storageManager, IFileSplitProvider fileSplitProvider, int datasetId,
             double bloomFilterFalsePositiveRate, ISearchOperationCallbackFactory searchOpCallbackFactory,
-            boolean retainMissing, IMissingWriterFactory missingWriterFactory) {
+            boolean retainMissing, IMissingWriterFactory missingWriterFactory,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, 1, 1, outRecDesc, storageManager, lcManagerProvider, fileSplitProvider,
                 new FilesIndexDescription().EXTERNAL_FILE_INDEX_TYPE_TRAITS,
                 new FilesIndexDescription().FILES_INDEX_COMP_FACTORIES, FilesIndexDescription.BLOOM_FILTER_FIELDS,
                 externalFilesIndexDataFlowHelperFactory, null, propagateInput, retainMissing, missingWriterFactory,
-                null, searchOpCallbackFactory, null);
+                null, searchOpCallbackFactory, null, metadataPageManagerFactory);
         this.adapterFactory = adapterFactory;
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
index c0907ee..1a5eeef 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
@@ -29,6 +29,7 @@ import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
+import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
 import org.apache.hyracks.storage.am.lsm.rtree.dataflow.ExternalRTreeDataflowHelperFactory;
 import org.apache.hyracks.storage.am.rtree.dataflow.RTreeSearchOperatorDescriptor;
@@ -43,10 +44,11 @@ public class ExternalRTreeSearchOperatorDescriptor extends RTreeSearchOperatorDe
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] keyFields,
             ExternalRTreeDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
-            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory) {
+            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory,
+            IMetadataPageManagerFactory metadataPageManagerFactory) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, keyFields, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
-                searchOpCallbackFactory, null, null);
+                searchOpCallbackFactory, null, null, metadataPageManagerFactory);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
index 63a3780..7aa4b25 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
@@ -28,6 +28,7 @@ import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import org.apache.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
+import org.apache.hyracks.storage.am.common.api.IPageManagerFactory;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
 import org.apache.hyracks.storage.am.common.api.ITupleFilterFactory;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
@@ -49,7 +50,6 @@ public class IndexInfoOperatorDescriptor implements IIndexOperatorDescriptor{
         this.fileSplitProvider = fileSplitProvider;
         this.lifecycleManagerProvider = lifecycleManagerProvider;
         this.storageManager = storageManager;
-
     }
 
     @Override
@@ -123,4 +123,8 @@ public class IndexInfoOperatorDescriptor implements IIndexOperatorDescriptor{
         return null;
     }
 
+    @Override
+    public IPageManagerFactory getPageManagerFactory() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bc3d1b05/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
index 63f53a6..d8dfc9e 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
@@ -36,6 +36,7 @@ import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.config.IAsterixPropertiesProvider;
 import org.apache.asterix.common.context.BaseOperationTracker;
 import org.apache.asterix.common.context.CorrelatedPrefixMergePolicyFactory;
+import org.apache.asterix.common.dataflow.AsterixLSMIndexUtil;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.transactions.Resource;
@@ -364,7 +365,7 @@ public class MetadataBootstrap {
                             .createMergePolicy(GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, dataLifecycleManager),
                     opTracker, runtimeContext.getLSMIOScheduler(),
                     LSMBTreeIOOperationCallbackFactory.INSTANCE.createIOOperationCallback(), index.isPrimaryIndex(),
-                    null, null, null, null, true);
+                    null, null, null, null, true, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
             lsmBtree.create();
             resourceID = index.getResourceID();
             Resource localResourceMetadata = new LSMBTreeLocalResourceMetadata(typeTraits,
@@ -401,7 +402,7 @@ public class MetadataBootstrap {
                                 GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, dataLifecycleManager),
                         opTracker, runtimeContext.getLSMIOScheduler(),
                         LSMBTreeIOOperationCallbackFactory.INSTANCE.createIOOperationCallback(), index.isPrimaryIndex(),
-                        null, null, null, null, true);
+                        null, null, null, null, true, AsterixLSMIndexUtil.getMetadataPageManagerFactory());
                 dataLifecycleManager.register(file.getRelativePath(), lsmBtree);
             }
         }


Mime
View raw message