diff --git a/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/RuntimeContext.java b/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/RuntimeContext.java
index 94537bf..8cce523 100644
--- a/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/RuntimeContext.java
+++ b/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/RuntimeContext.java
@@ -20,7 +20,6 @@
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManager;
 import edu.uci.ics.hyracks.storage.am.common.dataflow.IndexLifecycleManager;
-import edu.uci.ics.hyracks.storage.common.TransientIndexArtifactMap;
 import edu.uci.ics.hyracks.storage.common.buffercache.BufferCache;
 import edu.uci.ics.hyracks.storage.common.buffercache.ClockPageReplacementStrategy;
 import edu.uci.ics.hyracks.storage.common.buffercache.HeapBufferAllocator;
@@ -29,13 +28,12 @@
 import edu.uci.ics.hyracks.storage.common.buffercache.IPageReplacementStrategy;
 import edu.uci.ics.hyracks.storage.common.file.IFileMapManager;
 import edu.uci.ics.hyracks.storage.common.file.IFileMapProvider;
-import edu.uci.ics.hyracks.storage.common.file.IIndexArtifactMap;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepositoryFactory;
-import edu.uci.ics.hyracks.storage.common.file.IndexLocalResourceRepositoryFactory;
 import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactory;
-import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactoryFactory;
+import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactoryProvider;
 import edu.uci.ics.hyracks.storage.common.file.TransientFileMapManager;
+import edu.uci.ics.hyracks.storage.common.file.TransientLocalResourceRepositoryFactory;
 
 public class RuntimeContext {
     private IBufferCache bufferCache;
@@ -50,10 +48,10 @@
         IPageReplacementStrategy prs = new ClockPageReplacementStrategy();
         bufferCache = new BufferCache(appCtx.getRootContext().getIOManager(), allocator, prs, fileMapManager, 32768,
                 50, 100);
-        ILocalResourceRepositoryFactory indexLocalResourceRepositoryFactory = new IndexLocalResourceRepositoryFactory(appCtx.getRootContext().getIOManager());
-        localResourceRepository = indexLocalResourceRepositoryFactory.createRepository();  
-        resourceIdFactory = (new ResourceIdFactoryFactory(localResourceRepository)).createResourceIdFactory();
         lcManager = new IndexLifecycleManager();
+        ILocalResourceRepositoryFactory localResourceRepositoryFactory = new TransientLocalResourceRepositoryFactory();
+        localResourceRepository = localResourceRepositoryFactory.createRepository();  
+        resourceIdFactory = (new ResourceIdFactoryProvider(localResourceRepository)).createResourceIdFactory();
     }
 
     public void close() {
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/btree/AbstractBTreeOperatorTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/btree/AbstractBTreeOperatorTest.java
index 95fc9d6..f161260 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/btree/AbstractBTreeOperatorTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/btree/AbstractBTreeOperatorTest.java
@@ -54,6 +54,7 @@
 import edu.uci.ics.hyracks.storage.am.common.impls.NoOpOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.am.common.ophelpers.IndexOperation;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.TransientLocalResourceFactoryProvider;
 import edu.uci.ics.hyracks.test.support.TestIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerComponentHolder;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerInterface;
@@ -133,9 +134,10 @@
 
     public void createPrimaryIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        TransientLocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         TreeIndexCreateOperatorDescriptor primaryCreateOp = new TreeIndexCreateOperatorDescriptor(spec, storageManager,
                 lcManagerProvider, primarySplitProvider, primaryTypeTraits, primaryComparatorFactories,
-                dataflowHelperFactory);
+                dataflowHelperFactory, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryCreateOp, NC1_ID);
         spec.addRoot(primaryCreateOp);
         runTest(spec);
@@ -183,9 +185,10 @@
 
     public void createSecondaryIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        TransientLocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         TreeIndexCreateOperatorDescriptor secondaryCreateOp = new TreeIndexCreateOperatorDescriptor(spec,
                 storageManager, lcManagerProvider, secondarySplitProvider, secondaryTypeTraits,
-                secondaryComparatorFactories, dataflowHelperFactory);
+                secondaryComparatorFactories, dataflowHelperFactory, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, secondaryCreateOp, NC1_ID);
         spec.addRoot(secondaryCreateOp);
         runTest(spec);
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/invertedindex/WordInvertedIndexTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/invertedindex/WordInvertedIndexTest.java
index 2c22289..6bc13da 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/invertedindex/WordInvertedIndexTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/invertedindex/WordInvertedIndexTest.java
@@ -73,6 +73,8 @@
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.ITokenFactory;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.UTF8WordTokenFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
+import edu.uci.ics.hyracks.storage.common.file.TransientLocalResourceFactoryProvider;
 import edu.uci.ics.hyracks.test.support.TestIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerComponentHolder;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerInterface;
@@ -85,13 +87,13 @@
     }
 
     private static final int MERGE_THRESHOLD = 3;
-    
+
     private IStorageManagerInterface storageManager = new TestStorageManagerInterface();
     private IIndexLifecycleManagerProvider lcManagerProvider = new TestIndexLifecycleManagerProvider();
     private IIndexDataflowHelperFactory btreeDataflowHelperFactory = new BTreeDataflowHelperFactory();
-    private IIndexDataflowHelperFactory invertedIndexDataflowHelperFactory = new LSMInvertedIndexDataflowHelperFactory(new FlushControllerProvider(), new ConstantMergePolicyProvider(
-            ImmediateSchedulerProvider.INSTANCE, MERGE_THRESHOLD), new RefCountingOperationTrackerProvider(),
-            ImmediateSchedulerProvider.INSTANCE);
+    private IIndexDataflowHelperFactory invertedIndexDataflowHelperFactory = new LSMInvertedIndexDataflowHelperFactory(
+            new FlushControllerProvider(), new ConstantMergePolicyProvider(ImmediateSchedulerProvider.INSTANCE,
+                    MERGE_THRESHOLD), new RefCountingOperationTrackerProvider(), ImmediateSchedulerProvider.INSTANCE);
 
     private final static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("ddMMyy-hhmmssSS");
     private final static String sep = System.getProperty("file.separator");
@@ -154,9 +156,10 @@
 
     public void createPrimaryIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        TransientLocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         TreeIndexCreateOperatorDescriptor primaryCreateOp = new TreeIndexCreateOperatorDescriptor(spec, storageManager,
                 lcManagerProvider, primaryFileSplitProvider, primaryTypeTraits, primaryComparatorFactories,
-                btreeDataflowHelperFactory);
+                btreeDataflowHelperFactory, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryCreateOp, NC1_ID);
         spec.addRoot(primaryCreateOp);
         runTest(spec);
@@ -164,10 +167,11 @@
 
     public void createInvertedIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        ILocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         LSMInvertedIndexCreateOperatorDescriptor invIndexCreateOp = new LSMInvertedIndexCreateOperatorDescriptor(spec,
-                storageManager, btreeFileSplitProvider, lcManagerProvider, tokenTypeTraits,
-                tokenComparatorFactories, invListsTypeTraits, invListsComparatorFactories, tokenizerFactory,
-                invertedIndexDataflowHelperFactory, NoOpOperationCallbackProvider.INSTANCE);
+                storageManager, btreeFileSplitProvider, lcManagerProvider, tokenTypeTraits, tokenComparatorFactories,
+                invListsTypeTraits, invListsComparatorFactories, tokenizerFactory, invertedIndexDataflowHelperFactory,
+                NoOpOperationCallbackProvider.INSTANCE, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, invIndexCreateOp, NC1_ID);
         spec.addRoot(invIndexCreateOp);
         runTest(spec);
