@Before public void setupPagedFile() throws IOException { PageCache pageCache = pageCacheRule .getPageCache( fileSystemRule.get(), config().withPageSize( PAGE_SIZE ).withAccessChecks( true ) ); pagedFile = pageCache .map( testDirectory.file( FILE_NAME ), PAGE_SIZE, CREATE, DELETE_ON_CLOSE ); }
private GBPTree<KEY,VALUE> createIndex() throws IOException { // some random padding layout = getLayout( random ); PageCache pageCache = pageCacheRule.getPageCache( fs.get(), config().withPageSize( 512 ).withAccessChecks( true ) ); return index = new GBPTreeBuilder<>( pageCache, directory.file( "index" ), layout ).build(); }
private GBPTree<RawBytes,RawBytes> createIndex( Layout<RawBytes,RawBytes> layout ) throws IOException { // some random padding PageCache pageCache = storage.pageCacheRule().getPageCache( storage.fileSystem(), config().withAccessChecks( true ) ); return new GBPTreeBuilder<>( pageCache, storage.directory().file( "index" ), layout ).build(); } }
private GBPTree<KEY,VALUE> createIndex() throws IOException { int pageSize = 512; layout = getLayout( random ); PageCache pageCache = pageCacheRule.getPageCache( fs.get(), config().withPageSize( pageSize ).withAccessChecks( true ) ); return index = new GBPTreeBuilder<>( pageCache, directory.file( "index" ), layout ).build(); }