org.apache.hadoop.examples
Class DBCountPageView
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.examples.DBCountPageView
- All Implemented Interfaces:
- Configurable, Tool
public class DBCountPageView
- extends Configured
- implements Tool
This is a demonstrative program, which uses DBInputFormat for reading
the input data from a database, and DBOutputFormat for writing the data
to the database.
The Program first creates the necessary tables, populates the input table
and runs the mapred job.
The input data is a mini access log, with a <url,referrer,time>
schema.The output is the number of pageviews of each url in the log,
having the schema <url,pageview>
.
When called with no arguments the program starts a local HSQLDB server, and
uses this database for storing/retrieving the data.
Method Summary |
static void |
main(String[] args)
|
int |
run(String[] args)
Execute the command with the given arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBCountPageView
public DBCountPageView()
run
public int run(String[] args)
throws Exception
- Description copied from interface:
Tool
- Execute the command with the given arguments.
- Specified by:
run
in interface Tool
- Parameters:
args
- command specific arguments.
- Returns:
- exit code.
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2009 The Apache Software Foundation