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 a0f2ff0..b37368e 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
@@ -17,6 +17,7 @@
 
 import edu.uci.ics.hyracks.api.application.INCApplicationContext;
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+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;
@@ -29,21 +30,25 @@
 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.TransientFileMapManager;
 
 public class RuntimeContext {
     private IBufferCache bufferCache;
     private IFileMapManager fileMapManager;
-    private IIndexArtifactMap indexArtifactMap;
+    private ILocalResourceRepository localResourceRepository;
     private IIndexLifecycleManager lcManager;
 
-    public RuntimeContext(INCApplicationContext appCtx) {
+    public RuntimeContext(INCApplicationContext appCtx) throws HyracksDataException {
         fileMapManager = new TransientFileMapManager();
         ICacheMemoryAllocator allocator = new HeapBufferAllocator();
         IPageReplacementStrategy prs = new ClockPageReplacementStrategy();
         bufferCache = new BufferCache(appCtx.getRootContext().getIOManager(), allocator, prs, fileMapManager, 32768,
                 50, 100);
-        indexArtifactMap = new TransientIndexArtifactMap();
+        ILocalResourceRepositoryFactory indexLocalResourceRepositoryFactory = new IndexLocalResourceRepositoryFactory(appCtx.getRootContext().getIOManager());
+        localResourceRepository = indexLocalResourceRepositoryFactory.createRepository();  
         lcManager = new IndexLifecycleManager();
     }
 
@@ -63,8 +68,8 @@
         return (RuntimeContext) ctx.getJobletContext().getApplicationContext().getApplicationObject();
     }
 
-    public IIndexArtifactMap getIndexArtifactMap() {
-        return indexArtifactMap;
+    public ILocalResourceRepository getLocalResourceRepository() {
+        return localResourceRepository;
     }
 
     public IIndexLifecycleManager getIndexLifecycleManager() {
diff --git a/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/StorageManagerInterface.java b/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/StorageManagerInterface.java
index a1e94d2..953f7c1 100644
--- a/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/StorageManagerInterface.java
+++ b/hyracks-examples/btree-example/btreehelper/src/main/java/edu/uci/ics/hyracks/examples/btree/helper/StorageManagerInterface.java
@@ -19,7 +19,7 @@
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
 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.IIndexArtifactMap;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 
 public class StorageManagerInterface implements IStorageManagerInterface {
     private static final long serialVersionUID = 1L;
@@ -40,7 +40,7 @@
     }
     
     @Override
-    public IIndexArtifactMap getIndexArtifactMap(IHyracksTaskContext ctx) {
-        return RuntimeContext.get(ctx).getIndexArtifactMap();
+    public ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx) {
+        return RuntimeContext.get(ctx).getLocalResourceRepository();
     }
 }
\ No newline at end of file
diff --git a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/api/IIndexDataflowHelper.java b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/api/IIndexDataflowHelper.java
index 9a43ea9..39b4553 100644
--- a/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/api/IIndexDataflowHelper.java
+++ b/hyracks-storage-am-common/src/main/java/edu/uci/ics/hyracks/storage/am/common/api/IIndexDataflowHelper.java
@@ -17,7 +17,7 @@
 
     public FileReference getFileReference();
 
-    public long getResourceID();
+    public long getResourceID() throws HyracksDataException;
     
     public IHyracksTaskContext getTaskContext();
 }
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 4d0905e..3cdba2f 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,14 +23,16 @@
 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.IIndexArtifactMap;
+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.LSMBTreeLocalResourceClass;
 
 public abstract class IndexDataflowHelper implements IIndexDataflowHelper {
 
     protected final IIndexOperatorDescriptor opDesc;
     protected final IHyracksTaskContext ctx;
     protected final IIndexLifecycleManager lcManager;
-    protected final IIndexArtifactMap indexArtifactMap;
+    protected final ILocalResourceRepository localResourceRepository;
     protected final FileReference file;
 
     protected IIndex index;
@@ -39,7 +41,7 @@
         this.opDesc = opDesc;
         this.ctx = ctx;
         this.lcManager = opDesc.getLifecycleManagerProvider().getLifecycleManager(ctx);
-        this.indexArtifactMap = opDesc.getStorageManager().getIndexArtifactMap(ctx);
+        this.localResourceRepository = opDesc.getStorageManager().getLocalResourceRepository(ctx);
         this.file = opDesc.getFileSplitProvider().getFileSplits()[partition].getLocalFile();
     }
 
@@ -63,11 +65,12 @@
             // any physical artifact that the IIndexArtifactMap 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) {
-                indexArtifactMap.delete(file.getFile().getPath(), ctx.getIOManager().getIODevices());
+                localResourceRepository.deleteResourceByName(file.getFile().getPath());
             }
             index.create();
             try {
-                resourceID = indexArtifactMap.create(file.getFile().getPath(), ctx.getIOManager().getIODevices());
+                //TODO Create ResourceIdFactory and LocalResourceFactory
+                localResourceRepository.insert(new IndexLocalResource(resourceID, file.getFile().getPath(), object, resourceClass));
             } catch (IOException e) {
                 throw new HyracksDataException(e);
             }
