From 67feee3cd621cd12ac8257b71a5867a940f0d244 Mon Sep 17 00:00:00 2001 From: Eric Tschetter Date: Wed, 23 Jan 2013 18:36:52 -0600 Subject: [PATCH] 1) Indexes don't always have an index.drd file anymore --- .../druid/loading/MMappedQueryableIndexFactory.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java b/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java index 9e71e3aeb04..648813d62ac 100644 --- a/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java +++ b/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java @@ -36,11 +36,6 @@ public class MMappedQueryableIndexFactory implements QueryableIndexFactory @Override public QueryableIndex factorize(File parentDir) throws StorageAdapterLoadingException { - File indexFile = new File(parentDir, "index.drd"); - if (!indexFile.exists()) { - throw new StorageAdapterLoadingException("indexFile[%s] does not exist.", indexFile); - } - try { if (! IndexIO.canBeMapped(parentDir)) { File canBeMappedDir = new File(parentDir, "forTheMapping"); @@ -55,7 +50,7 @@ public class MMappedQueryableIndexFactory implements QueryableIndexFactory } for (File file : canBeMappedDir.listFiles()) { if (! file.renameTo(new File(parentDir, file.getName()))) { - throw new StorageAdapterLoadingException("Couldn't rename[%s] to [%s]", canBeMappedDir, indexFile); + throw new StorageAdapterLoadingException("Couldn't rename[%s] to [%s]", canBeMappedDir, parentDir); } } FileUtils.deleteDirectory(canBeMappedDir); @@ -64,7 +59,7 @@ public class MMappedQueryableIndexFactory implements QueryableIndexFactory return IndexIO.loadIndex(parentDir); } catch (IOException e) { - log.warn(e, "Got exception, deleting index[%s]", indexFile); + log.warn(e, "Got exception, deleting parentDir[%s]", parentDir); try { FileUtils.deleteDirectory(parentDir); }