@@ -203,7 +207,7 @@
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryBtreeBulkLoad, NC1_ID);
         return primaryBtreeBulkLoad;
     }
-    
+
     private IOperatorDescriptor createScanKeyProviderOp(JobSpecification spec) throws HyracksDataException {
         // build dummy tuple containing nothing
         ArrayTupleBuilder tb = new ArrayTupleBuilder(primaryKeyFieldCount * 2);
@@ -317,8 +321,8 @@
 
     private IOperatorDescriptor createInvertedIndexSearchOp(JobSpecification spec,
             IInvertedIndexSearchModifierFactory searchModifierFactory) {
-        LSMInvertedIndexSearchOperatorDescriptor invIndexSearchOp = new LSMInvertedIndexSearchOperatorDescriptor(spec, 0,
-                storageManager, btreeFileSplitProvider, lcManagerProvider, tokenTypeTraits,
+        LSMInvertedIndexSearchOperatorDescriptor invIndexSearchOp = new LSMInvertedIndexSearchOperatorDescriptor(spec,
+                0, storageManager, btreeFileSplitProvider, lcManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListsComparatorFactories,
                 invertedIndexDataflowHelperFactory, tokenizerFactory, searchModifierFactory, invListsRecDesc, false,
                 NoOpOperationCallbackProvider.INSTANCE);
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/rtree/AbstractRTreeOperatorTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/rtree/AbstractRTreeOperatorTest.java
index 0f42bb0..bce4a1d 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/rtree/AbstractRTreeOperatorTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/am/rtree/AbstractRTreeOperatorTest.java
@@ -64,6 +64,7 @@
 import edu.uci.ics.hyracks.storage.am.rtree.frames.RTreePolicyType;
 import edu.uci.ics.hyracks.storage.am.rtree.util.RTreeUtils;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.TransientLocalResourceFactoryProvider;
 import edu.uci.ics.hyracks.test.support.TestIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerComponentHolder;
 import edu.uci.ics.hyracks.test.support.TestStorageManagerInterface;
@@ -180,9 +181,10 @@
 
     protected void createPrimaryIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        TransientLocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         TreeIndexCreateOperatorDescriptor primaryCreateOp = new TreeIndexCreateOperatorDescriptor(spec, storageManager,
                 lcManagerProvider, primarySplitProvider, primaryTypeTraits, primaryComparatorFactories,
-                btreeDataflowHelperFactory);
+                btreeDataflowHelperFactory, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryCreateOp, NC1_ID);
         spec.addRoot(primaryCreateOp);
         runTest(spec);
@@ -234,9 +236,10 @@
 
     protected void createSecondaryIndex() throws Exception {
         JobSpecification spec = new JobSpecification();
+        TransientLocalResourceFactoryProvider localResourceFactoryProvider = new TransientLocalResourceFactoryProvider();
         TreeIndexCreateOperatorDescriptor secondaryCreateOp = new TreeIndexCreateOperatorDescriptor(spec,
                 storageManager, lcManagerProvider, secondarySplitProvider, secondaryTypeTraits,
-                secondaryComparatorFactories, rtreeDataflowHelperFactory);
+                secondaryComparatorFactories, rtreeDataflowHelperFactory, localResourceFactoryProvider);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, secondaryCreateOp, NC1_ID);
         spec.addRoot(secondaryCreateOp);
         runTest(spec);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
index 33aaed1..100570d 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import edu.uci.ics.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class BTreeSearchOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -45,7 +46,8 @@
             boolean lowKeyInclusive, boolean highKeyInclusive, IIndexDataflowHelperFactory dataflowHelperFactory,
             boolean retainInput, IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, null, retainInput, opCallbackProvider);
+                comparatorFactories, dataflowHelperFactory, null, retainInput, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.lowKeyFields = lowKeyFields;
         this.highKeyFields = highKeyFields;
         this.lowKeyInclusive = lowKeyInclusive;
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
index d248ec9..3f76ec0 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
@@ -23,8 +23,10 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.ITupleFilterFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
-public abstract class AbstractIndexOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor implements IIndexOperatorDescriptor {
+public abstract class AbstractIndexOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor implements
+        IIndexOperatorDescriptor {
 
     private static final long serialVersionUID = 1L;
 
@@ -35,12 +37,14 @@
     protected final ITupleFilterFactory tupleFilterFactory;
     protected final boolean retainInput;
     protected final IOperationCallbackProvider opCallbackProvider;
+    protected final ILocalResourceFactoryProvider localResourceFactoryProvider;
 
     public AbstractIndexOperatorDescriptor(IOperatorDescriptorRegistry spec, int inputArity, int outputArity,
             RecordDescriptor recDesc, IStorageManagerInterface storageManager,
             IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
-            boolean retainInput, IOperationCallbackProvider opCallbackProvider) {
+            boolean retainInput, IOperationCallbackProvider opCallbackProvider,
+            ILocalResourceFactoryProvider localResourceFactoryProvider) {
         super(spec, inputArity, outputArity);
         this.fileSplitProvider = fileSplitProvider;
         this.storageManager = storageManager;
@@ -49,12 +53,12 @@
         this.retainInput = retainInput;
         this.tupleFilterFactory = tupleFilterFactory;
         this.opCallbackProvider = opCallbackProvider;
+        this.localResourceFactoryProvider = localResourceFactoryProvider;
         if (outputArity > 0) {
             recordDescriptors[0] = recDesc;
         }
     }
-    
-    
+
     @Override
     public IFileSplitProvider getFileSplitProvider() {
         return fileSplitProvider;
@@ -94,4 +98,9 @@
     public ITupleFilterFactory getTupleFilterFactory() {
         return tupleFilterFactory;
     }
+    
+    @Override
+    public ILocalResourceFactoryProvider getLocalResourceFactoryProvider() {
+        return localResourceFactoryProvider;
+    }
 }
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
index aed3cc9..1609c66 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
@@ -24,6 +24,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.ITupleFilterFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
 public abstract class AbstractTreeIndexOperatorDescriptor extends AbstractIndexOperatorDescriptor {
 
@@ -37,9 +38,11 @@
             IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
             ITypeTraits[] typeTraits, IBinaryComparatorFactory[] comparatorFactories,
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
-            boolean retainInput, IOperationCallbackProvider opCallbackProvider) {
+            boolean retainInput, IOperationCallbackProvider opCallbackProvider,
+            ILocalResourceFactoryProvider localResourceFactoryProvider) {
         super(spec, inputArity, outputArity, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider,
-                dataflowHelperFactory, tupleFilterFactory, retainInput, opCallbackProvider);
+                dataflowHelperFactory, tupleFilterFactory, retainInput, opCallbackProvider,
+                localResourceFactoryProvider);
         this.typeTraits = typeTraits;
         this.comparatorFactories = comparatorFactories;
     }
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
index 375e047..7b15ea6 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
@@ -22,6 +22,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.ITupleFilterFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
 public interface IIndexOperatorDescriptor extends IActivity {
     public IFileSplitProvider getFileSplitProvider();
@@ -39,4 +40,6 @@
     public IOperationCallbackProvider getOpCallbackProvider();
     
     public ITupleFilterFactory getTupleFilterFactory();
+    
+    public ILocalResourceFactoryProvider getLocalResourceFactoryProvider();
 }
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
index 1cc6179..bafa3d9 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
@@ -23,8 +23,9 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndex;
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexDataflowHelper;
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManager;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactory;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
-import edu.uci.ics.hyracks.storage.common.file.IndexLocalResource;
+import edu.uci.ics.hyracks.storage.common.file.LocalResource;
 import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactory;
 
 public abstract class IndexDataflowHelper implements IIndexDataflowHelper {
@@ -44,6 +45,7 @@
         this.lcManager = opDesc.getLifecycleManagerProvider().getLifecycleManager(ctx);
         this.localResourceRepository = opDesc.getStorageManager().getLocalResourceRepository(ctx);
         this.resourceIdFactory = opDesc.getStorageManager().getResourceIdFactory(ctx);
+
         this.file = opDesc.getFileSplitProvider().getFileSplits()[partition].getLocalFile();
     }
 
@@ -64,7 +66,7 @@
             }
 
             // The previous resource ID needs to be removed since calling IIndex.create() may possibly destroy 
