public AbstractIndexTestWorker(DataGenThread dataGen, TestOperationSelector opSelector, IIndex index, int numBatches) throws HyracksDataException { this.dataGen = dataGen; this.opSelector = opSelector; this.numBatches = numBatches; this.rnd = new Random(); IndexAccessParameters actx = new IndexAccessParameters(TestOperationCallback.INSTANCE, TestOperationCallback.INSTANCE); this.indexAccessor = index.createAccessor(actx); }
@Test(expected = HyracksDataException.class) public void invalidSequenceTest2() throws Exception { index.create(); index.activate(); try { index.destroy(); } finally { index.deactivate(); index.destroy(); } }
protected void initializeBulkLoader() throws HyracksDataException { bulkLoader = index.createBulkLoader(fillFactor, verifyInput, numElementsHint, checkIfEmptyIndex); } }
public void tearDown() throws Exception { index.deactivate(); index.destroy(); } }
harness.getIOScheduler(), harness.getIOOperationCallbackFactory(), harness.getMetadataPageManagerFactory(), false, true, false); ctx.getIndex().create(); ctx.getIndex().activate(); Assert.assertEquals("Check disk components", 1, btree.getDiskComponents().size()); ctx.getIndex().deactivate(); ctx.getIndex().activate(); Assert.assertEquals("Check bloom filter file deleted", false, bloomFilterFile.exists()); Assert.assertEquals("Check disk components", 0, btree.getDiskComponents().size());
insertIntTupleRange(151, 200); index.deactivate(); index.activate();
@Override public void stop(boolean dumpState, OutputStream outputStream) throws IOException { if (dumpState) { dumpState(outputStream); } for (IndexInfo i : indexInfos.values()) { if (i.isOpen) { i.index.deactivate(); } } }
int numIndexFilterFields = index.getNumOfFilterFields(); nonFilterTupleBuild = new ArrayTupleBuilder(numIndexFilterFields); buildMissingTuple(numIndexFilterFields, nonFilterTupleBuild, nonMatchWriter); IIndexAccessParameters iap = new IndexAccessParameters(NoOpOperationCallback.INSTANCE, searchCallback); addAdditionalIndexAccessorParams(iap); indexAccessor = index.createAccessor(iap); cursor = createCursor(); if (retainInput) {
@Override public void destroy() throws HyracksDataException { getIndex().destroy(); }
@Override public void validate() throws HyracksDataException { getIndex().validate(); }
@Override public void open(String resourcePath) throws HyracksDataException { IndexInfo info = indexInfos.get(resourcePath); if (info == null) { throw new HyracksDataException( "Failed to open index with resource name " + resourcePath + " since it does not exist."); } if (!info.isOpen) { allocateMemory(resourcePath); info.index.activate(); info.isOpen = true; } info.touch(); }
@Test(expected = HyracksDataException.class) public void invalidSequenceTest4() throws Exception { index.clear(); }
public void deinit() throws HyracksDataException { index.deactivate(); index.destroy(); }
@Override public void deactivate() throws HyracksDataException { getIndex().deactivate(); }
@Override public void destroy() throws HyracksDataException { LOGGER.log(Level.INFO, "Dropping index " + resourceRef.getRelativePath() + " on node " + ctx.getNodeId()); synchronized (lcManager) { index = lcManager.get(resourceRef.getRelativePath()); if (index != null) { lcManager.unregister(resourceRef.getRelativePath()); } else { readIndex(); } if (getResourceId() != -1) { localResourceRepository.delete(resourceRef.getRelativePath()); } index.destroy(); } }