@Override public void close() throws BackendException { store.close(); } }
@Override public void close() throws BackendException { store.close(); }
@Override public void close() throws BackendException { idStore.close(); }
@Override public void close() throws BackendException { backend.close(); }
public void close() throws BackendException { if (tx != null) tx.commit(); if (null != store) store.close(); if (null != manager) manager.close(); }
public void close() throws BackendException { //Interrupt running jobs for (StandardScannerExecutor exe : runningJobs.values()) { if (exe.isCancelled() || exe.isDone()) continue; exe.cancel(true); } for (KeyColumnValueStore kcvs : openStores) kcvs.close(); }
/** * Closes the log by terminating all threads and waiting for their termination. * * @throws org.janusgraph.diskstorage.BackendException */ @Override public synchronized void close() throws BackendException { if (!isOpen) return; this.isOpen = false; if (readExecutor!=null) readExecutor.shutdown(); if (sendThread!=null) sendThread.close(CLOSE_DOWN_WAIT); if (readExecutor!=null) { try { readExecutor.awaitTermination(1,TimeUnit.SECONDS); } catch (InterruptedException e) { log.error("Could not terminate reader thread pool for KCVSLog "+name+" due to interruption"); } if (!readExecutor.isTerminated()) { readExecutor.shutdownNow(); log.error("Reader thread pool for KCVSLog "+name+" did not shut down in time - could not clean up or set read markers"); } else { for (MessagePuller puller : msgPullers) { puller.close(); } } } writeSetting(manager.senderId, MESSAGE_COUNTER_COLUMN, numMsgCounter.get()); store.close(); manager.closedLog(this); }
public void close() throws BackendException { for (int i = 0; i < CONCURRENCY; i++) { store[i].close(); for (int j = 0; j < NUM_TX; j++) { log.debug("Committing tx[{}][{}] = {}", i, j, tx[i][j]); if (tx[i][j] != null) tx[i][j].commit(); } manager[i].close(); } LocalLockMediators.INSTANCE.clear(); }
@Override public void close() { try { store.close(); txProvider.close(); IOUtils.closeQuietly(serializer); } catch (BackendException e) { throw new JanusGraphException("Could not close configuration store",e); } }
public void testDataSequential() throws Exception { loadData(200000,2); close(); KeyColumnValueStoreManager manager = openStorageManager(); KeyColumnValueStore store = manager.openDatabase(Backend.EDGESTORE_NAME); SliceQuery query = new SliceQuery(BufferUtil.zeroBuffer(8),BufferUtil.oneBuffer(8)); query.setLimit(2); Stopwatch watch = Stopwatch.createStarted(); StoreTransaction txh = manager.beginTransaction(StandardBaseTransactionConfig.of(TimestampProviders.MILLI)); KeyIterator iterator = store.getKeys(query,txh); int numV = 0; while(iterator.hasNext()) { iterator.next(); RecordIterator<Entry> entries = iterator.getEntries(); assertEquals(2, Iterators.size(entries)); numV++; } iterator.close(); txh.commit(); System.out.println("Time taken: " + watch.elapsed(TimeUnit.MILLISECONDS)); System.out.println("Num Vertices: " + numV); store.close(); manager.close(); }
Assert.assertEquals(0, results.size()); // should be empty if TTL was applied properly storeWithTTL.close();