Class NodeDumper
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.scoring.webgraph.NodeDumper
- All Implemented Interfaces:
Configurable,Tool
A tools that dumps out the top urls by number of inlinks, number of outlinks,
or by score, to a text file. One of the major uses of this tool is to check
the top scoring urls of a link analysis program such as LinkRank.
For number of inlinks or number of outlinks the WebGraph program will need to
have been run. For link analysis score a program such as LinkRank will need
to have been run which updates the NodeDb of the WebGraph.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOutputs the hosts or domains with an associated value.static classOutputs the top urls sorted in descending order. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddumpNodes(Path webGraphDb, org.apache.nutch.scoring.webgraph.NodeDumper.DumpType type, long topN, Path output, boolean asEff, org.apache.nutch.scoring.webgraph.NodeDumper.NameType nameType, org.apache.nutch.scoring.webgraph.NodeDumper.AggrType aggrType, boolean asSequenceFile) Runs the process to dump the top urls out to a text file.static voidintRuns the node dumper tool.Methods 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
-
Constructor Details
-
NodeDumper
public NodeDumper()
-
-
Method Details
-
dumpNodes
public void dumpNodes(Path webGraphDb, org.apache.nutch.scoring.webgraph.NodeDumper.DumpType type, long topN, Path output, boolean asEff, org.apache.nutch.scoring.webgraph.NodeDumper.NameType nameType, org.apache.nutch.scoring.webgraph.NodeDumper.AggrType aggrType, boolean asSequenceFile) throws Exception Runs the process to dump the top urls out to a text file.- Parameters:
webGraphDb- TheWebGraphfrom which to pull values.type- the node property type to dump, one ofNodeDumper.DumpType.INLINKS,NodeDumper.DumpType.OUTLINKSorNodeDumper.DumpType.SCOREStopN- maximum value of top links to dumpoutput- aPathto write output toasEff- if true set equals-sign as separator for Solr's ExternalFileField, false otherwisenameType- eitherNodeDumper.NameType.HOSTorNodeDumper.NameType.DOMAINaggrType- the aggregation type, eitherNodeDumper.AggrType.MAXorNodeDumper.AggrType.SUMasSequenceFile- true output will be written asSequenceFileOutputFormat, otherwise defaultTextOutputFormat- Throws:
Exception- If an error occurs while dumping the top values.
-
main
- Throws:
Exception
-
run
Runs the node dumper tool.
-