Codota Logo
com.google.cloud.bigtable.grpc
Code IndexAdd Codota to your IDE (free)

How to use com.google.cloud.bigtable.grpc

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: brianfrankcooper/YCSB

/**
 * Little helper to set the table byte array. If it's different than the last
 * table we reset the byte array. Otherwise we just use the existing array.
 * @param table The table we're operating against
 */
private void setTable(final String table) {
 if (!lastTable.equals(table)) {
  lastTable = table;
  BigtableTableName tableName = options
    .getInstanceName()
    .toTableName(table);
  lastTableBytes = tableName
    .toString()
    .getBytes();
  synchronized(this) {
   if (bulkMutation != null) {
    try {
     bulkMutation.flush();
    } catch (InterruptedException e) {
     Thread.currentThread().interrupt();
     throw new RuntimeException(e);
    }
   }
   bulkMutation = session.createBulkMutation(tableName);
  }
 }
}

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: brianfrankcooper/YCSB

try {
 options = BigtableOptionsFactory.fromConfiguration(CONFIG);
 session = new BigtableSession(options);
 client = session.getDataClient();
} catch (IOException e) {
 throw new DBException("Error loading options from config: ", e);
client = session.getDataClient();
origin: brianfrankcooper/YCSB

@Override
public Status delete(String table, String key) {
 if (debug) {
  System.out.println("Doing delete for key: " + key);
 }
 
 setTable(table);
 
 final MutateRowRequest.Builder rowMutation = MutateRowRequest.newBuilder()
   .setRowKey(ByteString.copyFromUtf8(key))
   .setTableNameBytes(ByteStringer.wrap(lastTableBytes));
 rowMutation.addMutationsBuilder().setDeleteFromRow(
   DeleteFromRow.getDefaultInstance());
 
 try {
  if (clientSideBuffering) {
   bulkMutation.add(rowMutation.build());
  } else {
   client.mutateRow(rowMutation.build());
  }
  return Status.OK;
 } catch (RuntimeException e) {
  System.err.println("Failed to delete key: " + key + " " + e.getMessage());
  return Status.ERROR;
 }
}
origin: com.google.cloud.bigtable/bigtable-hbase

protected BulkOperation(
  BigtableSession session,
  BigtableTableName tableName) {
 this.bulkRead = session.createBulkRead(tableName);
 this.bulkMutation = session.createBulkMutation(tableName);
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * <p>toTableName.</p>
 *
 * @param tableId a {@link java.lang.String} object.
 * @return a {@link com.google.cloud.bigtable.grpc.BigtableTableName} object.
 */
public BigtableTableName toTableName(String tableId) {
 return new BigtableTableName(toTableNameStr(tableId));
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * Sets a cluster size to a specific size.
 * @param clusterId
 * @param zoneId
 * @param newSize
 * @throws InterruptedException if the cluster is in the middle of updating, and an interrupt was
 *           received
 */
public void setClusterSize(String clusterId, String zoneId, int newSize)
  throws InterruptedException {
 setClusterSize(instanceName.toClusterName(clusterId).getClusterName(), newSize);
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * <p>Getter for the field <code>adminClientWrapper</code>.</p>
 *
 * @return a {@link BigtableTableAdminClientWrapper} object.
 * @throws java.io.IOException if any.
 */
public synchronized IBigtableTableAdminClient getTableAdminClientWrapper() throws IOException {
 if (adminClientWrapper == null) {
  adminClientWrapper = new BigtableTableAdminClientWrapper(getTableAdminClient(), options);
 }
 return adminClientWrapper;
}
origin: com.google.cloud.bigtable/bigtable-hbase

/**
 * <p>getBigtableTableAdminClient.</p>
 *
 * @return a {@link com.google.cloud.bigtable.grpc.BigtableTableAdminClient} object.
 * @throws java.io.IOException if any.
 */
protected BigtableTableAdminClient getBigtableTableAdminClient() throws IOException {
 return session.getTableAdminClient();
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public void dropRowRange(String tableId, String rowKeyPrefix) {
 adminClient.dropRowRange(buildDropRowRangeRequest(tableId, rowKeyPrefix));
}
origin: brianfrankcooper/YCSB

rows = client.readRowsAsync(rrr.build()).get();
if (rows == null || rows.isEmpty()) {
 return Status.NOT_FOUND;
origin: GoogleCloudPlatform/cloud-bigtable-client

 @Override
 public ListenableFuture<MutateRowResponse> call(BigtableDataClient client, MutateRowRequest request) {
  return client.mutateRowAsync(request);
 }
};
origin: GoogleCloudPlatform/cloud-bigtable-client

 @Override
 public ListenableFuture<ReadModifyWriteRowResponse> call(BigtableDataClient client,
   ReadModifyWriteRowRequest request) {
  return client.readModifyWriteRowAsync(request);
 }
};
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public void waitForOperation(Operation operation) throws IOException, TimeoutException {
 waitForOperation(operation, 10, TimeUnit.MINUTES);
}
origin: GoogleCloudPlatform/cloud-bigtable-client

 @Override
 public ListenableFuture<List<MutateRowsResponse>> call(BigtableDataClient client,
   MutateRowsRequest request) {
  return client.mutateRowsAsync(request);
 }
};
origin: GoogleCloudPlatform/cloud-bigtable-client

 @Override
 public void run() {
  // The first invocation of BigtableSessionSharedThreadPools.getInstance() is expensive.
  // Reference it so that it gets constructed asynchronously.
  BigtableSessionSharedThreadPools.getInstance();
 }
});
origin: GoogleCloudPlatform/cloud-bigtable-client

 @Override
 public ManagedChannel create() throws IOException {
  return createNettyChannel(host, options, interceptors);
 }
};
origin: brianfrankcooper/YCSB

 bulkMutation.add(rowMutation.build());
} else {
 client.mutateRow(rowMutation.build());
origin: GoogleCloudPlatform/cloud-bigtable-client

protected BulkOperation(
  BigtableSession session,
  BigtableTableName tableName) {
 this.bulkRead = session.createBulkRead(tableName);
 this.bulkMutation = session.createBulkMutation(tableName);
}
origin: brianfrankcooper/YCSB

rows = client.readRowsAsync(rrr.build()).get();
if (rows == null || rows.isEmpty()) {
 return Status.NOT_FOUND;
com.google.cloud.bigtable.grpc

Most used classes

  • BigtableDataClient
    Interface to access v2 Bigtable data service methods.
  • BigtableInstanceName
    This class encapsulates a Bigtable instance name. An instance name is of the form projects/(projectI
  • BigtableSession
    Encapsulates the creation of Bigtable Grpc services. The following functionality is handled by this
  • BigtableTableAdminClient
    A client for the Cloud Bigtable Table Admin API.
  • BigtableClusterName
  • BulkMutation,
  • ResultScanner,
  • BigtableClusterUtilities,
  • BigtableDataClientWrapper,
  • BigtableInstanceClient,
  • AsyncExecutor,
  • BulkRead,
  • FlatRow$Builder,
  • FlatRow$Cell,
  • FlatRow,
  • BigtableDataGrpcClient,
  • BigtableInstanceGrpcClient,
  • BigtableSessionSharedThreadPools,
  • BigtableSnapshotName
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