|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.hbase.HbaseUtils
public class HbaseUtils
Helper class featuring methods for Hbase table handling and exception translation.
Constructor Summary | |
---|---|
HbaseUtils()
|
Method Summary | |
---|---|
static DataAccessException |
convertHbaseException(Exception ex)
Converts the given (Hbase) exception to an appropriate exception from org.springframework.dao hierarchy. |
static HTableInterface |
getHTable(String tableName,
Configuration configuration)
Retrieves an Hbase table instance identified by its name. |
static HTableInterface |
getHTable(String tableName,
Configuration configuration,
Charset charset,
HTableInterfaceFactory tableFactory)
Retrieves an Hbase table instance identified by its name and charset using the given table factory. |
static void |
releaseTable(String tableName,
HTableInterface table)
Releases (or closes) the given table, created via the given configuration if it is not managed externally (or bound to the thread). |
static void |
releaseTable(String tableName,
HTableInterface table,
HTableInterfaceFactory tableFactory)
Releases (or closes) the given table, created via the given configuration if it is not managed externally (or bound to the thread). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HbaseUtils()
Method Detail |
---|
public static DataAccessException convertHbaseException(Exception ex)
ex
- Hbase exception that occurred
public static HTableInterface getHTable(String tableName, Configuration configuration)
configuration
- Hbase configuration objecttableName
- table name
public static HTableInterface getHTable(String tableName, Configuration configuration, Charset charset, HTableInterfaceFactory tableFactory)
tableName
- table nameconfiguration
- Hbase configuration objectcharset
- name charset (may be null)tableFactory
- table factory (may be null)
public static void releaseTable(String tableName, HTableInterface table)
tableName
- table
- public static void releaseTable(String tableName, HTableInterface table, HTableInterfaceFactory tableFactory)
tableName
- table
- tableFactory
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |