public class HBaseUtilities
extends java.lang.Object
Constructor and Description |
---|
HBaseUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
closeConnection(org.apache.hadoop.hbase.client.Admin hbaseAdmin,
org.apache.hadoop.hbase.client.Connection hbaseConnection)
Closes HBase admin and connection if they are open.
|
static org.apache.hadoop.conf.Configuration |
initHBaseConfiguration()
Initializes HBase configuration.
|
static boolean |
isTableAvailable(org.apache.hadoop.hbase.client.Admin hbaseAdmin,
java.lang.String tableName)
Returns if given table exists and is enabled.
|
public static org.apache.hadoop.conf.Configuration initHBaseConfiguration()
public static boolean isTableAvailable(org.apache.hadoop.hbase.client.Admin hbaseAdmin, java.lang.String tableName) throws java.io.IOException
hbaseAdmin
- HBase admin, must be initializedtableName
- table namejava.io.IOException
- if a remote or network exception occurs when connecting to HBasepublic static void closeConnection(org.apache.hadoop.hbase.client.Admin hbaseAdmin, org.apache.hadoop.hbase.client.Connection hbaseConnection) throws java.io.IOException
hbaseAdmin
- HBase adminhbaseConnection
- HBase connectionjava.io.IOException
- if an I/O error occurs when connecting to HBase