|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 HTable |
getHTable(Configuration configuration,
String tableName)
Retrieves an Hbase table instance identified by its name. |
static HTable |
getHTable(HTableInterfaceFactory tableFactory,
Charset charset,
Configuration configuration,
String tableName)
Retrieves an Hbase table instance identified by its name and charset using the given table factory. |
static void |
releaseTable(String tableName,
HTableInterface table)
Releases (and closes) the given table, created via the given configuration if it is not managed externally. |
| 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 HTable getHTable(Configuration configuration,
String tableName)
configuration - Hbase configuration objecttableName - table name
public static HTable getHTable(HTableInterfaceFactory tableFactory,
Charset charset,
Configuration configuration,
String tableName)
tableFactory - table factory (may be null)charset - name charset (may be null)configuration - Hbase configuration objecttableName - table name
public static void releaseTable(String tableName,
HTableInterface table)
tableName - table -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||