use of com.google.cloud.bigtable.hbase.BigtableConfiguration in project styx by spotify.
the class Connections method createBigTableConnection.
public static Connection createBigTableConnection(Config config) {
final String projectId = config.getString(BIGTABLE_PROJECT_ID);
final String instanceId = config.getString(BIGTABLE_INSTANCE_ID);
LOG.info("Creating Bigtable connection for project:{}, instance:{}", projectId, instanceId);
final Configuration bigtableConfiguration = new Configuration();
bigtableConfiguration.set("google.bigtable.project.id", projectId);
bigtableConfiguration.set("google.bigtable.instance.id", instanceId);
bigtableConfiguration.setBoolean("google.bigtable.rpc.use.timeouts", true);
return BigtableConfiguration.connect(bigtableConfiguration);
}
Aggregations