com.google.cloud.bigtable.hbase
Class BigtableConfiguration
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.BigtableConfiguration
-
public class BigtableConfiguration extends Object
This class provides a simplified mechanism of creating a programmatic Bigtable Connection.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Field Summary
Fields Modifier and Type Field and Description static String
BIGTABLE_HBASE_CLIENT_ASYNC_CONNECTION_CLASS
static String
BIGTABLE_HBASE_CLIENT_ASYNC_REGISTRY_CLASS
static String
HBASE_CLIENT_ASYNC_CONNECTION_IMPL
static String
HBASE_CLIENT_ASYNC_REGISTRY_IMPL
static String
HBASE_CLIENT_CONNECTION_IMPL
-
Constructor Summary
Constructors Constructor and Description BigtableConfiguration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static org.apache.hadoop.conf.Configuration
asyncConfigure(org.apache.hadoop.conf.Configuration conf)
Configuration for getting a org.apache.hadoop.hbase.client.AsyncConnection.static org.apache.hadoop.conf.Configuration
configure(org.apache.hadoop.conf.Configuration conf, String projectId, String instanceId)
Configure and return an existingConfiguration
.static org.apache.hadoop.conf.Configuration
configure(org.apache.hadoop.conf.Configuration conf, String projectId, String instanceId, String appProfileId)
Configure and return an existingConfiguration
.static org.apache.hadoop.conf.Configuration
configure(String projectId, String instanceId)
Create and configure a newConfiguration
.static org.apache.hadoop.conf.Configuration
configure(String projectId, String instanceId, String appProfileId)
Create and configure a newConfiguration
.static Connection
connect(org.apache.hadoop.conf.Configuration conf)
connect.static Connection
connect(String projectId, String instanceId)
connect.static Connection
connect(String projectId, String instanceId, String appProfileId)
connect.static Class<? extends Connection>
getConnectionClass()
static org.apache.hadoop.conf.Configuration
withCredentials(org.apache.hadoop.conf.Configuration conf, com.google.auth.Credentials credentials)
Sets a reference to aCredentials
in aConfiguration
object.
-
-
-
Field Detail
-
HBASE_CLIENT_CONNECTION_IMPL
public static final String HBASE_CLIENT_CONNECTION_IMPL
- See Also:
- Constant Field Values
-
HBASE_CLIENT_ASYNC_CONNECTION_IMPL
public static final String HBASE_CLIENT_ASYNC_CONNECTION_IMPL
- See Also:
- Constant Field Values
-
HBASE_CLIENT_ASYNC_REGISTRY_IMPL
public static final String HBASE_CLIENT_ASYNC_REGISTRY_IMPL
- See Also:
- Constant Field Values
-
BIGTABLE_HBASE_CLIENT_ASYNC_CONNECTION_CLASS
public static final String BIGTABLE_HBASE_CLIENT_ASYNC_CONNECTION_CLASS
- See Also:
- Constant Field Values
-
BIGTABLE_HBASE_CLIENT_ASYNC_REGISTRY_CLASS
public static final String BIGTABLE_HBASE_CLIENT_ASYNC_REGISTRY_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnectionClass
public static Class<? extends Connection> getConnectionClass()
- Returns:
- the default bigtable
Connection
implementation class found in the classpath.
-
configure
public static org.apache.hadoop.conf.Configuration configure(String projectId, String instanceId)
Create and configure a newConfiguration
.
-
configure
public static org.apache.hadoop.conf.Configuration configure(String projectId, String instanceId, String appProfileId)
Create and configure a newConfiguration
.
-
configure
public static org.apache.hadoop.conf.Configuration configure(org.apache.hadoop.conf.Configuration conf, String projectId, String instanceId)
Configure and return an existingConfiguration
.
-
configure
public static org.apache.hadoop.conf.Configuration configure(org.apache.hadoop.conf.Configuration conf, String projectId, String instanceId, String appProfileId)
Configure and return an existingConfiguration
.
-
withCredentials
public static org.apache.hadoop.conf.Configuration withCredentials(org.apache.hadoop.conf.Configuration conf, com.google.auth.Credentials credentials)
Sets a reference to aCredentials
in aConfiguration
object.- Parameters:
conf
- aConfiguration
object to configure.credentials
- aCredentials
object;- Returns:
- a
Configuration
object.
-
asyncConfigure
public static org.apache.hadoop.conf.Configuration asyncConfigure(org.apache.hadoop.conf.Configuration conf)
Configuration for getting a org.apache.hadoop.hbase.client.AsyncConnection.- Parameters:
conf
- aConfiguration
object to configure.- Returns:
- the modified
Configuration
object.
-
connect
public static Connection connect(String projectId, String instanceId)
connect.- Parameters:
projectId
- aString
object.instanceId
- aString
object.- Returns:
- a
Connection
object.
-
connect
public static Connection connect(String projectId, String instanceId, String appProfileId)
connect.- Parameters:
projectId
- aString
object.instanceId
- aString
object.appProfileId
- aString
object.- Returns:
- a
Connection
object.
-
connect
public static Connection connect(org.apache.hadoop.conf.Configuration conf)
connect.- Parameters:
conf
- aConfiguration
object.- Returns:
- a
Connection
object.
-
-