val conf = HBaseConfiguration.create
conf.addResource(new Path("hbase-site-xxx.xml")) // hbase-site-xxx.xml需在classpath的jar包中
conf.writeXml(System.out) // 看hbase-site-xxx.xml是否成功加载
val conn = HConnectionManager.createConnection(conf)
println(s"getCurrentNrHRS() ${conn.getCurrentNrHRS}") // 看是否能正确打印regionserver数
val htable: HTableInterface = conn.getTable("test:test") // 获得表test:test句柄
htable.exists(new Get(rowKey.getBytes)) // 对表进行操作