Nutch1.7源码再研究之---1 启动命令行

执行的命令 ./bin/nutch crawl ./urls -dir ./data  -threads  10  -depth  1  -topN  10

为了研究源码,这里观察nutch脚本最终执行的命令行即可。

---------------------------------------------------------------------------------------

nutch脚本的最后一行是exec $EXEC_CALL $CLASS "$@"

添加脚本:

echo $EXEC_CALL
echo $CLASS
echo $@
exit

---

屏幕上最终显示的是:

/usr/lib/jvm/jdk1.7.0_21/bin/java -Xmx1000m -Dhadoop.log.dir=/home/crawl/apache-nutch-1.7/runtime/local/logs -Dhadoop.log.file=hadoop.log -Djava.library.path=/home/crawl/apache-nutch-1.7/runtime/local/lib/native/Linux-amd64-64 -classpath /home/crawl/apache-nutch-1.7/runtime/local:/home/crawl/apache-nutch-1.7/runtime/local/conf:/usr/lib/jvm/jdk1.7.0_21/lib/tools.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/activation-1.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/apache-nutch-1.7.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/asm-3.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-beanutils-1.7.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-beanutils-core-1.8.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-cli-1.2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-codec-1.4.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-collections-3.2.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-configuration-1.6.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-digester-1.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-el-1.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-httpclient-3.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-io-2.4.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-lang-2.6.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-logging-1.1.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-math-2.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/commons-net-1.4.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/crawler-commons-0.2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/elasticsearch-0.90.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/guava-11.0.2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/hadoop-core-1.2.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/httpclient-4.1.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/httpcore-4.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/icu4j-4.0.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jackson-core-asl-1.8.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jackson-jaxrs-1.7.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jackson-mapper-asl-1.8.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jackson-xc-1.7.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jasper-compiler-5.5.12.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jasper-runtime-5.5.12.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jaxb-api-2.2.2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jaxb-impl-2.2.3-1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jersey-core-1.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jersey-json-1.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jersey-server-1.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jettison-1.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jetty-6.1.26.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jetty-client-6.1.22.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jetty-sslengine-6.1.22.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jetty-util5-6.1.22.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jetty-util-6.1.26.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jline-0.9.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jsp-2.1-6.1.14.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jsp-api-2.1-6.1.14.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/jsr305-1.3.9.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/junit-3.8.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/log4j-1.2.15.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-analyzers-common-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-codecs-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-core-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-grouping-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-highlighter-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-join-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-memory-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-queries-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-queryparser-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-sandbox-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-spatial-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/lucene-suggest-4.3.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/mail-1.4.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/oro-2.0.8.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/servlet-api-2.5-20081211.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/servlet-api-2.5-6.1.14.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/slf4j-api-1.6.6.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/slf4j-log4j12-1.6.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/solr-solrj-3.4.0.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/spatial4j-0.3.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/stax-api-1.0.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/stax-api-1.0-2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/tika-core-1.3.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/wstx-asl-3.2.7.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/xercesImpl-2.9.1.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/xml-apis-1.3.04.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/xmlenc-0.52.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/xmlParserAPIs-2.6.2.jar:/home/crawl/apache-nutch-1.7/runtime/local/lib/zookeeper-3.3.1.jar
org.apache.nutch.crawl.Crawl
./urls -dir ./data -threads 10 -depth 1 -topN 10

---

红色为入口类。

后面我们从Crawl类入手来研究Nutch 1.7!

你可能感兴趣的:(Nutch)