@@ -92,7 +95,7 @@
         }
     }
 
-    public void close() {
+    public void close() throws HyracksDataException {
         synchronized (lcManager) {
             lcManager.close(getResourceID());
         }
@@ -109,7 +112,7 @@
             }
 
             if (resourceID != -1) {
-                indexArtifactMap.delete(file.getFile().getPath(), ctx.getIOManager().getIODevices());
+                localResourceRepository.deleteResourceByName(file.getFile().getPath());
             }
             index.destroy();
         }
@@ -119,8 +122,8 @@
         return file;
     }
 
-    public long getResourceID() {
-        return indexArtifactMap.get(file.getFile().getPath());
+    public long getResourceID() throws HyracksDataException {
+        return localResourceRepository.getResourceByName(file.getFile().getPath()).getResourceId();
     }
     
     public IHyracksTaskContext getTaskContext() {
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/IStorageManagerInterface.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/IStorageManagerInterface.java
index aae9d67..9e3616a 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/IStorageManagerInterface.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/IStorageManagerInterface.java
@@ -20,11 +20,12 @@
 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.IIndexArtifactMap;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 
 public interface IStorageManagerInterface extends Serializable {
 	public IBufferCache getBufferCache(IHyracksTaskContext ctx);
 
 	public IFileMapProvider getFileMapProvider(IHyracksTaskContext ctx);
 
-	public IIndexArtifactMap getIndexArtifactMap(IHyracksTaskContext ctx);
+	public ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx);
 }
\ No newline at end of file
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepositoryFactory.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepositoryFactory.java
index 6fd4b2c..4b3124a 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepositoryFactory.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/ILocalResourceRepositoryFactory.java
@@ -14,8 +14,8 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
-import java.util.List;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
 public interface ILocalResourceRepositoryFactory {
-    public ILocalResourceRepository createRepository();
+    public ILocalResourceRepository createRepository() throws HyracksDataException;
 }
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/IndexLocalResource.java
index b5babd5..f5dfca8 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/IndexLocalResource.java
@@ -47,5 +47,4 @@
     public ILocalResourceClass getResourceClass() {
         return resourceClass;
     }
-
 }
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/IndexLocalResourceRepository.java
index 6934124..9090aad 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/IndexLocalResourceRepository.java
@@ -33,7 +33,6 @@
 
     private final List<ILocalResourceClass> resourceClasses;
     private final List<String> mountPoints;
-    private final String rootDir;
     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>();
@@ -42,7 +41,6 @@
             String rootDir) throws HyracksDataException {
         this.resourceClasses = resourceClasses;
         this.mountPoints = mountPoints;
-        this.rootDir = rootDir;
 
         File rootFile = new File(this.mountPoints.get(0), rootDir);
         if (!rootFile.exists()) {
@@ -59,9 +57,8 @@
             }
         };
 
