/** {@inheritDoc} */ @Override public void close() throws IOException { ResourceUtils.closeOrLog(mCurrentPagedFijiRowDataWritable); ResourceUtils.closeOrLog(mScanner); ResourceUtils.closeOrLog(mFijiTableReader); ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); }
/** * Close all underlying resources. */ @Override public void close() { ResourceUtils.closeOrLog(mConsoleReader); } }
/** {@inheritDoc} */ @Override protected void cleanup() throws IOException { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); mTableURI = null; mTable = null; mFiji = null; }
/** {@inheritDoc} */ @Override public void close() throws IOException { if (mIsOpen.compareAndSet(true, false)) { for (FijiPager pager : mFijiQualifierPagers.values()) { ResourceUtils.closeOrLog(pager); } for (FijiPager pager : mFijiCellPagers.values()) { ResourceUtils.closeOrLog(pager); } } }
/** {@inheritDoc} */ @Override public void close() throws IOException { ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); } }
@Override public void close(boolean abort) throws IOException { ResourceUtils.closeOrLog(mFijiTableWriter); ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); }
@Override /** {@inheritDoc} */ public void close() throws IOException { Preconditions.checkState( mState.compareAndSet(State.STARTED, State.CLOSED), "TableLayoutMonitor is not started."); ResourceUtils.closeOrLog(mUserRegistration); ResourceUtils.closeOrLog(mTableLayoutTracker); mLayout.set(null); mConsumers.clear(); }
/** {@inheritDoc} */ @Override protected void cleanup() { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); }
/** {@inheritDoc} */ @Override public void close() throws IOException { ResourceUtils.closeOrLog(mScanner); ResourceUtils.closeOrLog(mReader); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); mIterator = null; mScanner = null; mReader = null; mTable = null; mFiji = null; mSplit = null; mCurrentRow = null; } }
/** {@inheritDoc} */ @Override public synchronized void stop() throws Exception { Preconditions.checkState(mState.compareAndSet(State.STARTED, State.STOPPED), "Can not stop in state %s.", mState.get()); LOG.info("Stopping ManagedFijiClient."); ResourceUtils.closeOrLog(mZKInstances); ResourceUtils.closeOrLog(mZKFramework); mInstanceCaches.invalidateAll(); mInstanceCaches.cleanUp(); }
/** * Releases the underlying connection to the Fiji table. */ public void releaseUnderlyingFijiTable() { ResourceUtils.releaseOrLog(mTable); }
/** {@inheritDoc} */ @Override public void close() throws IOException { ResourceUtils.closeOrLog(mScanner); ResourceUtils.closeOrLog(mReader); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); mIterator = null; mScanner = null; mReader = null; mTable = null; mFiji = null; mSplit = null; mCurrentRow = null; } }
/** {@inheritDoc} */ @Override public synchronized void close() throws IOException { flush(); final State oldState = mState.getAndSet(State.CLOSED); Preconditions.checkState(oldState == State.OPEN, "Cannot close SchemaTable instance in state %s.", oldState); ResourceTracker.get().unregisterResource(this); ResourceUtils.closeOrLog(mSchemaHashTable); ResourceUtils.closeOrLog(mSchemaIdTable); ResourceUtils.closeOrLog(mZKLock); ResourceUtils.closeOrLog(mZKClient); }
/** {@inheritDoc} */ @Override public synchronized void close() throws IOException { while (!mConnections.isEmpty()) { ResourceUtils.releaseOrLog(mConnections.remove().mTable); } } }
/** {@inheritDoc} */ @Override public void close() throws IOException { ResourceUtils.closeOrLog(mScanner); ResourceUtils.closeOrLog(mReader); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); mIterator = null; mScanner = null; mReader = null; mTable = null; mFiji = null; mSplit = null; mCurrentRow = null; } }
/** * Releases all the resources used by this Fiji instance. * * @throws java.io.IOException on I/O error. */ private void close() throws IOException { final State oldState = mState.getAndSet(State.CLOSED); Preconditions.checkState(oldState == State.OPEN || oldState == State.UNINITIALIZED, "Cannot close Fiji instance %s in state %s.", this, oldState); LOG.debug("Closing {}.", this); ResourceUtils.closeOrLog(mInstanceMonitor); ResourceUtils.closeOrLog(mMetaTable); ResourceUtils.closeOrLog(mSystemTable); ResourceUtils.closeOrLog(mSchemaTable); ResourceUtils.closeOrLog(mAdmin); synchronized (this) { ResourceUtils.closeOrLog(mSecurityManager); } ResourceUtils.closeOrLog(mZKClient); if (oldState != State.UNINITIALIZED) { ResourceTracker.get().unregisterResource(this); } LOG.debug("{} closed.", this); }
/** {@inheritDoc} */ @Override protected void cleanup() throws IOException { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(); }
/** {@inheritDoc} */ @Override protected void cleanup(Context hadoopContext) throws IOException, InterruptedException { ResourceUtils.closeOrLog(mTableWriter); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(hadoopContext); } }
/** * Loads fiji schema properties. * * @return the Fiji schema properties. * @throws IOException on I/O error. */ private static Properties loadFijiSchemaProperties() throws IOException { final InputStream istream = VersionInfo.class.getClassLoader().getResourceAsStream(FIJI_SCHEMA_PROPERTIES_RESOURCE); try { final Properties properties = new Properties(); properties.load(istream); return properties; } finally { ResourceUtils.closeOrLog(istream); } }
/** {@inheritDoc} */ @Override protected void cleanup() throws IOException { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(); }