123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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 测试连接
- *
- * <pre>
- *
- * Created by zhaopx.
- * User: zhaopx
- * Date: 2020/4/21
- * Time: 17:59
- *
- * </pre>
- *
- * @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;
- }
|