MapReduce服务 MRS-创建Connection:代码样例

时间:2023-11-01 16:19:45

代码样例

以下代码片段是登录,创建Connection并创建表的示例,在com.huawei.bigdata.hbase.examples包的“HBaseSample”类的HBaseSample方法中。

    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/devg3-mrs/mrs_07_080016.html