|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.hbase.mapred.TableMap
org.apache.hadoop.hbase.mapred.GroupingTableMap
public class GroupingTableMap
Extract grouping columns from input record
Field Summary | |
---|---|
static String |
GROUP_COLUMNS
JobConf parameter to specify the columns used to produce the key passed to collect from the map phase |
Constructor Summary | |
---|---|
GroupingTableMap()
default constructor |
Method Summary | |
---|---|
void |
configure(JobConf job)
Default implementation that does nothing. |
protected Text |
createGroupKey(byte[][] vals)
Create a key by concatenating multiple column values. |
protected byte[][] |
extractKeyValues(KeyedDataArrayWritable r)
Extract columns values from the current record. |
static void |
initJob(String table,
String columns,
String groupColumns,
Class<? extends TableMap> mapper,
JobConf job)
Use this before submitting a TableMap job. |
void |
map(HStoreKey key,
KeyedDataArrayWritable value,
TableOutputCollector output,
Reporter reporter)
Extract the grouping columns from value to construct a new key. |
Methods inherited from class org.apache.hadoop.hbase.mapred.TableMap |
---|
initJob, map |
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase |
---|
close |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.io.Closeable |
---|
close |
Field Detail |
---|
public static final String GROUP_COLUMNS
Constructor Detail |
---|
public GroupingTableMap()
Method Detail |
---|
public static void initJob(String table, String columns, String groupColumns, Class<? extends TableMap> mapper, JobConf job)
table
- table to be processedcolumns
- space separated list of columns to fetchgroupColumns
- space separated list of columns used to form the key used in collectmapper
- map classjob
- job configuration objectpublic void configure(JobConf job)
MapReduceBase
configure
in interface JobConfigurable
configure
in class TableMap
job
- the configurationpublic void map(HStoreKey key, KeyedDataArrayWritable value, TableOutputCollector output, Reporter reporter) throws IOException
map
in class TableMap
IOException
TableMap.map(org.apache.hadoop.hbase.HStoreKey, org.apache.hadoop.hbase.io.KeyedDataArrayWritable, org.apache.hadoop.hbase.mapred.TableOutputCollector, org.apache.hadoop.mapred.Reporter)
protected byte[][] extractKeyValues(KeyedDataArrayWritable r)
r
-
protected Text createGroupKey(byte[][] vals)
vals
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |