|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.llnl.ontology.mapreduce.table.SchemaUtil
public class SchemaUtil
A set of often used methods for accessing values in a HBase table.
| Constructor Summary | |
|---|---|
SchemaUtil()
|
|
| Method Summary | ||
|---|---|---|
static void |
add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
Double value)
Adds data to a Put under a specified column and qualifier. |
|
static void |
add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
Object object)
Stores the given Object into the Put at the specified
column family and column qualifier. |
|
static boolean |
add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
String data)
Adds data to a Put under a specified column and qualifier. |
|
static boolean |
add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
String data,
org.apache.hadoop.mapreduce.Counter counter)
Adds data to a Put under a specified column and qualifier. |
|
static void |
addDefaultColumnFamily(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor,
String columnFamilyName)
Creates a new column family for the table with default versions, in memory columns, block cache, and TTL. |
|
static String |
getColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName)
Returns the text of a given column. |
|
static String |
getColumn(org.apache.hadoop.hbase.client.Result row,
String family,
String qualifier)
Returns the text for a given column. |
|
static Double |
getDoubleColumn(org.apache.hadoop.hbase.client.Result row,
String family,
String qualifier)
Returns a double value extracted from the specified column. |
|
static
|
getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName,
Class<T> classOfT)
Returns the Object stored in this row at the given column family
and column qualifier. |
|
static
|
getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String col,
String qual,
Class<T> classOfT)
Returns the Object stored in this row at the given column family
and column qualifier. |
|
static
|
getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String col,
String qual,
Type typeOfT)
Returns the Object stored in this row at the given column family
and column qualifier. |
|
static
|
getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName,
Type typeOfT)
Returns the Object stored in this row at the given column family
and column qualifier. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SchemaUtil()
| Method Detail |
|---|
public static String getColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName)
public static String getColumn(org.apache.hadoop.hbase.client.Result row,
String family,
String qualifier)
public static Double getDoubleColumn(org.apache.hadoop.hbase.client.Result row,
String family,
String qualifier)
public static <T> T getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName,
Class<T> classOfT)
Object stored in this row at the given column family
and column qualifier. If no data exists, this returns null.
public static <T> T getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String fieldName,
Type typeOfT)
Object stored in this row at the given column family
and column qualifier. If no data exists, this returns null.
public static <T> T getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String col,
String qual,
Class<T> classOfT)
Object stored in this row at the given column family
and column qualifier. If no data exists, this returns null.
public static <T> T getObjectColumn(org.apache.hadoop.hbase.client.Result row,
String col,
String qual,
Type typeOfT)
Object stored in this row at the given column family
and column qualifier. If no data exists, this returns null.
public static void add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
Object object)
Object into the Put at the specified
column family and column qualifier. object should implement
Serializable.
public static boolean add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
String data)
Put under a specified column and qualifier.
Returns false if the data is null.
public static boolean add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
String data,
org.apache.hadoop.mapreduce.Counter counter)
Put under a specified column and qualifier.
Returns false if the add failed.
public static void add(org.apache.hadoop.hbase.client.Put put,
String col,
String qual,
Double value)
Put under a specified column and qualifier.
public static void addDefaultColumnFamily(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor,
String columnFamilyName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||