Package org.apache.nutch.crawl
Class CrawlDbReader
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.util.AbstractChecker
org.apache.nutch.crawl.CrawlDbReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable,Tool
Read utility for the CrawlDB.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsFields inherited from class org.apache.nutch.util.AbstractChecker
keepClientCnxOpen, stdin, tcpPort, usage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()get(String crawlDb, String url, Configuration config) static voidprotected intprocess(String line, StringBuilder output) voidprocessDumpJob(String crawlDb, String output, Configuration config, String format, String regex, String status, Integer retry, String expr, Float sample) voidprocessStatJob(String crawlDb, Configuration config, boolean sort) voidprocessTopNJob(String crawlDb, long topN, float min, String output, Configuration config) voidreadUrl(String crawlDb, String url, Configuration config, StringBuilder output) intMethods inherited from class org.apache.nutch.util.AbstractChecker
getProtocolOutput, parseArgs, processSingle, processStdin, processTCP, runMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
crawlDb
-
-
Constructor Details
-
CrawlDbReader
public CrawlDbReader()
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
processStatJob
public void processStatJob(String crawlDb, Configuration config, boolean sort) throws IOException, InterruptedException, ClassNotFoundException -
get
- Throws:
IOException
-
process
- Specified by:
processin classAbstractChecker- Throws:
Exception
-
readUrl
public void readUrl(String crawlDb, String url, Configuration config, StringBuilder output) throws IOException - Throws:
IOException
-
processDumpJob
public void processDumpJob(String crawlDb, String output, Configuration config, String format, String regex, String status, Integer retry, String expr, Float sample) throws IOException, ClassNotFoundException, InterruptedException -
processTopNJob
public void processTopNJob(String crawlDb, long topN, float min, String output, Configuration config) throws IOException, ClassNotFoundException, InterruptedException -
run
public int run(String[] args) throws IOException, InterruptedException, ClassNotFoundException, Exception - Specified by:
runin interfaceTool- Throws:
IOExceptionInterruptedExceptionClassNotFoundExceptionException
-
main
- Throws:
Exception
-
query
public Object query(Map<String, String> args, Configuration conf, String type, String crawlId) throws Exception- Throws:
Exception
-