-        String[] fileNameList = rootFile.list();
-        for (String fileName : fileNameList) {
-            File childFile = new File(rootFile, fileName);
+        File[] childFileList = rootFile.listFiles();
+        for (File childFile : childFileList) {
             if (childFile.isDirectory()) {
                 File[] targetFileList = childFile.listFiles(filter);
                 for (File targetFile : targetFileList) {
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/IndexLocalResourceRepositoryFactory.java
index 4125d85..4707361 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/IndexLocalResourceRepositoryFactory.java
@@ -14,12 +14,33 @@
  */
 package edu.uci.ics.hyracks.storage.common.file;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.api.io.IIOManager;
+import edu.uci.ics.hyracks.api.io.IODeviceHandle;
+
 public class IndexLocalResourceRepositoryFactory implements ILocalResourceRepositoryFactory {
-
-    @Override
-    public ILocalResourceRepository createRepository() {
-        // TODO Auto-generated method stub
-        return null;
+    private static final String rootDir = "";
+    private IIOManager ioManager;
+    
+    public IndexLocalResourceRepositoryFactory(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);
+    }
 }
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 ea7b453..791eb84 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
@@ -25,7 +25,6 @@
 import edu.uci.ics.hyracks.control.nc.io.IOManager;
 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;
@@ -34,14 +33,16 @@
 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.TransientFileMapManager;
 
 public class TestStorageManagerComponentHolder {
     private static IBufferCache bufferCache;
     private static IFileMapProvider fileMapProvider;
     private static IOManager ioManager;
-    private static IIndexArtifactMap indexArtifactMap;
+    private static ILocalResourceRepository localResourceRepository;
     private static IIndexLifecycleManager lcManager;
 
     private static int pageSize;
@@ -54,7 +55,7 @@
         TestStorageManagerComponentHolder.maxOpenFiles = maxOpenFiles;
         bufferCache = null;
         fileMapProvider = null;
-        indexArtifactMap = null;
+        localResourceRepository = null;
         lcManager = null;
     }
 
@@ -92,10 +93,17 @@
         return ioManager;
     }
 
-    public synchronized static IIndexArtifactMap getIndexArtifactMap(IHyracksTaskContext ctx) {
-        if (indexArtifactMap == null) {
-            indexArtifactMap = new TransientIndexArtifactMap();
+    public synchronized static ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx) {
+        if (localResourceRepository == null) {
+            try {
+                ILocalResourceRepositoryFactory indexLocalResourceRepositoryFactory = new IndexLocalResourceRepositoryFactory(
+                        getIOManager());
+                localResourceRepository = indexLocalResourceRepositoryFactory.createRepository();
+            } catch (HyracksException e) {
+                //In order not to change the IStorageManagerInterface due to the test code, throw runtime exception.
+                throw new IllegalArgumentException();
+            }
         }
-        return indexArtifactMap;
+        return localResourceRepository;
     }
 }
\ 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 3ee93a4..a01ac97 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
@@ -15,10 +15,11 @@
 package edu.uci.ics.hyracks.test.support;
 
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+import edu.uci.ics.hyracks.api.exceptions.HyracksException;
 import edu.uci.ics.hyracks.storage.common.IStorageManagerInterface;
 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.IIndexArtifactMap;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 
 public class TestStorageManagerInterface implements IStorageManagerInterface {
     private static final long serialVersionUID = 1L;
@@ -34,7 +35,7 @@
     }
 
     @Override
-    public IIndexArtifactMap getIndexArtifactMap(IHyracksTaskContext ctx) {
-        return TestStorageManagerComponentHolder.getIndexArtifactMap(ctx);
+    public ILocalResourceRepository getLocalResourceRepository(IHyracksTaskContext ctx) {
+        return TestStorageManagerComponentHolder.getLocalResourceRepository(ctx);
     }
 }
\ No newline at end of file
