make dim files mmapped (#49272)

This change mmaps dim files in HybridDirectory to take advantage of off-
heap BKD trees. This is based off of (#48509) via 
(https://issues.apache.org/jira/browse/LUCENE-8932).
This commit is contained in:
Jack Conradson 2019-11-19 08:32:15 -08:00
parent 2f5acae4a9
commit 14d2e795ae
2 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,7 @@ public class FsDirectoryFactory implements IndexStorePlugin.DirectoryFactory {
case "tim":
case "tip":
case "cfs":
case "dim":
return true;
default:
return false;

View File

@ -63,6 +63,7 @@ public class FsDirectoryFactoryTests extends ESTestCase {
assertTrue(hybridDirectory.useDelegate("foo.tim"));
assertTrue(hybridDirectory.useDelegate("foo.tip"));
assertTrue(hybridDirectory.useDelegate("foo.cfs"));
assertTrue(hybridDirectory.useDelegate("foo.dim"));
assertFalse(hybridDirectory.useDelegate("foo.bar"));
MMapDirectory delegate = hybridDirectory.getDelegate();
assertThat(delegate, Matchers.instanceOf(FsDirectoryFactory.PreLoadMMapDirectory.class));