congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResourceUtils.releaseOrLog
Code IndexAdd Tabnine to your IDE (free)

How to use
releaseOrLog
method
in
com.moz.fiji.schema.util.ResourceUtils

Best Java code snippets using com.moz.fiji.schema.util.ResourceUtils.releaseOrLog (Showing top 20 results out of 315)

origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
protected void cleanup() {
 ResourceUtils.releaseOrLog(mTable);
 ResourceUtils.releaseOrLog(mFiji);
}
origin: com.moz.fiji.schema/fiji-schema

/**
 * Releases the underlying connection to the Fiji table.
 */
public void releaseUnderlyingFijiTable() {
 ResourceUtils.releaseOrLog(mTable);
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
protected void cleanup() throws IOException {
 ResourceUtils.releaseOrLog(mTable);
 ResourceUtils.releaseOrLog(mFiji);
 mTableURI = null;
 mTable = null;
 mFiji = null;
}
origin: com.moz.fiji.hive/fiji-hive-lib

 /** {@inheritDoc} */
 @Override
 public void close() throws IOException {
  ResourceUtils.releaseOrLog(mFijiTable);
  ResourceUtils.releaseOrLog(mFiji);
 }
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce

/** {@inheritDoc} */
@Override
protected void cleanup() throws IOException {
 ResourceUtils.releaseOrLog(mTable);
 ResourceUtils.releaseOrLog(mFiji);
 super.cleanup();
}
origin: com.moz.fiji.hive/fiji-hive-lib

@Override
public void close(boolean abort) throws IOException {
 ResourceUtils.closeOrLog(mFijiTableWriter);
 ResourceUtils.releaseOrLog(mFijiTable);
 ResourceUtils.releaseOrLog(mFiji);
}
origin: com.moz.fiji.schema/fiji-schema

 /** {@inheritDoc} */
 @Override
 public synchronized void close() throws IOException {
  while (!mConnections.isEmpty()) {
   ResourceUtils.releaseOrLog(mConnections.remove().mTable);
  }
 }
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce

/** {@inheritDoc} */
@Override
protected void cleanup() throws IOException {
 ResourceUtils.releaseOrLog(mTable);
 ResourceUtils.releaseOrLog(mFiji);
 super.cleanup();
}
origin: com.moz.fiji.examples.phonebook/fiji-phonebook

 /** {@inheritDoc} */
 @Override
 protected void cleanup(Context hadoopContext) throws IOException, InterruptedException {
  ResourceUtils.closeOrLog(mTableWriter);
  ResourceUtils.releaseOrLog(mTable);
  ResourceUtils.releaseOrLog(mFiji);
  super.cleanup(hadoopContext);
 }
}
origin: com.moz.fiji.examples.phonebook/fiji-phonebook

 /** {@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);
 }
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
protected void cleanup() throws IOException {
 ResourceUtils.releaseOrLog(mFiji);
 mFiji = null;
 super.cleanup();
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce

 @Override
 public void close() throws IOException {
  ResourceUtils.closeOrLog(mReader);
  ResourceUtils.releaseOrLog(mTable);
  ResourceUtils.releaseOrLog(mFiji);
  super.close();
 }
}
origin: com.moz.fiji.examples.phonebook/fiji-phonebook

 /** {@inheritDoc} */
 @Override
 protected void cleanup(Context hadoopContext) throws IOException, InterruptedException {
  ResourceUtils.closeOrLog(mWriter);
  ResourceUtils.releaseOrLog(mTable);
  ResourceUtils.releaseOrLog(mFiji);
  super.cleanup(hadoopContext);
 }
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce-cassandra

 /** {@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;
 }
}
origin: com.moz.fiji.schema/fiji-schema

 /** {@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;
 }
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce

 /** {@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;
 }
}
origin: com.moz.fiji.hive/fiji-hive-lib

/** {@inheritDoc} */
@Override
public void close() throws IOException {
 ResourceUtils.closeOrLog(mCurrentPagedFijiRowDataWritable);
 ResourceUtils.closeOrLog(mScanner);
 ResourceUtils.closeOrLog(mFijiTableReader);
 ResourceUtils.releaseOrLog(mFijiTable);
 ResourceUtils.releaseOrLog(mFiji);
}
origin: com.moz.fiji.schema/fiji-schema-cassandra

/**
 * 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);
}
origin: com.moz.fiji.schema/fiji-schema

/**
 * 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);
}
origin: com.moz.fiji.mapreduce/fiji-mapreduce

/** {@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);
 }
}
com.moz.fiji.schema.utilResourceUtilsreleaseOrLog

Javadoc

Releases the specified resource, logging and swallowing I/O errors if needed.

Popular methods of ResourceUtils

  • closeOrLog
    Closes the specified resource, logging and swallowing I/O errors if needed.

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now