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

org.apache.gora.tutorial.log
Class LogAnalytics

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.gora.tutorial.log.LogAnalytics
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class LogAnalytics
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

LogAnalytics is the tutorial class to illustrate Gora MapReduce API. The analytics mapreduce job reads the web access data stored earlier by the LogManager, and calculates the aggregate daily pageviews. The output of the job is stored in a Gora compatible data store.

See the tutorial.html file in docs or go to the web sitefor more information.


Nested Class Summary
static class LogAnalytics.LogAnalyticsMapper
          The Mapper takes Long keys and Pageview objects, and emits tuples of <url, day> as keys and 1 as values.
static class LogAnalytics.LogAnalyticsReducer
          The Reducer receives tuples of <url, day> as keys and a list of values corresponding to the keys, and emits a combined keys and MetricDatum objects.
 
Constructor Summary
LogAnalytics()
           
 
Method Summary
 org.apache.hadoop.mapreduce.Job createJob(DataStore<Long,Pageview> inStore, DataStore<String,MetricDatum> outStore, int numReducer)
          Creates and returns the Job for submitting to Hadoop mapreduce.
static void main(String[] args)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
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.conf.Configurable
getConf, setConf
 

Constructor Detail

LogAnalytics

public LogAnalytics()
Method Detail

createJob

public org.apache.hadoop.mapreduce.Job createJob(DataStore<Long,Pageview> inStore,
                                                 DataStore<String,MetricDatum> outStore,
                                                 int numReducer)
                                          throws IOException
Creates and returns the Job for submitting to Hadoop mapreduce.

Parameters:
dataStore -
query -
Returns:
Throws:
IOException

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


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