use of io.datarouter.filesystem.snapshot.cache.MemoryBlockCache in project datarouter by hotpads.
the class BaseSnapshotTests method beforeClass.
@BeforeClass
public void beforeClass() {
var wordId = new AtomicLong();
sortedInputs = Scanner.of(getInputs()).map(str -> str.getBytes(StandardCharsets.UTF_8)).map(BaseSnapshotTests::makeEntry).map(entry -> new Input(wordId.getAndIncrement(), entry)).list();
Require.equals(sortedInputs.get(0).entry.columnValues.length, NUM_COLUMNS);
randomInputs = Scanner.of(sortedInputs).shuffle().list();
exec = Executors.newFixedThreadPool(getNumThreads());
scanExec = Executors.newFixedThreadPool(getNumThreads());
snapshotKey = writeSnapshot();
sharedMemoryCache = new MemoryBlockCache(64 * 1024 * 1024, getGroup());
}
Aggregations