package com.primeton.dsp.datarelease.data.bdata; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.exceptions.HBaseException; /** * HBase 测试连接 * *
 *
 * Created by zhaopx.
 * User: zhaopx
 * Date: 2020/4/21
 * Time: 17:59
 *
 * 
* * @author zhaopx */ public interface HBaseConnectionService { /** * 安全处理,认证. 认证不通过可能抛出 SecurityException * @return 返回 true 认证通过 */ default public boolean doAuth() { return true; }; /** * 获取 HBaseAdmin 连接 * @return */ public Admin getConnection() throws HBaseException; /** * 获取HBase 指定表的链接 * @return * @throws HBaseException */ public Table getTable(String tableName) throws HBaseException; }