|
Spring for Apache Hadoop | ||||||||
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 org.springframework.dao.DataAccessException |
convertHbaseException(java.lang.Exception ex)
Converts the given (Hbase) exception to an appropriate exception from org.springframework.dao hierarchy. |
static org.apache.hadoop.hbase.client.HTableInterface |
getHTable(java.lang.String tableName,
org.apache.hadoop.conf.Configuration configuration)
Retrieves an Hbase table instance identified by its name. |
static org.apache.hadoop.hbase.client.HTableInterface |
getHTable(java.lang.String tableName,
org.apache.hadoop.conf.Configuration configuration,
java.nio.charset.Charset charset,
org.apache.hadoop.hbase.client.HTableInterfaceFactory tableFactory)
Retrieves an Hbase table instance identified by its name and charset using the given table factory. |
static void |
releaseTable(java.lang.String tableName,
org.apache.hadoop.hbase.client.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(java.lang.String tableName,
org.apache.hadoop.hbase.client.HTableInterface table,
org.apache.hadoop.hbase.client.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 org.springframework.dao.DataAccessException convertHbaseException(java.lang.Exception ex)
ex
- Hbase exception that occurred
public static org.apache.hadoop.hbase.client.HTableInterface getHTable(java.lang.String tableName, org.apache.hadoop.conf.Configuration configuration)
configuration
- Hbase configuration objecttableName
- table name
public static org.apache.hadoop.hbase.client.HTableInterface getHTable(java.lang.String tableName, org.apache.hadoop.conf.Configuration configuration, java.nio.charset.Charset charset, org.apache.hadoop.hbase.client.HTableInterfaceFactory tableFactory)
tableName
- table nameconfiguration
- Hbase configuration objectcharset
- name charset (may be null)tableFactory
- table factory (may be null)
public static void releaseTable(java.lang.String tableName, org.apache.hadoop.hbase.client.HTableInterface table)
tableName
- table
- public static void releaseTable(java.lang.String tableName, org.apache.hadoop.hbase.client.HTableInterface table, org.apache.hadoop.hbase.client.HTableInterfaceFactory tableFactory)
tableName
- table
- tableFactory
-
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |