/** {@inheritDoc} */ @Override protected void cleanup() { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); }
/** * Releases the underlying connection to the Fiji table. */ public void releaseUnderlyingFijiTable() { ResourceUtils.releaseOrLog(mTable); }
/** {@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 { ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); } }
/** {@inheritDoc} */ @Override protected void cleanup() throws IOException { ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(); }
@Override public void close(boolean abort) throws IOException { ResourceUtils.closeOrLog(mFijiTableWriter); ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); }
/** {@inheritDoc} */ @Override public synchronized void close() throws IOException { while (!mConnections.isEmpty()) { ResourceUtils.releaseOrLog(mConnections.remove().mTable); } } }
/** {@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); } }
/** {@inheritDoc} */ @Override protected void cleanup(Context hadoopContext) throws IOException, InterruptedException { // Safely free up resources by closing in reverse order. ResourceUtils.closeOrLog(mWriter); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(hadoopContext); } }
/** {@inheritDoc} */ @Override protected void cleanup() throws IOException { ResourceUtils.releaseOrLog(mFiji); mFiji = null; super.cleanup(); }
@Override public void close() throws IOException { ResourceUtils.closeOrLog(mReader); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.close(); } }
/** {@inheritDoc} */ @Override protected void cleanup(Context hadoopContext) throws IOException, InterruptedException { ResourceUtils.closeOrLog(mWriter); ResourceUtils.releaseOrLog(mTable); ResourceUtils.releaseOrLog(mFiji); super.cleanup(hadoopContext); } }
/** {@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 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 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 void close() throws IOException { ResourceUtils.closeOrLog(mCurrentPagedFijiRowDataWritable); ResourceUtils.closeOrLog(mScanner); ResourceUtils.closeOrLog(mFijiTableReader); ResourceUtils.releaseOrLog(mFijiTable); ResourceUtils.releaseOrLog(mFiji); }
/** * Releases the resources used by this table. * * @throws java.io.IOException on I/O error. */ private void closeResources() throws IOException { final State oldState = mState.getAndSet(State.CLOSED); Preconditions.checkState(oldState == State.OPEN, "Cannot close FijiTable instance %s in state %s.", this, oldState); LOG.debug("Closing CassandraFijiTable '{}'.", this); ResourceUtils.releaseOrLog(mFiji); if (oldState != State.UNINITIALIZED) { ResourceTracker.get().unregisterResource(this); } // Relinquish strong reference to the TableLayoutMonitor in case the user keeps their reference // to this FijiTable. mLayoutMonitor = null; LOG.debug("CassandraFijiTable '{}' closed.", mTableURI); }
/** * Releases the resources used by this table. * * @throws IOException on I/O error. */ private void closeResources() throws IOException { final State oldState = mState.getAndSet(State.CLOSED); Preconditions.checkState(oldState == State.OPEN || oldState == State.UNINITIALIZED, "Cannot close FijiTable instance %s in state %s.", this, oldState); LOG.debug("Closing HBaseFijiTable '{}'.", this); ResourceUtils.closeOrLog(mHConnection); ResourceUtils.closeOrLog(mLayoutMonitor); ResourceUtils.releaseOrLog(mFiji); if (oldState != State.UNINITIALIZED) { ResourceTracker.get().unregisterResource(this); } LOG.debug("HBaseFijiTable '{}' closed.", mTableURI); }
/** {@inheritDoc} */ @Override protected void configureJob(Job job) throws IOException { // Configure the input, mapper, combiner, and reducer, output. super.configureJob(job); // Validate the Fiji data request against the current table layout: Preconditions.checkNotNull(mInputTableURI, "Input Fiji table was never set."); final Fiji fiji = Fiji.Factory.open(mInputTableURI, getConf()); try { final FijiTable table = fiji.openTable(mInputTableURI.getTable()); try { validateInputTable(table); } finally { ResourceUtils.releaseOrLog(table); } } finally { ResourceUtils.releaseOrLog(fiji); } }