org.apache.nutch.crawl
Class Crawler

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.nutch.util.NutchTool
          extended by org.apache.nutch.crawl.Crawler
All Implemented Interfaces:
Configurable, Tool

public class Crawler
extends NutchTool
implements Tool


Field Summary
 
Fields inherited from class org.apache.nutch.util.NutchTool
currentJob, currentJobNum, numJobs
 
Constructor Summary
Crawler()
           
 
Method Summary
 float getProgress()
          Returns relative progress of the tool, a float in range [0,1].
 Map<String,Object> getStatus()
          Returns current status of the running tool.
 boolean killJob()
          Kill the job immediately.
static void main(String[] args)
           
 Map<String,Object> run(Map<String,Object> args)
          Runs the tool, using a map of arguments.
 int run(String[] args)
           
 boolean stopJob()
          Stop the job with the possibility to resume.
 
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

Crawler

public Crawler()
Method Detail

getStatus

public Map<String,Object> getStatus()
Description copied from class: NutchTool
Returns current status of the running tool.

Overrides:
getStatus in class NutchTool

stopJob

public boolean stopJob()
                throws Exception
Description copied from class: NutchTool
Stop the job with the possibility to resume. Subclasses should override this, since by default it calls NutchTool.killJob().

Overrides:
stopJob in class NutchTool
Returns:
true if succeeded, false otherwise
Throws:
Exception

killJob

public boolean killJob()
                throws Exception
Description copied from class: NutchTool
Kill the job immediately. Clients should assume that any results that the job produced so far are in inconsistent state or missing.

Overrides:
killJob in class NutchTool
Returns:
true if succeeded, false otherwise.
Throws:
Exception

run

public Map<String,Object> run(Map<String,Object> args)
                       throws Exception
Description copied from class: NutchTool
Runs the tool, using a map of arguments. May return results, or null.

Specified by:
run in class NutchTool
Throws:
Exception

getProgress

public float getProgress()
Description copied from class: NutchTool
Returns relative progress of the tool, a float in range [0,1].

Overrides:
getProgress in class NutchTool

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface Tool
Throws:
Exception

main

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


Copyright © 2012 The Apache Software Foundation