BigtableConfiguration
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.google.cloud.bigtable.hbase.BigtableConfiguration(Showing top 12 results out of 315)

origin: com.google.cloud.bigtable/bigtable-hbase

/**
 * <p>connect.</p>
 *
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return a {@link org.apache.hadoop.hbase.client.Connection} object.
 */
public static Connection connect(String projectId, String instanceId) {
 return connect(configure(projectId, instanceId));
}
origin: com.google.cloud.bigtable/bigtable-hbase

/**
 * <p>Create and configure a new {@link org.apache.hadoop.conf.Configuration}.</p>
 *
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return a {@link org.apache.hadoop.conf.Configuration} object.
 */
public static Configuration configure(String projectId, String instanceId) {
 Configuration config = new Configuration(false);
 return configure(config, projectId, instanceId);
}
origin: GoogleCloudPlatform/java-docs-samples

/** Connect will establish the connection to Cloud Bigtable. */
public static void connect() throws IOException {
 if (PROJECT_ID == null || INSTANCE_ID == null) {
  if (sc != null) {
   sc.log("environment variables BIGTABLE_PROJECT, and BIGTABLE_INSTANCE need to be defined.");
  }
  return;
 }
 connection = BigtableConfiguration.connect(PROJECT_ID, INSTANCE_ID);
}
origin: spotify/styx

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);
}
origin: com.google.cloud.bigtable/bigtable-hbase

/**
 * <p>Configure and return an existing {@link org.apache.hadoop.conf.Configuration}.</p>
 *
 * @param conf a {@link org.apache.hadoop.conf.Configuration} object to configure.
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return the modified {@link org.apache.hadoop.conf.Configuration} object.
 */
public static Configuration configure(Configuration conf, String projectId, String instanceId) {
 conf.set(BigtableOptionsFactory.PROJECT_ID_KEY, projectId);
 conf.set(BigtableOptionsFactory.INSTANCE_ID_KEY, instanceId);
 conf.set(HConnection.HBASE_CLIENT_CONNECTION_IMPL, getConnectionClass().getCanonicalName());
 return conf;
}
origin: GoogleCloudPlatform/cloud-bigtable-client

 /**
  * <p>connect.</p>
  *
  * @param conf a {@link org.apache.hadoop.conf.Configuration} object.
  * @return a {@link org.apache.hadoop.hbase.client.Connection} object.
  */
 public static Connection connect(Configuration conf) {
  Class<? extends Connection> connectionClass = getConnectionClass();
  try {
   return connectionClass.getConstructor(Configuration.class).newInstance(conf);
  } catch (Exception e) {
   throw new IllegalStateException("Could not find an appropriate constructor for "
     + CONNECTION_CLASS.getCanonicalName(), e);
  }
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

protected synchronized Connection getConnection() {
 if (connection == null) {
  // This uses cached grpc channels, if there was a previous connection created.
  connection = BigtableConfiguration.connect(config.toHBaseConfig());
 }
 return connection;
}
origin: GoogleCloudPlatform/cloud-bigtable-client

try (Connection connection = BigtableConfiguration.connect(configuration);
  Admin admin = connection.getAdmin()) {
 for (final TableName tableName : admin
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * <p>connect.</p>
 *
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return a {@link org.apache.hadoop.hbase.client.Connection} object.
 */
public static Connection connect(String projectId, String instanceId) {
 return connect(configure(projectId, instanceId));
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * <p>Create and configure a new {@link org.apache.hadoop.conf.Configuration}.</p>
 *
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return a {@link org.apache.hadoop.conf.Configuration} object.
 */
public static Configuration configure(String projectId, String instanceId) {
 Configuration config = new Configuration(false);
 return configure(config, projectId, instanceId);
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * <p>Configure and return an existing {@link org.apache.hadoop.conf.Configuration}.</p>
 *
 * @param conf a {@link org.apache.hadoop.conf.Configuration} object to configure.
 * @param projectId a {@link java.lang.String} object.
 * @param instanceId a {@link java.lang.String} object.
 * @return the modified {@link org.apache.hadoop.conf.Configuration} object.
 */
public static Configuration configure(Configuration conf, String projectId, String instanceId) {
 conf.set(BigtableOptionsFactory.PROJECT_ID_KEY, projectId);
 conf.set(BigtableOptionsFactory.INSTANCE_ID_KEY, instanceId);
 conf.set(HConnection.HBASE_CLIENT_CONNECTION_IMPL, getConnectionClass().getCanonicalName());
 return conf;
}
origin: com.google.cloud.bigtable/bigtable-hbase

 /**
  * <p>connect.</p>
  *
  * @param conf a {@link org.apache.hadoop.conf.Configuration} object.
  * @return a {@link org.apache.hadoop.hbase.client.Connection} object.
  */
 public static Connection connect(Configuration conf) {
  Class<? extends Connection> connectionClass = getConnectionClass();
  try {
   return connectionClass.getConstructor(Configuration.class).newInstance(conf);
  } catch (Exception e) {
   throw new IllegalStateException("Could not find an appropriate constructor for "
     + CONNECTION_CLASS.getCanonicalName(), e);
  }
 }
}
com.google.cloud.bigtable.hbaseBigtableConfiguration

Javadoc

This class provides a simplified mechanism of creating a programmatic Bigtable Connection.

Most used methods

  • connect
    connect.
  • configure
    Configure and return an existing org.apache.hadoop.conf.Configuration.
  • getConnectionClass

Popular classes and methods

  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • notifyDataSetChanged (ArrayAdapter)
  • Menu (java.awt)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • TimeZone (java.util)
    TimeZone represents a time zone, primarily used for configuring a Calendar or java.text.SimpleDateF
  • TreeMap (java.util)
    A map whose entries are sorted by their keys. All optional operations such as #put and #remove are s

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)