Package org.apache.nutch.util
Class NutchTool
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.util.NutchTool
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
CommonCrawlDataDumper,CrawlDb,DeduplicationJob,Fetcher,Generator,IndexingJob,Injector,LinkDb,ParseSegment
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatGet relative progress of the tool.Returns current status of the running toolbooleankillJob()Kill the job immediately.Runs the tool, using a map of arguments.voidsetConf(Configuration conf) booleanstopJob()Stop the job with the possibility to resume.Methods inherited from class org.apache.hadoop.conf.Configured
getConf
-
Field Details
-
results
-
status
-
currentJob
-
numJobs
protected int numJobs -
currentJobNum
protected int currentJobNum
-
-
Constructor Details
-
NutchTool
-
NutchTool
public NutchTool()
-
-
Method Details
-
run
Runs the tool, using a map of arguments. May return results, or null. -
setConf
- Specified by:
setConfin interfaceConfigurable- Overrides:
setConfin classConfigured
-
getProgress
public float getProgress()Get relative progress of the tool. Progress is represented as a float in range [0,1] where 1 is complete.- Returns:
- a float in range [0,1].
-
getStatus
Returns current status of the running tool- Returns:
- a populated
Map, the fields of which can be accessed to obtain status.
-
stopJob
Stop the job with the possibility to resume. Subclasses should override this, since by default it callskillJob(). -
killJob
Kill the job immediately. Clients should assume that any results that the job produced so far are in an inconsistent state or missing.
-