表格存储服务 CLOUDTABLE-创建Connection:代码样例

时间:2025-01-10 15:12:56

代码样例

以下代码片段是创建Connection对象的示例:

private TableName tableName = null;
private Connection conn = null;

public HBaseSample(Configuration conf) throws IOException {
  this.tableName = TableName.valueOf("hbase_sample_table");
  this.conn = ConnectionFactory.createConnection(conf);
}
support.huaweicloud.com/devg-cloudtable/cloudtable_01_0278.html