Codota Logo
BigtableSession.close
Code IndexAdd Codota to your IDE (free)

How to use
close
method
in
com.google.cloud.bigtable.grpc.BigtableSession

Best Java code snippets using com.google.cloud.bigtable.grpc.BigtableSession.close (Showing top 8 results out of 315)

  • Common ways to obtain BigtableSession
private void myMethod () {
BigtableSession b =
  • Codota IconBigtableOptions opts;new BigtableSession(opts)
  • Smart code suggestions by Codota
}
origin: brianfrankcooper/YCSB

@Override
public void cleanup() throws DBException {
 if (bulkMutation != null) {
  try {
   bulkMutation.flush();
  } catch (InterruptedException e) {
   Thread.currentThread().interrupt();
   throw new DBException(e);
  } catch(RuntimeException e){
   throw new DBException(e);
  }
 }
 synchronized (CONFIG) {
  --threadCount;
  if (threadCount <= 0) {
   try {
    session.close();
   } catch (IOException e) {
    throw new DBException(e);
   }
  }
 }
}

origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Override
public void close() throws IOException {
 // Goal: by the end of this function, both results and session are null and closed,
 // independent of what errors they throw or prior state.
 if (session == null) {
  // Only possible when previously closed, so we know that results is also null.
  return;
 }
 // Session does not implement Closeable -- it's AutoCloseable. So we can't register it with
 // the Closer, but we can use the Closer to simplify the error handling.
 try (Closer closer = Closer.create()) {
  if (results != null) {
   closer.register(results);
   results = null;
  }
  session.close();
 } finally {
  session = null;
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

@Override
public void close() throws IOException {
 LOG.debug("closeing BigtableAsyncConnection");
 if (!this.closed) {
  this.session.close();
  this.closed = true;
 }
}
origin: com.google.cloud.bigtable/bigtable-hbase-2.x

@Override
public void close() throws IOException {
 LOG.debug("closeing BigtableAsyncConnection");
 if (!this.closed) {
  this.session.close();
  this.closed = true;
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public void close() throws IOException{
 if (!this.closed) {
  this.session.close();
  // If the clients are shutdown, there shouldn't be any more activity on the
  // batch pool (assuming we created it ourselves). If exceptions were raised
  // shutting down the clients, it's not entirely safe to shutdown the pool
  // (via a finally block).
  shutdownBatchPool();
  if (this.bufferedMutatorExecutorService != null) {
   this.bufferedMutatorExecutorService.shutdown();
   this.bufferedMutatorExecutorService = null;
  }
  this.closed = true;
 }
}
origin: com.google.cloud.bigtable/bigtable-hbase

/** {@inheritDoc} */
@Override
public void close() throws IOException{
 if (!this.closed) {
  this.session.close();
  // If the clients are shutdown, there shouldn't be any more activity on the
  // batch pool (assuming we created it ourselves). If exceptions were raised
  // shutting down the clients, it's not entirely safe to shutdown the pool
  // (via a finally block).
  shutdownBatchPool();
  if (this.bufferedMutatorExecutorService != null) {
   this.bufferedMutatorExecutorService.shutdown();
   this.bufferedMutatorExecutorService = null;
  }
  this.closed = true;
 }
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Override
public void close() throws IOException {
 try {
  if (bulkMutation != null) {
   try {
    bulkMutation.flush();
   } catch (InterruptedException e) {
    Thread.currentThread().interrupt();
    // We fail since flush() operation was interrupted.
    throw new IOException(e);
   }
   bulkMutation = null;
  }
 } finally {
  if (session != null) {
   session.close();
   session = null;
  }
 }
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@After
public void tearDown() throws Exception {
 final String tableName = bigtableOptions.getInstanceName().toTableNameStr(tableId);
 deleteTable(tableName);
 session.close();
}
com.google.cloud.bigtable.grpcBigtableSessionclose

Javadoc

Popular methods of BigtableSession

  • <init>
  • createBulkMutation
  • getDataClient
  • getTableAdminClient
  • getOptions
  • getClusterName
  • createAsyncExecutor
  • createBulkRead
  • createChannelPool
    Create a new com.google.cloud.bigtable.grpc.io.ChannelPool, with auth headers.
  • createManagedPool
    Create a new com.google.cloud.bigtable.grpc.io.ChannelPool, with auth headers, that will be cleaned
  • createNettyChannel
    createNettyChannel.
  • getClientWrapper
  • createNettyChannel,
  • getClientWrapper,
  • getDataChannelPool,
  • getInstanceAdminClient,
  • getTableAdminClientWrapper,
  • initializeResourceLimiter,
  • setupWatchdog

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now