This project has retired. For details please refer to its Attic page.
GoraMapper (Apache Gora 0.2 API)

org.apache.gora.mapreduce
Class GoraMapper<K1,V1 extends Persistent,K2,V2>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2>
      extended by org.apache.gora.mapreduce.GoraMapper<K1,V1,K2,V2>
Direct Known Subclasses:
LogAnalytics.LogAnalyticsMapper, QueryCounter.QueryCounterMapper, WordCount.TokenizerMapper

public class GoraMapper<K1,V1 extends Persistent,K2,V2>
extends org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2>

Base class for Gora based Mappers.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
GoraMapper()
           
 
Method Summary
static
<K1,V1 extends Persistent,K2,V2>
void
initMapperJob(org.apache.hadoop.mapreduce.Job job, Class<? extends DataStore<K1,V1>> dataStoreClass, Class<K1> inKeyClass, Class<V1> inValueClass, Class<K2> outKeyClass, Class<V2> outValueClass, Class<? extends GoraMapper> mapperClass, boolean reuseObjects)
          Initializes the Mapper, and sets input parameters for the job.
static
<K1,V1 extends Persistent,K2,V2>
void
initMapperJob(org.apache.hadoop.mapreduce.Job job, Class<? extends DataStore<K1,V1>> dataStoreClass, Class<K1> inKeyClass, Class<V1> inValueClass, Class<K2> outKeyClass, Class<V2> outValueClass, Class<? extends GoraMapper> mapperClass, Class<? extends org.apache.hadoop.mapreduce.Partitioner> partitionerClass, boolean reuseObjects)
          Initializes the Mapper, and sets input parameters for the job.
static
<K1,V1 extends Persistent,K2,V2>
void
initMapperJob(org.apache.hadoop.mapreduce.Job job, DataStore<K1,V1> dataStore, Class<K2> outKeyClass, Class<V2> outValueClass, Class<? extends GoraMapper> mapperClass, boolean reuseObjects)
          Initializes the Mapper, and sets input parameters for the job
static
<K1,V1 extends Persistent,K2,V2>
void
initMapperJob(org.apache.hadoop.mapreduce.Job job, Query<K1,V1> query, DataStore<K1,V1> dataStore, Class<K2> outKeyClass, Class<V2> outValueClass, Class<? extends GoraMapper> mapperClass, boolean reuseObjects)
          Initializes the Mapper, and sets input parameters for the job
static
<K1,V1 extends Persistent,K2,V2>
void
initMapperJob(org.apache.hadoop.mapreduce.Job job, Query<K1,V1> query, DataStore<K1,V1> dataStore, Class<K2> outKeyClass, Class<V2> outValueClass, Class<? extends GoraMapper> mapperClass, Class<? extends org.apache.hadoop.mapreduce.Partitioner> partitionerClass, boolean reuseObjects)
          Initializes the Mapper, and sets input parameters for the job
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, map, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoraMapper

public GoraMapper()
Method Detail

initMapperJob

public static <K1,V1 extends Persistent,K2,V2> void initMapperJob(org.apache.hadoop.mapreduce.Job job,
                                                                  Class<? extends DataStore<K1,V1>> dataStoreClass,
                                                                  Class<K1> inKeyClass,
                                                                  Class<V1> inValueClass,
                                                                  Class<K2> outKeyClass,
                                                                  Class<V2> outValueClass,
                                                                  Class<? extends GoraMapper> mapperClass,
                                                                  Class<? extends org.apache.hadoop.mapreduce.Partitioner> partitionerClass,
                                                                  boolean reuseObjects)
                          throws IOException
Initializes the Mapper, and sets input parameters for the job. All of the records in the dataStore are used as the input. If you want to include a specific subset, use one of the overloaded methods which takes query parameter.

Parameters:
job - the job to set the properties for
dataStoreClass - the datastore class
inKeyClass - Map input key class
inValueClass - Map input value class
outKeyClass - Map output key class
outValueClass - Map output value class
mapperClass - the mapper class extending GoraMapper
partitionerClass - optional partitioner class
reuseObjects - whether to reuse objects in serialization
Throws:
IOException

initMapperJob

public static <K1,V1 extends Persistent,K2,V2> void initMapperJob(org.apache.hadoop.mapreduce.Job job,
                                                                  Class<? extends DataStore<K1,V1>> dataStoreClass,
                                                                  Class<K1> inKeyClass,
                                                                  Class<V1> inValueClass,
                                                                  Class<K2> outKeyClass,
                                                                  Class<V2> outValueClass,
                                                                  Class<? extends GoraMapper> mapperClass,
                                                                  boolean reuseObjects)
                          throws IOException
Initializes the Mapper, and sets input parameters for the job. All of the records in the dataStore are used as the input. If you want to include a specific subset, use one of the overloaded methods which takes query parameter.

Parameters:
job - the job to set the properties for
dataStoreClass - the datastore class
inKeyClass - Map input key class
inValueClass - Map input value class
outKeyClass - Map output key class
outValueClass - Map output value class
mapperClass - the mapper class extending GoraMapper
reuseObjects - whether to reuse objects in serialization
Throws:
IOException

initMapperJob

public static <K1,V1 extends Persistent,K2,V2> void initMapperJob(org.apache.hadoop.mapreduce.Job job,
                                                                  Query<K1,V1> query,
                                                                  DataStore<K1,V1> dataStore,
                                                                  Class<K2> outKeyClass,
                                                                  Class<V2> outValueClass,
                                                                  Class<? extends GoraMapper> mapperClass,
                                                                  Class<? extends org.apache.hadoop.mapreduce.Partitioner> partitionerClass,
                                                                  boolean reuseObjects)
                          throws IOException
Initializes the Mapper, and sets input parameters for the job

Parameters:
job - the job to set the properties for
query - the query to get the inputs from
dataStore - the datastore as the input
outKeyClass - Map output key class
outValueClass - Map output value class
mapperClass - the mapper class extending GoraMapper
partitionerClass - optional partitioner class
reuseObjects - whether to reuse objects in serialization
Throws:
IOException

initMapperJob

public static <K1,V1 extends Persistent,K2,V2> void initMapperJob(org.apache.hadoop.mapreduce.Job job,
                                                                  DataStore<K1,V1> dataStore,
                                                                  Class<K2> outKeyClass,
                                                                  Class<V2> outValueClass,
                                                                  Class<? extends GoraMapper> mapperClass,
                                                                  boolean reuseObjects)
                          throws IOException
Initializes the Mapper, and sets input parameters for the job

Parameters:
job - the job to set the properties for
dataStore - the datastore as the input
outKeyClass - Map output key class
outValueClass - Map output value class
mapperClass - the mapper class extending GoraMapper
reuseObjects - whether to reuse objects in serialization
Throws:
IOException

initMapperJob

public static <K1,V1 extends Persistent,K2,V2> void initMapperJob(org.apache.hadoop.mapreduce.Job job,
                                                                  Query<K1,V1> query,
                                                                  DataStore<K1,V1> dataStore,
                                                                  Class<K2> outKeyClass,
                                                                  Class<V2> outValueClass,
                                                                  Class<? extends GoraMapper> mapperClass,
                                                                  boolean reuseObjects)
                          throws IOException
Initializes the Mapper, and sets input parameters for the job

Parameters:
job - the job to set the properties for
query - the query to get the inputs from
dataStore - the datastore as the input
outKeyClass - Map output key class
outValueClass - Map output value class
mapperClass - the mapper class extending GoraMapper
reuseObjects - whether to reuse objects in serialization
Throws:
IOException


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.