-            // any physical artifact that the IIndexArtifactMap is managing (e.g. a file containing the resource ID). 
+            // any physical artifact that the LocalResourceRepository is managing (e.g. a file containing the resource ID). 
             // Once the index has been created, a new resource ID can be generated.
             if (resourceID != -1) {
                 localResourceRepository.deleteResourceByName(file.getFile().getPath());
@@ -73,7 +75,9 @@
             try {
                 //TODO Create LocalResource through LocalResourceFactory interface
                 resourceID = resourceIdFactory.createId();
-                localResourceRepository.insert(new IndexLocalResource(resourceID, file.getFile().getPath(), null, null));
+                ILocalResourceFactory localResourceFactory = opDesc.getLocalResourceFactoryProvider()
+                        .getLocalResourceFactory();
+                localResourceRepository.insert(localResourceFactory.createLocalResource(resourceID, file.getFile().getPath()));
             } catch (IOException e) {
                 throw new HyracksDataException(e);
             }
@@ -126,9 +130,14 @@
     }
 
     public long getResourceID() throws HyracksDataException {
-        return localResourceRepository.getResourceByName(file.getFile().getPath()).getResourceId();
+        LocalResource localResource = localResourceRepository.getResourceByName(file.getFile().getPath());
+        if (localResource == null) {
+            return -1;
+        } else {
+            return localResource.getResourceId();
+        }
     }
-    
+
     public IHyracksTaskContext getTaskContext() {
         return ctx;
     }
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDropOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDropOperatorDescriptor.java
index 946dd52..8a0f729 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDropOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/IndexDropOperatorDescriptor.java
@@ -26,6 +26,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.storage.am.common.impls.NoOpOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class IndexDropOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -40,7 +41,8 @@
         // This should eventually not be *hacked*, but I don't know the proper fix yet. -zheilbron
         super(spec, 0, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider, new ITypeTraits[] {
                 IntegerPointable.TYPE_TRAITS, IntegerPointable.TYPE_TRAITS }, new IBinaryComparatorFactory[] { null },
-                dataflowHelperFactory, null, false, NoOpOperationCallbackProvider.INSTANCE);
+                dataflowHelperFactory, null, false, NoOpOperationCallbackProvider.INSTANCE,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
     }
 
     @Override
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexBulkLoadOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexBulkLoadOperatorDescriptor.java
index f78bdb4..02f2ec6 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexBulkLoadOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexBulkLoadOperatorDescriptor.java
@@ -25,6 +25,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class TreeIndexBulkLoadOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -41,7 +42,8 @@
             boolean verifyInput, IIndexDataflowHelperFactory dataflowHelperFactory,
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider);
+                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.fieldPermutation = fieldPermutation;
         this.fillFactor = fillFactor;
         this.verifyInput = verifyInput;
@@ -50,7 +52,7 @@
     @Override
     public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx,
             IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) {
-        return new IndexBulkLoadOperatorNodePushable(this, ctx, partition, fieldPermutation, fillFactor,
-        		verifyInput, recordDescProvider);
+        return new IndexBulkLoadOperatorNodePushable(this, ctx, partition, fieldPermutation, fillFactor, verifyInput,
+                recordDescProvider);
     }
 }
\ No newline at end of file
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexCreateOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexCreateOperatorDescriptor.java
index f4b668c..8ba5fae 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexCreateOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexCreateOperatorDescriptor.java
@@ -25,6 +25,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.storage.am.common.impls.NoOpOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
 public class TreeIndexCreateOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -33,9 +34,11 @@
     public TreeIndexCreateOperatorDescriptor(IOperatorDescriptorRegistry spec, IStorageManagerInterface storageManager,
             IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
             ITypeTraits[] typeTraits, IBinaryComparatorFactory[] comparatorFactories,
-            IIndexDataflowHelperFactory dataflowHelperFactory) {
+            IIndexDataflowHelperFactory dataflowHelperFactory,
+            ILocalResourceFactoryProvider localResourceFactoryProvider) {
         super(spec, 0, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, null, false, NoOpOperationCallbackProvider.INSTANCE);
+                comparatorFactories, dataflowHelperFactory, null, false, NoOpOperationCallbackProvider.INSTANCE,
+                localResourceFactoryProvider);
     }
 
     @Override
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorDescriptor.java
index 6a5afea..7e16d62 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexDiskOrderScanOperatorDescriptor.java
@@ -25,6 +25,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class TreeIndexDiskOrderScanOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -35,7 +36,7 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IIndexDataflowHelperFactory dataflowHelperFactory, IOperationCallbackProvider opCallbackProvider) {
         super(spec, 0, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits, null,
-                dataflowHelperFactory, null, false, opCallbackProvider);
+                dataflowHelperFactory, null, false, opCallbackProvider, NoOpLocalResourceFactoryProvider.INSTANCE);
     }
 
     @Override
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexInsertUpdateDeleteOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexInsertUpdateDeleteOperatorDescriptor.java
index ef176b8..5a49c62 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexInsertUpdateDeleteOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexInsertUpdateDeleteOperatorDescriptor.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.ITupleFilterFactory;
 import edu.uci.ics.hyracks.storage.am.common.ophelpers.IndexOperation;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class TreeIndexInsertUpdateDeleteOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -43,7 +44,8 @@
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, tupleFilterFactory, false, opCallbackProvider);
+                comparatorFactories, dataflowHelperFactory, tupleFilterFactory, false, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.fieldPermutation = fieldPermutation;
         this.op = op;
     }
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexStatsOperatorDescriptor.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexStatsOperatorDescriptor.java
index 4bba2d8..39a2118 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexStatsOperatorDescriptor.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/dataflow/TreeIndexStatsOperatorDescriptor.java
@@ -27,6 +27,7 @@
 import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import edu.uci.ics.hyracks.storage.am.common.api.IOperationCallbackProvider;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class TreeIndexStatsOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -39,7 +40,8 @@
             ITypeTraits[] typeTraits, IBinaryComparatorFactory[] comparatorFactories,
             IIndexDataflowHelperFactory dataflowHelperFactory, IOperationCallbackProvider opCallbackProvider) {
         super(spec, 0, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider);
+                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
     }
 
     @Override
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
index a8bf801..2611c51 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
@@ -28,9 +28,10 @@
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.api.IInvertedIndexOperatorDescriptor;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
-public abstract class AbstractLSMInvertedIndexOperatorDescriptor extends AbstractIndexOperatorDescriptor
-        implements IInvertedIndexOperatorDescriptor {
+public abstract class AbstractLSMInvertedIndexOperatorDescriptor extends AbstractIndexOperatorDescriptor implements
+        IInvertedIndexOperatorDescriptor {
 
     private static final long serialVersionUID = 1L;
 
@@ -39,17 +40,18 @@
     protected final ITypeTraits[] tokenTypeTraits;
     protected final IBinaryComparatorFactory[] tokenComparatorFactories;
     protected final IBinaryTokenizerFactory tokenizerFactory;
-    
-    public AbstractLSMInvertedIndexOperatorDescriptor(IOperatorDescriptorRegistry spec, int inputArity, int outputArity,
-            RecordDescriptor recDesc, IStorageManagerInterface storageManager,
-            IFileSplitProvider fileSplitProvider,
-            IIndexLifecycleManagerProvider lifecycleManagerProvider, ITypeTraits[] tokenTypeTraits,
-            IBinaryComparatorFactory[] tokenComparatorFactories, ITypeTraits[] invListsTypeTraits,
-            IBinaryComparatorFactory[] invListComparatorFactories, IBinaryTokenizerFactory tokenizerFactory,
-            IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory, boolean retainInput,
-            IOperationCallbackProvider opCallbackProvider) {
+
+    public AbstractLSMInvertedIndexOperatorDescriptor(IOperatorDescriptorRegistry spec, int inputArity,
+            int outputArity, RecordDescriptor recDesc, IStorageManagerInterface storageManager,
+            IFileSplitProvider fileSplitProvider, IIndexLifecycleManagerProvider lifecycleManagerProvider,
+            ITypeTraits[] tokenTypeTraits, IBinaryComparatorFactory[] tokenComparatorFactories,
+            ITypeTraits[] invListsTypeTraits, IBinaryComparatorFactory[] invListComparatorFactories,
+            IBinaryTokenizerFactory tokenizerFactory, IIndexDataflowHelperFactory dataflowHelperFactory,
+            ITupleFilterFactory tupleFilterFactory, boolean retainInput, IOperationCallbackProvider opCallbackProvider,
+            ILocalResourceFactoryProvider localResourceFactoryProvider) {
         super(spec, inputArity, outputArity, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider,
-                dataflowHelperFactory, tupleFilterFactory, retainInput, opCallbackProvider);
+                dataflowHelperFactory, tupleFilterFactory, retainInput, opCallbackProvider,
+                localResourceFactoryProvider);
         this.invListsTypeTraits = invListsTypeTraits;
         this.invListComparatorFactories = invListComparatorFactories;
         this.tokenTypeTraits = tokenTypeTraits;
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexBulkLoadOperatorDescriptor.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexBulkLoadOperatorDescriptor.java
index 31965e8..ede9b42 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexBulkLoadOperatorDescriptor.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexBulkLoadOperatorDescriptor.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.storage.am.common.dataflow.IndexBulkLoadOperatorNodePushable;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class LSMInvertedIndexBulkLoadOperatorDescriptor extends AbstractLSMInvertedIndexOperatorDescriptor {
 
@@ -45,7 +46,8 @@
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 0, null, storageManager, fileSplitProvider, lifecycleManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListComparatorFactories, tokenizerFactory,
-                invertedIndexDataflowHelperFactory, null, false, opCallbackProvider);
+                invertedIndexDataflowHelperFactory, null, false, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.fieldPermutation = fieldPermutation;
         this.verifyInput = verifyInput;
     }
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexCreateOperatorDescriptor.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexCreateOperatorDescriptor.java
index 3b9b27e..8a0c997 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexCreateOperatorDescriptor.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexCreateOperatorDescriptor.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.storage.am.common.dataflow.IndexCreateOperatorNodePushable;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceFactoryProvider;
 
 public class LSMInvertedIndexCreateOperatorDescriptor extends AbstractLSMInvertedIndexOperatorDescriptor {
 
@@ -38,10 +39,11 @@
             IIndexLifecycleManagerProvider lifecycleManagerProvider, ITypeTraits[] tokenTypeTraits,
             IBinaryComparatorFactory[] tokenComparatorFactories, ITypeTraits[] invListsTypeTraits,
             IBinaryComparatorFactory[] invListComparatorFactories, IBinaryTokenizerFactory tokenizerFactory,
-            IIndexDataflowHelperFactory btreeDataflowHelperFactory, IOperationCallbackProvider opCallbackProvider) {
+            IIndexDataflowHelperFactory btreeDataflowHelperFactory, IOperationCallbackProvider opCallbackProvider,
+            ILocalResourceFactoryProvider localResourceFactoryProvider) {
         super(spec, 0, 0, null, storageManager, fileSplitProvider, lifecycleManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListComparatorFactories, tokenizerFactory,
-                btreeDataflowHelperFactory, null, false, opCallbackProvider);
+                btreeDataflowHelperFactory, null, false, opCallbackProvider, localResourceFactoryProvider);
     }
 
     @Override
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexInsertUpdateDeleteOperator.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexInsertUpdateDeleteOperator.java
index a77768c..5696f67 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexInsertUpdateDeleteOperator.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexInsertUpdateDeleteOperator.java
@@ -29,6 +29,7 @@
 import edu.uci.ics.hyracks.storage.am.common.ophelpers.IndexOperation;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class LSMInvertedIndexInsertUpdateDeleteOperator extends AbstractLSMInvertedIndexOperatorDescriptor {
 
@@ -46,7 +47,7 @@
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 0, 0, null, storageManager, fileSplitProvider, lifecycleManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListComparatorFactories, tokenizerFactory,
-                dataflowHelperFactory, null, false, opCallbackProvider);
+                dataflowHelperFactory, null, false, opCallbackProvider, NoOpLocalResourceFactoryProvider.INSTANCE);
         this.fieldPermutation = fieldPermutation;
         this.op = op;
     }
diff --git a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
index a997575..c9c7786 100644
--- a/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
+++ b/hyracks-storage-am-lsm-invertedindex/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
@@ -31,6 +31,7 @@
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.api.IInvertedIndexSearchModifierFactory;
 import edu.uci.ics.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class LSMInvertedIndexSearchOperatorDescriptor extends AbstractLSMInvertedIndexOperatorDescriptor {
     private static final long serialVersionUID = 1L;
@@ -48,7 +49,8 @@
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 1, recDesc, storageManager, fileSplitProvider, lifecycleManagerProvider, tokenTypeTraits,
                 tokenComparatorFactories, invListsTypeTraits, invListComparatorFactories, queryTokenizerFactory,
-                btreeDataflowHelperFactory, null, retainInput, opCallbackProvider);
+                btreeDataflowHelperFactory, null, retainInput, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.queryField = queryField;
         this.searchModifierFactory = searchModifierFactory;
     }
