表格存储服务 CloudTable-创建Configuration:代码样例

时间:2023-11-01 16:16:51

代码样例

下面代码片段在com.huawei.cloudtable.hbase.examples包中。

private static void init() throws IOException {  // Default load from conf directory  conf = HBaseConfiguration.create(); // 注[1]  String userdir = System.getProperty("user.dir") + File.separator + "conf" + File.separator;  Path hbaseSite = new Path(userdir + "hbase-site.xml");  if (new File(hbaseSite.toString()).exists()) {    conf.addResource(hbaseSite);  }}
support.huaweicloud.com/devg-cloudtable/cloudtable_01_0051.html