Search in sources :

Example 1 with BigtableConfiguration

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);
}
Also used : BigtableConfiguration(com.google.cloud.bigtable.hbase.BigtableConfiguration) Configuration(org.apache.hadoop.conf.Configuration)

Aggregations

BigtableConfiguration (com.google.cloud.bigtable.hbase.BigtableConfiguration)1 Configuration (org.apache.hadoop.conf.Configuration)1