diff --git a/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java b/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
index e85d2da..94ad898 100644
--- a/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
+++ b/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import edu.uci.ics.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
+import edu.uci.ics.hyracks.storage.common.file.NoOpLocalResourceFactoryProvider;
 
 public class RTreeSearchOperatorDescriptor extends AbstractTreeIndexOperatorDescriptor {
 
@@ -42,7 +43,8 @@
             IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput,
             IOperationCallbackProvider opCallbackProvider) {
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider);
+                comparatorFactories, dataflowHelperFactory, null, false, opCallbackProvider,
+                NoOpLocalResourceFactoryProvider.INSTANCE);
         this.keyFields = keyFields;
     }
 
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/TransientIndexArtifactMap.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/TransientIndexArtifactMap.java
deleted file mode 100644
index 2c0fb29..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/TransientIndexArtifactMap.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package edu.uci.ics.hyracks.storage.common;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-import edu.uci.ics.hyracks.api.io.IODeviceHandle;
-import edu.uci.ics.hyracks.storage.common.file.IIndexArtifactMap;
-
-public class TransientIndexArtifactMap implements IIndexArtifactMap {
-    private long counter = 0;
-    private Map<String, Long> name2IdMap = new HashMap<String, Long>();
-
-    @Override
-    public long create(String baseDir, List<IODeviceHandle> IODeviceHandles) throws IOException {
-        long resourceId = counter++;
-        synchronized (name2IdMap) {
-            if (name2IdMap.containsKey(baseDir)) {
-                throw new HyracksDataException("Failed to create artifact for " + baseDir
-                        + ". Artifact already exists.");
-            }
-            name2IdMap.put(baseDir, resourceId);
-        }
-        return resourceId;
-    }
-
-    /**
-     * Search and return the resourceId indicated by fullDir from in-memory hashMap, name2IdMap.
-     * When there is no corresponding id in name2IdMap, return -1;
-     */
-    @Override
-    public long get(String baseDir) {
-        Long resourceId = -1L;
-
-        synchronized (name2IdMap) {
-            resourceId = name2IdMap.get(baseDir);
-        }
-
-        if (resourceId == null) {
-            return -1;
-        } else {
-            return resourceId;
-        }
-    }
-
-    @Override
-    public void delete(String baseDir, List<IODeviceHandle> IODeviceHandles) {
-        synchronized (name2IdMap) {
-            name2IdMap.remove(baseDir);
-        }
-    }
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/AbstractIndexLocalResourceClass.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/AbstractIndexLocalResourceClass.java
deleted file mode 100644
index 1ec3548..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/AbstractIndexLocalResourceClass.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.common.file;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-
-public abstract class AbstractIndexLocalResourceClass implements ILocalResourceClass {
-
-    @Override
-    public byte[] serialize(ILocalResource resource) throws HyracksDataException {
-        ByteArrayOutputStream baos = null;
-        ObjectOutputStream oosToBaos = null;
-
-        try {
-            baos = new ByteArrayOutputStream();
-            oosToBaos = new ObjectOutputStream(baos);
-            oosToBaos.writeLong(resource.getResourceId());
-            oosToBaos.writeUTF(resource.getResourceName());
-            oosToBaos.writeObject(resource.getResourceObject());
-            return baos.toByteArray();
-        } catch (IOException e) {
-            throw new HyracksDataException(e);
-        } finally {
-            if (oosToBaos != null) {
-                try {
-                    oosToBaos.close();
-                } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                }
-            }
-
-            if (oosToBaos == null && baos != null) {
-                try {
-                    baos.close();
-                } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                }
-            }
-        }
-    }
-
-    @Override
-    public ILocalResource deserialize(byte[] bytes) throws HyracksDataException {
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        ObjectInputStream oisFromBais = null;
-        try {
-            oisFromBais = new ObjectInputStream(bais);
-            return new IndexLocalResource(oisFromBais.readLong(), oisFromBais.readUTF(), oisFromBais.readObject(), this);
-        } catch (Exception e) {
-            throw new HyracksDataException(e);
-        } finally {
-            if (oisFromBais != null) {
-                try {
-                    oisFromBais.close();
-                } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                }
-            }
-            if (oisFromBais == null && bais != null) {
-                try {
-                    bais.close();
-                } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                }
-            }
-        }
-    }
-
-    public abstract int getResourceClassId();
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IIndexArtifactMap.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IIndexArtifactMap.java
deleted file mode 100644
index 428d11f..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IIndexArtifactMap.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package edu.uci.ics.hyracks.storage.common.file;
-
-import java.io.IOException;
-import java.util.List;
-
-import edu.uci.ics.hyracks.api.io.IODeviceHandle;
-
-/**
- * IIndexArtifactMap provides interface to create an index artifact(that is a resourceId, but can be generalized to accommodate any artifact later) and retrieve it.
- * 
- * @author kisskys
- */
-public interface IIndexArtifactMap {
-    /**
-     * Creates an artifact(resourceId) indicated by @param baseDir and @param ioDeviceHandles and return it.
-     * 
-     * @param baseDir
-     * @param ioDeviceHandles
-     * @return a created artifact if it is created successfully.
-     * @throws IOException
-     *             if the corresponding artifact already exists
-     */
-    public long create(String baseDir, List<IODeviceHandle> ioDeviceHandles) throws IOException;
-
-    /**
-     * Retrieves the artifact(resourceId) indicated by @param fullDir
-     * 
-     * @param fullDir
-     * @return the retrieved artifact if it exists, -1 otherwise.
-     */
-    public long get(String fullDir);
-
-    /**
-     * Deletes an artifact(resourceId) indicated by @param baseDir and @param ioDeviceHandles.
-     * 
-     * @param fullDir
-     */
-    public void delete(String baseDir, List<IODeviceHandle> ioDeviceHandles);
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceClass.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceClass.java
deleted file mode 100644
index 369f5b9..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceClass.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.common.file;
-
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-
-public interface ILocalResourceClass {
-
-    public static final int LSMBTree = 0;
-    public static final int LSMRTree = 1;
-    public static final int LSMInvertedIndex = 2;
-
-    public byte[] serialize(ILocalResource resource) throws HyracksDataException;
-
-    public ILocalResource deserialize(byte[] bytes) throws HyracksDataException;
-
-    public int getResourceClassId();
-
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactory.java
similarity index 73%
copy from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
copy to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactory.java
index 16e249e..7fed1cf 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactory.java
@@ -14,14 +14,6 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.Serializable;
-
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
-
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+public interface ILocalResourceFactory {
+    public LocalResource createLocalResource(long resourceId, String resourceName);
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactoryProvider.java
similarity index 76%
rename from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
rename to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactoryProvider.java
index 16e249e..fb6a210 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceFactoryProvider.java
@@ -16,12 +16,6 @@
 
 import java.io.Serializable;
 
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
-
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+public interface ILocalResourceFactoryProvider extends Serializable {
+    public ILocalResourceFactory getLocalResourceFactory();
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepository.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepository.java
index 86e4188..2dce39e 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepository.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepository.java
@@ -20,16 +20,15 @@
 
 public interface ILocalResourceRepository {
 
-    public ILocalResource getResourceById(long id) throws HyracksDataException;
+    public LocalResource getResourceById(long id) throws HyracksDataException;
 
-    public ILocalResource getResourceByName(String name) throws HyracksDataException;
+    public LocalResource getResourceByName(String name) throws HyracksDataException;
 
-    public void insert(ILocalResource resource) throws HyracksDataException;
+    public void insert(LocalResource resource) throws HyracksDataException;
 
     public void deleteResourceById(long id) throws HyracksDataException;
 
     public void deleteResourceByName(String name) throws HyracksDataException;
 
-    public List<ILocalResource> getAllResources() throws HyracksDataException;
-
+    public List<LocalResource> getAllResources() throws HyracksDataException;
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMBTreeLocalResourceClass.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMBTreeLocalResourceClass.java
deleted file mode 100644
index 7624e40..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMBTreeLocalResourceClass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.common.file;
-
-public class LSMBTreeLocalResourceClass extends AbstractIndexLocalResourceClass {
-    private static LSMBTreeLocalResourceClass instance = new LSMBTreeLocalResourceClass();
-
-    public static LSMBTreeLocalResourceClass getInstance() {
-        return instance;
-    }
-
-    @Override
-    public int getResourceClassId() {
-        return ILocalResourceClass.LSMBTree;
-    }
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMInvertedIndexLocalResourceClass.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMInvertedIndexLocalResourceClass.java
deleted file mode 100644
index 866cac5..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMInvertedIndexLocalResourceClass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.common.file;
-
-public class LSMInvertedIndexLocalResourceClass extends AbstractIndexLocalResourceClass {
-    private static LSMInvertedIndexLocalResourceClass instance = new LSMInvertedIndexLocalResourceClass();
-
-    public static LSMInvertedIndexLocalResourceClass getInstance() {
-        return instance;
-    }
-
-    @Override
-    public int getResourceClassId() {
-        return ILocalResourceClass.LSMInvertedIndex;
-    }
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMRTreeLocalResourceClass.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMRTreeLocalResourceClass.java
deleted file mode 100644
index e78f087..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LSMRTreeLocalResourceClass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2009-2012 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.common.file;
-
-public class LSMRTreeLocalResourceClass extends AbstractIndexLocalResourceClass {
-    private static LSMRTreeLocalResourceClass instance = new LSMRTreeLocalResourceClass();
-
-    public static LSMRTreeLocalResourceClass getInstance() {
-        return instance;
-    }
-
-    @Override
-    public int getResourceClassId() {
-        return ILocalResourceClass.LSMRTree;
-    }
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LocalResource.java
similarity index 70%
rename from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResource.java
rename to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LocalResource.java
index f5dfca8..3ef3ce7 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/LocalResource.java
@@ -14,37 +14,35 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-public class IndexLocalResource implements ILocalResource {
-    private static final long serialVersionUID = -8638308062094620884L;
+import java.io.Serializable;
+
+public class LocalResource implements Serializable {
+    private static final long serialVersionUID = 1L;
     private final long resourceId;
     private final String resourceName;
+    private final int resourceType;
     private final Object object;
-    private final ILocalResourceClass resourceClass;
 
-    public IndexLocalResource(long resourceId, String resourceName, Object object, ILocalResourceClass resourceClass) {
+    public LocalResource(long resourceId, String resourceName, int resourceType, Object object) {
         this.resourceId = resourceId;
         this.resourceName = resourceName;
         this.object = object;
-        this.resourceClass = resourceClass;
+        this.resourceType = resourceType;
     }
 
-    @Override
     public long getResourceId() {
         return resourceId;
     }
 
-    @Override
     public String getResourceName() {
         return resourceName;
     }
 
-    @Override
-    public Object getResourceObject() {
-        return object;
+    public int getResourceType() {
+        return resourceType;
     }
 
-    @Override
-    public ILocalResourceClass getResourceClass() {
-        return resourceClass;
+    public Object getResourceObject() {
+        return object;
     }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/NoOpLocalResourceFactoryProvider.java
similarity index 71%
copy from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
copy to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/NoOpLocalResourceFactoryProvider.java
index 16e249e..e69f4e7 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/NoOpLocalResourceFactoryProvider.java
@@ -14,14 +14,14 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.Serializable;
+/**
+ * Dummy operation factory provider that does nothing.
+ */
+public enum NoOpLocalResourceFactoryProvider implements ILocalResourceFactoryProvider {
+    INSTANCE;
 
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
-
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+    @Override
+    public ILocalResourceFactory getLocalResourceFactory() {
+        return null;
+    }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepository.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
similarity index 62%
rename from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepository.java
rename to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
index 9090aad..aac34de 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepository.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
@@ -14,7 +14,6 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -29,17 +28,14 @@
 
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
-public class IndexLocalResourceRepository implements ILocalResourceRepository {
+public class PersistentLocalResourceRepository implements ILocalResourceRepository {
 
-    private final List<ILocalResourceClass> resourceClasses;
     private final List<String> mountPoints;
     private static final String METADATA_FILE_NAME = ".metadata";
-    private Map<String, ILocalResource> name2ResourceMap = new HashMap<String, ILocalResource>();
-    private Map<Long, ILocalResource> id2ResourceMap = new HashMap<Long, ILocalResource>();
+    private Map<String, LocalResource> name2ResourceMap = new HashMap<String, LocalResource>();
+    private Map<Long, LocalResource> id2ResourceMap = new HashMap<Long, LocalResource>();
 
-    public IndexLocalResourceRepository(List<ILocalResourceClass> resourceClasses, List<String> mountPoints,
-            String rootDir) throws HyracksDataException {
-        this.resourceClasses = resourceClasses;
+    public PersistentLocalResourceRepository(List<String> mountPoints, String rootDir) throws HyracksDataException {
         this.mountPoints = mountPoints;
 
         File rootFile = new File(this.mountPoints.get(0), rootDir);
@@ -62,7 +58,7 @@
             if (childFile.isDirectory()) {
                 File[] targetFileList = childFile.listFiles(filter);
                 for (File targetFile : targetFileList) {
-                    ILocalResource localResource = readLocalResource(targetFile);
+                    LocalResource localResource = readLocalResource(targetFile);
                     id2ResourceMap.put(localResource.getResourceId(), localResource);
                     name2ResourceMap.put(localResource.getResourceName(), localResource);
                 }
@@ -71,17 +67,17 @@
     }
 
     @Override
-    public ILocalResource getResourceById(long id) throws HyracksDataException {
+    public LocalResource getResourceById(long id) throws HyracksDataException {
         return id2ResourceMap.get(id);
     }
 
     @Override
-    public ILocalResource getResourceByName(String name) throws HyracksDataException {
-        return id2ResourceMap.get(name);
+    public LocalResource getResourceByName(String name) throws HyracksDataException {
+        return name2ResourceMap.get(name);
     }
 
     @Override
-    public synchronized void insert(ILocalResource resource) throws HyracksDataException {
+    public synchronized void insert(LocalResource resource) throws HyracksDataException {
         long id = resource.getResourceId();
 
         if (id2ResourceMap.containsKey(id)) {
@@ -95,10 +91,7 @@
         try {
             fos = new FileOutputStream(getFileName(mountPoints.get(0), resource.getResourceName()));
             oosToFos = new ObjectOutputStream(fos);
-            byte[] outputBytes = resource.getResourceClass().serialize(resource);
-            oosToFos.writeInt(resource.getResourceClass().getResourceClassId());
-            oosToFos.writeInt(outputBytes.length);
-            oosToFos.write(outputBytes);
+            oosToFos.writeObject(resource);
             oosToFos.flush();
         } catch (IOException e) {
             throw new HyracksDataException(e);
@@ -122,7 +115,7 @@
 
     @Override
     public synchronized void deleteResourceById(long id) throws HyracksDataException {
-        ILocalResource resource = id2ResourceMap.get(id);
+        LocalResource resource = id2ResourceMap.get(id);
         if (resource == null) {
             throw new HyracksDataException("Resource doesn't exist");
         }
@@ -134,20 +127,20 @@
 
     @Override
     public synchronized void deleteResourceByName(String name) throws HyracksDataException {
-        ILocalResource resource = id2ResourceMap.get(name);
+        LocalResource resource = name2ResourceMap.get(name);
         if (resource == null) {
             throw new HyracksDataException("Resource doesn't exist");
         }
-        id2ResourceMap.remove(name);
-        name2ResourceMap.remove(resource.getResourceId());
+        id2ResourceMap.remove(resource.getResourceId());
+        name2ResourceMap.remove(name);
         File file = new File(getFileName(mountPoints.get(0), resource.getResourceName()));
         file.delete();
     }
 
     @Override
-    public List<ILocalResource> getAllResources() throws HyracksDataException {
-        List<ILocalResource> resources = new ArrayList<ILocalResource>();
-        for (ILocalResource resource : id2ResourceMap.values()) {
+    public List<LocalResource> getAllResources() throws HyracksDataException {
+        List<LocalResource> resources = new ArrayList<LocalResource>();
+        for (LocalResource resource : id2ResourceMap.values()) {
             resources.add(resource);
         }
         return resources;
@@ -165,34 +158,16 @@
         return fileName;
     }
 
-    private ILocalResource readLocalResource(File file) throws HyracksDataException {
+    private LocalResource readLocalResource(File file) throws HyracksDataException {
         FileInputStream fis = null;
         ObjectInputStream oisFromFis = null;
-        ByteArrayInputStream bais = null;
-        ObjectInputStream oisFromBais = null;
-        ILocalResource resource = null;
 
         try {
             fis = new FileInputStream(file);
             oisFromFis = new ObjectInputStream(fis);
-
-            int resourceClassId = oisFromFis.readInt();
-            int inputLength = oisFromFis.readInt();
-            byte[] inputBytes = new byte[inputLength];
-            if (inputLength != oisFromFis.read(inputBytes)) {
-                throw new HyracksDataException("Corrupted file");
-            }
-
-            bais = new ByteArrayInputStream(inputBytes);
-            oisFromBais = new ObjectInputStream(bais);
-            for (ILocalResourceClass resourceClass : resourceClasses) {
-                if (resourceClass.getResourceClassId() == resourceClassId) {
-                    resource = resourceClass.deserialize(inputBytes);
-                    break;
-                }
-            }
+            LocalResource resource = (LocalResource) oisFromFis.readObject();
             return resource;
-        } catch (IOException e) {
+        } catch (Exception e) {
             throw new HyracksDataException(e);
         } finally {
             if (oisFromFis != null) {
@@ -200,8 +175,6 @@
                     oisFromFis.close();
                 } catch (IOException e) {
                     throw new HyracksDataException(e);
-                } finally {
-                    closeInputStream(oisFromBais, bais);
                 }
             }
             if (oisFromFis == null && fis != null) {
@@ -209,27 +182,8 @@
                     fis.close();
                 } catch (IOException e) {
                     throw new HyracksDataException(e);
-                } finally {
-                    closeInputStream(oisFromBais, bais);
                 }
             }
         }
     }
-
-    private void closeInputStream(ObjectInputStream oisFromBais, ByteArrayInputStream bais) throws HyracksDataException {
-        if (oisFromBais != null) {
-            try {
-                oisFromBais.close();
-            } catch (IOException e) {
-                throw new HyracksDataException(e);
-            }
-        }
-        if (oisFromBais == null && bais != null) {
-            try {
-                bais.close();
-            } catch (IOException e) {
-                throw new HyracksDataException(e);
-            }
-        }
-    }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepositoryFactory.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepositoryFactory.java
similarity index 70%
rename from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepositoryFactory.java
rename to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepositoryFactory.java
index 4707361..a2d0fa3 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/IndexLocalResourceRepositoryFactory.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepositoryFactory.java
@@ -21,26 +21,22 @@
 import edu.uci.ics.hyracks.api.io.IIOManager;
 import edu.uci.ics.hyracks.api.io.IODeviceHandle;
 
-public class IndexLocalResourceRepositoryFactory implements ILocalResourceRepositoryFactory {
+public class PersistentLocalResourceRepositoryFactory implements ILocalResourceRepositoryFactory {
     private static final String rootDir = "";
     private IIOManager ioManager;
-    
-    public IndexLocalResourceRepositoryFactory(IIOManager ioManager) {
+
+    public PersistentLocalResourceRepositoryFactory(IIOManager ioManager) {
         this.ioManager = ioManager;
     }
-    
+
     @Override
     public ILocalResourceRepository createRepository() throws HyracksDataException {
-        List<ILocalResourceClass> resourceClasses = new ArrayList<ILocalResourceClass>();
-        resourceClasses.add(LSMBTreeLocalResourceClass.getInstance());
-        resourceClasses.add(LSMRTreeLocalResourceClass.getInstance());
-        resourceClasses.add(LSMInvertedIndexLocalResourceClass.getInstance());
-        
         List<String> mountPoints = new ArrayList<String>();
         List<IODeviceHandle> devices = ioManager.getIODevices();
+
         for (IODeviceHandle dev : devices) {
             mountPoints.add(dev.getPath().getPath());
         }
-        return new IndexLocalResourceRepository(resourceClasses, mountPoints, rootDir);
+        return new PersistentLocalResourceRepository(mountPoints, rootDir);
     }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryFactory.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryFactory.java
deleted file mode 100644
index 296dea6..0000000
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryFactory.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package edu.uci.ics.hyracks.storage.common.file;
-
-import java.util.List;
-
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-
-public class ResourceIdFactoryFactory {
-    private ILocalResourceRepository localResourceRepository;
-
-    public ResourceIdFactoryFactory(ILocalResourceRepository localResourceRepository) {
-        this.localResourceRepository = localResourceRepository;
-    }
-
-    public ResourceIdFactory createResourceIdFactory() throws HyracksDataException {
-        List<ILocalResource> localResources = localResourceRepository.getAllResources();
-        long largestResourceId = 0;
-        for (ILocalResource localResource : localResources) {
-            if (largestResourceId < localResource.getResourceId()) {
-                largestResourceId = localResource.getResourceId();
-            }
-        }
-        return new ResourceIdFactory(largestResourceId);
-    }
-}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryProvider.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryProvider.java
new file mode 100644
index 0000000..62cdb36
--- /dev/null
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ResourceIdFactoryProvider.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009-2012 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.storage.common.file;
+
+import java.util.List;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+
+public class ResourceIdFactoryProvider {
+    private ILocalResourceRepository localResourceRepository;
+
+    public ResourceIdFactoryProvider(ILocalResourceRepository localResourceRepository) {
+        this.localResourceRepository = localResourceRepository;
+    }
+
+    public ResourceIdFactory createResourceIdFactory() throws HyracksDataException {
+        List<LocalResource> localResources = localResourceRepository.getAllResources();
+        long largestResourceId = 0;
+        for (LocalResource localResource : localResources) {
+            if (largestResourceId < localResource.getResourceId()) {
+                largestResourceId = localResource.getResourceId();
+            }
+        }
+        return new ResourceIdFactory(largestResourceId);
+    }
+}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactory.java
similarity index 67%
copy from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
copy to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactory.java
index 16e249e..5d4bbbd 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactory.java
@@ -14,14 +14,12 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.Serializable;
+public class TransientLocalResourceFactory implements ILocalResourceFactory {
 
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
-
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+    public static final int TransientResource = 0;
+    
+    @Override
+    public LocalResource createLocalResource(long resourceId, String resourceName) {
+        return new LocalResource(resourceId, resourceName, TransientResource, null);
+    }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactoryProvider.java
similarity index 70%
copy from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
copy to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactoryProvider.java
index 16e249e..d9a51a3 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceFactoryProvider.java
@@ -14,14 +14,12 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.Serializable;
+public class TransientLocalResourceFactoryProvider implements ILocalResourceFactoryProvider {
+    
+    private static final long serialVersionUID = 1L;
 
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
-
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+    @Override
+    public ILocalResourceFactory getLocalResourceFactory() {
+        return new TransientLocalResourceFactory();
+    }
 }
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepository.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepository.java
new file mode 100644
index 0000000..55bd807
--- /dev/null
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepository.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2009-2012 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.storage.common.file;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+
+public class TransientLocalResourceRepository implements ILocalResourceRepository {
+
+    private Map<String, LocalResource> name2ResourceMap = new HashMap<String, LocalResource>();
+    private Map<Long, LocalResource> id2ResourceMap = new HashMap<Long, LocalResource>();
+
+    @Override
+    public LocalResource getResourceById(long id) throws HyracksDataException {
+        return id2ResourceMap.get(id);
+    }
+
+    @Override
+    public LocalResource getResourceByName(String name) throws HyracksDataException {
+        return name2ResourceMap.get(name);
+    }
+
+    @Override
+    public synchronized void insert(LocalResource resource) throws HyracksDataException {
+        long id = resource.getResourceId();
+
+        if (id2ResourceMap.containsKey(id)) {
+            throw new HyracksDataException("Duplicate resource");
+        }
+        id2ResourceMap.put(id, resource);
+        name2ResourceMap.put(resource.getResourceName(), resource);
+    }
+
+    @Override
+    public synchronized void deleteResourceById(long id) throws HyracksDataException {
+        LocalResource resource = id2ResourceMap.get(id);
+        if (resource == null) {
+            throw new HyracksDataException("Resource doesn't exist");
+        }
+        id2ResourceMap.remove(id);
+        name2ResourceMap.remove(resource.getResourceName());
+    }
+
+    @Override
+    public synchronized void deleteResourceByName(String name) throws HyracksDataException {
+        LocalResource resource = name2ResourceMap.get(name);
+        if (resource == null) {
+            throw new HyracksDataException("Resource doesn't exist");
+        }
+        id2ResourceMap.remove(resource.getResourceId());
+        name2ResourceMap.remove(name);
+    }
+
+    @Override
+    public List<LocalResource> getAllResources() throws HyracksDataException {
+        List<LocalResource> resources = new ArrayList<LocalResource>();
+        for (LocalResource resource : id2ResourceMap.values()) {
+            resources.add(resource);
+        }
+        return resources;
+    }
+}
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepositoryFactory.java
similarity index 68%
copy from hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
copy to hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepositoryFactory.java
index 16e249e..a6b00a4 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResource.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/TransientLocalResourceRepositoryFactory.java
@@ -14,14 +14,12 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.io.Serializable;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
-public interface ILocalResource extends Serializable {
-    public long getResourceId();
+public class TransientLocalResourceRepositoryFactory implements ILocalResourceRepositoryFactory {
 
-    public String getResourceName();
-
-    public Object getResourceObject();
-
-    public ILocalResourceClass getResourceClass();
+    @Override
+    public ILocalResourceRepository createRepository() throws HyracksDataException {
+        return new TransientLocalResourceRepository();
+    }
 }
diff --git a/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerComponentHolder.java b/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerComponentHolder.java
index 791eb84..b704bf5 100644
--- a/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerComponentHolder.java
+++ b/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerComponentHolder.java
@@ -35,8 +35,10 @@
 import edu.uci.ics.hyracks.storage.common.file.IFileMapProvider;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepositoryFactory;
-import edu.uci.ics.hyracks.storage.common.file.IndexLocalResourceRepositoryFactory;
+import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactory;
+import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactoryProvider;
 import edu.uci.ics.hyracks.storage.common.file.TransientFileMapManager;
+import edu.uci.ics.hyracks.storage.common.file.TransientLocalResourceRepositoryFactory;
 
 public class TestStorageManagerComponentHolder {
     private static IBufferCache bufferCache;
@@ -44,6 +46,7 @@
     private static IOManager ioManager;
     private static ILocalResourceRepository localResourceRepository;
     private static IIndexLifecycleManager lcManager;
+    private static ResourceIdFactory resourceIdFactory;
 
     private static int pageSize;
     private static int numPages;
@@ -96,9 +99,8 @@
     public synchronized static ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx) {
         if (localResourceRepository == null) {
             try {
-                ILocalResourceRepositoryFactory indexLocalResourceRepositoryFactory = new IndexLocalResourceRepositoryFactory(
-                        getIOManager());
-                localResourceRepository = indexLocalResourceRepositoryFactory.createRepository();
+                ILocalResourceRepositoryFactory localResourceRepositoryFactory = new TransientLocalResourceRepositoryFactory();
+                localResourceRepository = localResourceRepositoryFactory.createRepository();
             } catch (HyracksException e) {
                 //In order not to change the IStorageManagerInterface due to the test code, throw runtime exception.
                 throw new IllegalArgumentException();
@@ -106,4 +108,18 @@
         }
         return localResourceRepository;
     }
+
+    public synchronized static ResourceIdFactory getResourceIdFactory(IHyracksTaskContext ctx) {
+        if (resourceIdFactory == null) {
+            try {
+                ResourceIdFactoryProvider resourceIdFactoryFactory = new ResourceIdFactoryProvider(
+                        getLocalResourceRepository(ctx));
+                resourceIdFactory = resourceIdFactoryFactory.createResourceIdFactory();
+            } catch (HyracksException e) {
+                //In order not to change the IStorageManagerInterface due to the test code, throw runtime exception.
+                throw new IllegalArgumentException();
+            }
+        }
+        return resourceIdFactory;
+    }
 }
\ No newline at end of file
diff --git a/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerInterface.java b/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerInterface.java
index a01ac97..26c7861 100644
--- a/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerInterface.java
+++ b/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/test/support/TestStorageManagerInterface.java
@@ -20,6 +20,7 @@
 import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
 import edu.uci.ics.hyracks.storage.common.file.IFileMapProvider;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
+import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactory;
 
 public class TestStorageManagerInterface implements IStorageManagerInterface {
     private static final long serialVersionUID = 1L;
@@ -38,4 +39,9 @@
     public ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx) {
         return TestStorageManagerComponentHolder.getLocalResourceRepository(ctx);
     }
+
+	@Override
+	public ResourceIdFactory getResourceIdFactory(IHyracksTaskContext ctx) {
+		return TestStorageManagerComponentHolder.getResourceIdFactory(ctx);
+	}
 }
\ No newline at end of file
