ccordovas

Untitled

Aug 31st, 2014
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.44 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. HERITRIX 3 CRAWL JOB CONFIGURATION FILE
  4.  
  5. This is a relatively minimal configuration suitable for many crawls.
  6.  
  7. Commented-out beans and properties are provided as an example; values
  8. shown in comments reflect the actual defaults which are in effect
  9. if not otherwise specified specification. (To change from the default
  10. behavior, uncomment AND alter the shown values.)
  11. -->
  12. <beans xmlns="http://www.springframework.org/schema/beans"
  13. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  14. xmlns:context="http://www.springframework.org/schema/context"
  15. xmlns:aop="http://www.springframework.org/schema/aop"
  16. xmlns:tx="http://www.springframework.org/schema/tx"
  17. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  18. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  19. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  20. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
  21.  
  22. <context:annotation-config/>
  23.  
  24. <!--
  25. OVERRIDES
  26. Values elsewhere in the configuration may be replaced ('overridden')
  27. by a Properties map declared in a PropertiesOverrideConfigurer,
  28. using a dotted-bean-path to address individual bean properties.
  29. This allows us to collect a few of the most-often changed values
  30. in an easy-to-edit format here at the beginning of the model
  31. configuration.
  32. -->
  33. <!-- overrides from a text property list -->
  34. <bean id="simpleOverrides" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
  35. <property name="properties">
  36. <value>
  37. # This Properties map is specified in the Java 'property list' text format
  38. # http://java.sun.com/javase/6/docs/api/java/util/Properties.html#load%28java.io.Reader%29
  39.  
  40. metadata.operatorContactUrl=http://www.dibam.cl
  41. metadata.jobName=basic
  42. metadata.description=Cosecha desde Biblioteca Nacional
  43. ##..more?..##
  44. </value>
  45. </property>
  46. </bean>
  47.  
  48. <!-- overrides from declared <prop> elements, more easily allowing
  49. multiline values or even declared beans -->
  50. <bean id="longerOverrides" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
  51. <property name="properties">
  52. <props>
  53. <prop key="seeds.textSource.value">
  54. # URLS HERE
  55. http://www.dibam.cl
  56. http://fonts.googleapis.com/css?family=Pontano+Sans
  57. http://fonts.googleapis.com/css?family=Oswald
  58. http://fonts.googleapis.com/css?family=Open+Sans
  59.  
  60. http://www.dibam.cl/JS/functions.js
  61. http://maps.gstatic.com/mapfiles/api-3/17/9/common.js
  62. http://maps.gstatic.com/mapfiles/api-3/17/9/map.js
  63. http://maps.gstatic.com/mapfiles/api-3/17/9/util.js
  64. http://maps.gstatic.com/mapfiles/api-3/17/9/marker.js
  65. http://maps.gstatic.com/mapfiles/api-3/17/9/stats.js
  66.  
  67.  
  68. </prop>
  69. </props>
  70. </property>
  71. </bean>
  72.  
  73. <!-- CRAWL METADATA: including identification of crawler/operator -->
  74. <bean id="metadata" class="org.archive.modules.CrawlMetadata" autowire="byName">
  75. <property name="operatorContactUrl" value="[see override above]"/>
  76. <property name="jobName" value="[see override above]"/>
  77. <property name="description" value="[see override above]"/>
  78. <property name="robotsPolicyName" value="obey"/>
  79. <property name="operator" value=""/>
  80. <property name="operatorFrom" value=""/>
  81. <property name="organization" value=""/>
  82. <property name="audience" value=""/>
  83. <property name="userAgentTemplate"
  84. value="Mozilla/5.0 (compatible; heritrix/@VERSION@ +@OPERATOR_CONTACT_URL@)"/>
  85.  
  86. </bean>
  87.  
  88. <!-- SEEDS: crawl starting points
  89. ConfigString allows simple, inline specification of a moderate
  90. number of seeds; see below comment for example of using an
  91. arbitrarily-large external file. -->
  92. <bean id="seeds" class="org.archive.modules.seeds.TextSeedModule">
  93. <property name="textSource">
  94. <bean class="org.archive.spring.ConfigString">
  95. <property name="value">
  96. <value>
  97. # [see override above]
  98. </value>
  99. </property>
  100. </bean>
  101. </property>
  102. <!-- <property name='sourceTagSeeds' value='false'/> -->
  103. <!-- <property name='blockAwaitingSeedLines' value='-1'/> -->
  104. </bean>
  105.  
  106. <!-- SEEDS ALTERNATE APPROACH: specifying external seeds.txt file in
  107. the job directory, similar to the H1 approach.
  108. Use either the above, or this, but not both. -->
  109. <!--
  110. <bean id="seeds" class="org.archive.modules.seeds.TextSeedModule">
  111. <property name="textSource">
  112. <bean class="org.archive.spring.ConfigFile">
  113. <property name="path" value="seeds.txt" />
  114. </bean>
  115. </property>
  116. <property name='sourceTagSeeds' value='false'/>
  117. <property name='blockAwaitingSeedLines' value='-1'/>
  118. </bean>
  119. -->
  120.  
  121. <bean id="acceptSurts" class="org.archive.modules.deciderules.surt.SurtPrefixedDecideRule">
  122. <!-- <property name="decision" value="ACCEPT"/> -->
  123. <!-- <property name="seedsAsSurtPrefixes" value="true" /> -->
  124. <!-- <property name="alsoCheckVia" value="false" /> -->
  125. <!-- <property name="surtsSourceFile" value="" /> -->
  126. <!-- <property name="surtsDumpFile" value="${launchId}/surts.dump" /> -->
  127. <!-- <property name="surtsSource">
  128. <bean class="org.archive.spring.ConfigString">
  129. <property name="value">
  130. <value>
  131. # example.com
  132. # http://www.example.edu/path1/
  133. # +http://(org,example,
  134. </value>
  135. </property>
  136. </bean>
  137. </property> -->
  138. </bean>
  139.  
  140. <!-- SCOPE: rules for which discovered URIs to crawl; order is very
  141. important because last decision returned other than 'NONE' wins. -->
  142. <bean id="scope" class="org.archive.modules.deciderules.DecideRuleSequence">
  143. <!-- <property name="logToFile" value="false" /> -->
  144. <property name="rules">
  145. <list>
  146. <!-- Begin by REJECTing all... -->
  147. <bean class="org.archive.modules.deciderules.RejectDecideRule" />
  148. <!-- ...then ACCEPT those within configured/seed-implied SURT prefixes... -->
  149. <ref bean="acceptSurts" />
  150. <!-- ...but REJECT those more than a configured link-hop-count from start... -->
  151. <bean class="org.archive.modules.deciderules.TooManyHopsDecideRule">
  152. <!-- <property name="maxHops" value="20" /> -->
  153. </bean>
  154. <!-- ...but ACCEPT those more than a configured link-hop-count from start... -->
  155. <bean class="org.archive.modules.deciderules.TransclusionDecideRule">
  156. <!-- <property name="maxTransHops" value="2" /> -->
  157. <!-- <property name="maxSpeculativeHops" value="1" /> -->
  158. </bean>
  159. <!-- ...but REJECT those from a configurable (initially empty) set of REJECT SURTs... -->
  160. <bean class="org.archive.modules.deciderules.surt.SurtPrefixedDecideRule">
  161. <property name="decision" value="REJECT"/>
  162. <property name="seedsAsSurtPrefixes" value="false"/>
  163. <property name="surtsDumpFile" value="${launchId}/negative-surts.dump" />
  164. <!-- <property name="surtsSource">
  165. <bean class="org.archive.spring.ConfigFile">
  166. <property name="path" value="negative-surts.txt" />
  167. </bean>
  168. </property> -->
  169. </bean>
  170. <!-- ...and REJECT those from a configurable (initially empty) set of URI regexes... -->
  171. <bean class="org.archive.modules.deciderules.MatchesListRegexDecideRule">
  172. <property name="decision" value="REJECT"/>
  173. <!-- <property name="listLogicalOr" value="true" /> -->
  174. <!-- <property name="regexList">
  175. <list>
  176. </list>
  177. </property> -->
  178. </bean>
  179. <!-- ...and REJECT those with suspicious repeating path-segments... -->
  180. <bean class="org.archive.modules.deciderules.PathologicalPathDecideRule">
  181. <!-- <property name="maxRepetitions" value="2" /> -->
  182. </bean>
  183. <!-- ...and REJECT those with more than threshold number of path-segments... -->
  184. <bean class="org.archive.modules.deciderules.TooManyPathSegmentsDecideRule">
  185. <!-- <property name="maxPathDepth" value="20" /> -->
  186. </bean>
  187. <!-- ...but always ACCEPT those marked as prerequisitee for another URI... -->
  188. <bean class="org.archive.modules.deciderules.PrerequisiteAcceptDecideRule">
  189. </bean>
  190. <!-- ...but always REJECT those with unsupported URI schemes -->
  191. <bean class="org.archive.modules.deciderules.SchemeNotInSetDecideRule">
  192. </bean>
  193. </list>
  194. </property>
  195. </bean>
  196.  
  197. <!--
  198. PROCESSING CHAINS
  199. Much of the crawler's work is specified by the sequential
  200. application of swappable Processor modules. These Processors
  201. are collected into three 'chains'. The CandidateChain is applied
  202. to URIs being considered for inclusion, before a URI is enqueued
  203. for collection. The FetchChain is applied to URIs when their
  204. turn for collection comes up. The DispositionChain is applied
  205. after a URI is fetched and analyzed/link-extracted.
  206. -->
  207.  
  208. <!-- CANDIDATE CHAIN -->
  209. <!-- first, processors are declared as top-level named beans -->
  210. <bean id="candidateScoper" class="org.archive.crawler.prefetch.CandidateScoper">
  211. </bean>
  212. <bean id="preparer" class="org.archive.crawler.prefetch.FrontierPreparer">
  213. <!-- <property name="preferenceDepthHops" value="-1" /> -->
  214. <!-- <property name="preferenceEmbedHops" value="1" /> -->
  215. <!-- <property name="canonicalizationPolicy">
  216. <ref bean="canonicalizationPolicy" />
  217. </property> -->
  218. <!-- <property name="queueAssignmentPolicy">
  219. <ref bean="queueAssignmentPolicy" />
  220. </property> -->
  221. <!-- <property name="uriPrecedencePolicy">
  222. <ref bean="uriPrecedencePolicy" />
  223. </property> -->
  224. <!-- <property name="costAssignmentPolicy">
  225. <ref bean="costAssignmentPolicy" />
  226. </property> -->
  227. </bean>
  228. <!-- now, processors are assembled into ordered CandidateChain bean -->
  229. <bean id="candidateProcessors" class="org.archive.modules.CandidateChain">
  230. <property name="processors">
  231. <list>
  232. <!-- apply scoping rules to each individual candidate URI... -->
  233. <ref bean="candidateScoper"/>
  234. <!-- ...then prepare those ACCEPTed to be enqueued to frontier. -->
  235. <ref bean="preparer"/>
  236. </list>
  237. </property>
  238. </bean>
  239.  
  240. <!-- FETCH CHAIN -->
  241. <!-- first, processors are declared as top-level named beans -->
  242. <bean id="preselector" class="org.archive.crawler.prefetch.Preselector">
  243. <!-- <property name="recheckScope" value="false" /> -->
  244. <!-- <property name="blockAll" value="false" /> -->
  245. <!-- <property name="blockByRegex" value="" /> -->
  246. <!-- <property name="allowByRegex" value="" /> -->
  247. </bean>
  248. <bean id="preconditions" class="org.archive.crawler.prefetch.PreconditionEnforcer">
  249. <!-- <property name="ipValidityDurationSeconds" value="21600" /> -->
  250. <!-- <property name="robotsValidityDurationSeconds" value="86400" /> -->
  251. <!-- <property name="calculateRobotsOnly" value="false" /> -->
  252. </bean>
  253. <bean id="fetchDns" class="org.archive.modules.fetcher.FetchDNS">
  254. <!-- <property name="acceptNonDnsResolves" value="false" /> -->
  255. <!-- <property name="digestContent" value="true" /> -->
  256. <!-- <property name="digestAlgorithm" value="sha1" /> -->
  257. </bean>
  258. <!-- <bean id="fetchWhois" class="org.archive.modules.fetcher.FetchWhois">
  259. <property name="specialQueryTemplates">
  260. <map>
  261. <entry key="whois.verisign-grs.com" value="domain %s" />
  262. <entry key="whois.arin.net" value="z + %s" />
  263. <entry key="whois.denic.de" value="-T dn %s" />
  264. </map>
  265. </property>
  266. </bean> -->
  267. <bean id="fetchHttp" class="org.archive.modules.fetcher.FetchHTTP">
  268. <!-- <property name="useHTTP11" value="false" /> -->
  269. <!-- <property name="maxLengthBytes" value="0" /> -->
  270. <!-- <property name="timeoutSeconds" value="1200" /> -->
  271. <!-- <property name="maxFetchKBSec" value="0" /> -->
  272. <!-- <property name="defaultEncoding" value="ISO-8859-1" /> -->
  273. <!-- <property name="shouldFetchBodyRule">
  274. <bean class="org.archive.modules.deciderules.AcceptDecideRule"/>
  275. </property> -->
  276. <!-- <property name="soTimeoutMs" value="20000" /> -->
  277. <!-- <property name="sendIfModifiedSince" value="true" /> -->
  278. <!-- <property name="sendIfNoneMatch" value="true" /> -->
  279. <!-- <property name="sendConnectionClose" value="true" /> -->
  280. <!-- <property name="sendReferer" value="true" /> -->
  281. <!-- <property name="sendRange" value="false" /> -->
  282. <!-- <property name="ignoreCookies" value="false" /> -->
  283. <!-- <property name="sslTrustLevel" value="OPEN" /> -->
  284. <!-- <property name="acceptHeaders">
  285. <list>
  286. <value>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</value>
  287. </list>
  288. </property>
  289. -->
  290. <!-- <property name="httpBindAddress" value="" /> -->
  291. <!-- <property name="httpProxyHost" value="" /> -->
  292. <!-- <property name="httpProxyPort" value="0" /> -->
  293. <!-- <property name="httpProxyUser" value="" /> -->
  294. <!-- <property name="httpProxyPassword" value="" /> -->
  295. <!-- <property name="digestContent" value="true" /> -->
  296. <!-- <property name="digestAlgorithm" value="sha1" /> -->
  297. </bean>
  298. <bean id="extractorHttp" class="org.archive.modules.extractor.ExtractorHTTP">
  299. </bean>
  300. <bean id="extractorHtml" class="org.archive.modules.extractor.ExtractorHTML">
  301. <!-- <property name="extractJavascript" value="true" /> -->
  302. <!-- <property name="extractValueAttributes" value="true" /> -->
  303. <!-- <property name="ignoreFormActionUrls" value="false" /> -->
  304. <!-- <property name="extractOnlyFormGets" value="true" /> -->
  305. <!-- <property name="treatFramesAsEmbedLinks" value="true" /> -->
  306. <!-- <property name="ignoreUnexpectedHtml" value="true" /> -->
  307. <!-- <property name="maxElementLength" value="1024" /> -->
  308. <!-- <property name="maxAttributeNameLength" value="1024" /> -->
  309. <!-- <property name="maxAttributeValueLength" value="16384" /> -->
  310. </bean>
  311. <bean id="extractorCss" class="org.archive.modules.extractor.ExtractorCSS">
  312. </bean>
  313. <bean id="extractorJs" class="org.archive.modules.extractor.ExtractorJS">
  314. </bean>
  315. <bean id="extractorSwf" class="org.archive.modules.extractor.ExtractorSWF">
  316. </bean>
  317. <!-- now, processors are assembled into ordered FetchChain bean -->
  318. <bean id="fetchProcessors" class="org.archive.modules.FetchChain">
  319. <property name="processors">
  320. <list>
  321. <!-- re-check scope, if so enabled... -->
  322. <ref bean="preselector"/>
  323. <!-- ...then verify or trigger prerequisite URIs fetched, allow crawling... -->
  324. <ref bean="preconditions"/>
  325. <!-- ...fetch if DNS URI... -->
  326. <ref bean="fetchDns"/>
  327. <!-- <ref bean="fetchWhois"/> -->
  328. <!-- ...fetch if HTTP URI... -->
  329. <ref bean="fetchHttp"/>
  330. <!-- ...extract outlinks from HTTP headers... -->
  331. <ref bean="extractorHttp"/>
  332. <!-- ...extract outlinks from HTML content... -->
  333. <ref bean="extractorHtml"/>
  334. <!-- ...extract outlinks from CSS content... -->
  335. <ref bean="extractorCss"/>
  336. <!-- ...extract outlinks from Javascript content... -->
  337. <ref bean="extractorJs"/>
  338. <!-- ...extract outlinks from Flash content... -->
  339. <ref bean="extractorSwf"/>
  340. </list>
  341. </property>
  342. </bean>
  343.  
  344. <!-- DISPOSITION CHAIN -->
  345. <!-- first, processors are declared as top-level named beans -->
  346. <bean id="warcWriter" class="org.archive.modules.writer.WARCWriterProcessor">
  347. <!-- <property name="compress" value="true" /> -->
  348. <!-- <property name="prefix" value="IAH" /> -->
  349. <!-- <property name="suffix" value="${HOSTNAME}" /> -->
  350. <!-- <property name="maxFileSizeBytes" value="1000000000" /> -->
  351. <!-- <property name="poolMaxActive" value="1" /> -->
  352. <!-- <property name="MaxWaitForIdleMs" value="500" /> -->
  353. <!-- <property name="skipIdenticalDigests" value="false" /> -->
  354. <!-- <property name="maxTotalBytesToWrite" value="0" /> -->
  355. <!-- <property name="directory" value="${launchId}" /> -->
  356. <!-- <property name="storePaths">
  357. <list>
  358. <value>warcs</value>
  359. </list>
  360. </property> -->
  361. <!-- <property name="template" value="${prefix}-${timestamp17}-${serialno}-${heritrix.pid}~${heritrix.hostname}~${heritrix.port}" /> -->
  362. <!-- <property name="writeRequests" value="true" /> -->
  363. <!-- <property name="writeMetadata" value="true" /> -->
  364. <!-- <property name="writeRevisitForIdenticalDigests" value="true" /> -->
  365. <!-- <property name="writeRevisitForNotModified" value="true" /> -->
  366. <!-- <property name="startNewFilesOnCheckpoint" value="true" /> -->
  367. </bean>
  368. <bean id="candidates" class="org.archive.crawler.postprocessor.CandidatesProcessor">
  369. <!-- <property name="seedsRedirectNewSeeds" value="true" /> -->
  370. <!-- <property name="processErrorOutlinks" value="false" /> -->
  371. </bean>
  372. <bean id="disposition" class="org.archive.crawler.postprocessor.DispositionProcessor">
  373. <!-- <property name="delayFactor" value="5.0" /> -->
  374. <!-- <property name="minDelayMs" value="3000" /> -->
  375. <!-- <property name="respectCrawlDelayUpToSeconds" value="300" /> -->
  376. <!-- <property name="maxDelayMs" value="30000" /> -->
  377. <!-- <property name="maxPerHostBandwidthUsageKbSec" value="0" /> -->
  378. </bean>
  379. <!-- <bean id="rescheduler" class="org.archive.crawler.postprocessor.ReschedulingProcessor">
  380. <property name="rescheduleDelaySeconds" value="-1" />
  381. </bean> -->
  382. <!-- now, processors are assembled into ordered DispositionChain bean -->
  383. <bean id="dispositionProcessors" class="org.archive.modules.DispositionChain">
  384. <property name="processors">
  385. <list>
  386. <!-- write to aggregate archival files... -->
  387. <ref bean="warcWriter"/>
  388. <!-- ...send each outlink candidate URI to CandidateChain,
  389. and enqueue those ACCEPTed to the frontier... -->
  390. <ref bean="candidates"/>
  391. <!-- ...then update stats, shared-structures, frontier decisions -->
  392. <ref bean="disposition"/>
  393. <!-- <ref bean="rescheduler" /> -->
  394. </list>
  395. </property>
  396. </bean>
  397.  
  398. <!-- CRAWLCONTROLLER: Control interface, unifying context -->
  399. <bean id="crawlController"
  400. class="org.archive.crawler.framework.CrawlController">
  401. <!-- <property name="maxToeThreads" value="25" /> -->
  402. <!-- <property name="pauseAtStart" value="true" /> -->
  403. <!-- <property name="runWhileEmpty" value="false" /> -->
  404. <!-- <property name="recorderInBufferBytes" value="524288" /> -->
  405. <!-- <property name="recorderOutBufferBytes" value="16384" /> -->
  406. <!-- <property name="scratchDir" value="scratch" /> -->
  407. </bean>
  408.  
  409. <!-- FRONTIER: Record of all URIs discovered and queued-for-collection -->
  410. <bean id="frontier"
  411. class="org.archive.crawler.frontier.BdbFrontier">
  412. <!-- <property name="queueTotalBudget" value="-1" /> -->
  413. <!-- <property name="balanceReplenishAmount" value="3000" /> -->
  414. <!-- <property name="errorPenaltyAmount" value="100" /> -->
  415. <!-- <property name="precedenceFloor" value="255" /> -->
  416. <!-- <property name="queuePrecedencePolicy">
  417. <bean class="org.archive.crawler.frontier.precedence.BaseQueuePrecedencePolicy" />
  418. </property> -->
  419. <!-- <property name="snoozeLongMs" value="300000" /> -->
  420. <!-- <property name="retryDelaySeconds" value="900" /> -->
  421. <!-- <property name="maxRetries" value="30" /> -->
  422. <!-- <property name="recoveryLogEnabled" value="true" /> -->
  423. <!-- <property name="maxOutlinks" value="6000" /> -->
  424. <!-- <property name="extractIndependently" value="false" /> -->
  425. <!-- <property name="outbound">
  426. <bean class="java.util.concurrent.ArrayBlockingQueue">
  427. <constructor-arg value="200"/>
  428. <constructor-arg value="true"/>
  429. </bean>
  430. </property> -->
  431. <!-- <property name="inbound">
  432. <bean class="java.util.concurrent.ArrayBlockingQueue">
  433. <constructor-arg value="40000"/>
  434. <constructor-arg value="true"/>
  435. </bean>
  436. </property> -->
  437. <!-- <property name="dumpPendingAtClose" value="false" /> -->
  438. </bean>
  439.  
  440. <!-- URI UNIQ FILTER: Used by frontier to remember already-included URIs -->
  441. <bean id="uriUniqFilter"
  442. class="org.archive.crawler.util.BdbUriUniqFilter">
  443. </bean>
  444.  
  445. <!--
  446. EXAMPLE SETTINGS OVERLAY SHEETS
  447. Sheets allow some settings to vary by context - usually by URI context,
  448. so that different sites or sections of sites can be treated differently.
  449. Here are some example Sheets for common purposes. The SheetOverlaysManager
  450. (below) automatically collects all Sheet instances declared among the
  451. original beans, but others can be added during the crawl via the scripting
  452. interface.
  453. -->
  454.  
  455. <!-- forceRetire: any URI to which this sheet's settings are applied
  456. will force its containing queue to 'retired' status. -->
  457. <bean id='forceRetire' class='org.archive.spring.Sheet'>
  458. <property name='map'>
  459. <map>
  460. <entry key='disposition.forceRetire' value='true'/>
  461. </map>
  462. </property>
  463. </bean>
  464.  
  465. <!-- smallBudget: any URI to which this sheet's settings are applied
  466. will give its containing queue small values for balanceReplenishAmount
  467. (causing it to have shorter 'active' periods while other queues are
  468. waiting) and queueTotalBudget (causing the queue to enter 'retired'
  469. status once that expenditure is reached by URI attempts and errors) -->
  470. <bean id='smallBudget' class='org.archive.spring.Sheet'>
  471. <property name='map'>
  472. <map>
  473. <entry key='frontier.balanceReplenishAmount' value='20'/>
  474. <entry key='frontier.queueTotalBudget' value='100'/>
  475. </map>
  476. </property>
  477. </bean>
  478.  
  479. <!-- veryPolite: any URI to which this sheet's settings are applied
  480. will cause its queue to take extra-long politeness snoozes -->
  481. <bean id='veryPolite' class='org.archive.spring.Sheet'>
  482. <property name='map'>
  483. <map>
  484. <entry key='disposition.delayFactor' value='10'/>
  485. <entry key='disposition.minDelayMs' value='10000'/>
  486. <entry key='disposition.maxDelayMs' value='1000000'/>
  487. <entry key='disposition.respectCrawlDelayUpToSeconds' value='3600'/>
  488. </map>
  489. </property>
  490. </bean>
  491.  
  492. <!-- highPrecedence: any URI to which this sheet's settings are applied
  493. will give its containing queue a slightly-higher than default
  494. queue precedence value. That queue will then be preferred over
  495. other queues for active crawling, never waiting behind lower-
  496. precedence queues. -->
  497. <bean id='highPrecedence' class='org.archive.spring.Sheet'>
  498. <property name='map'>
  499. <map>
  500. <entry key='frontier.balanceReplenishAmount' value='20'/>
  501. <entry key='frontier.queueTotalBudget' value='100'/>
  502. </map>
  503. </property>
  504. </bean>
  505.  
  506. <!--
  507. EXAMPLE SETTINGS OVERLAY SHEET-ASSOCIATION
  508. A SheetAssociation says certain URIs should have certain overlay Sheets
  509. applied. This example applies two sheets to URIs matching two SURT-prefixes.
  510. New associations may also be added mid-crawl using the scripting facility.
  511. -->
  512.  
  513. <!--
  514. <bean class='org.archive.crawler.spring.SurtPrefixesSheetAssociation'>
  515. <property name='surtPrefixes'>
  516. <list>
  517. <value>http://(org,example,</value>
  518. <value>http://(com,example,www,)/</value>
  519. </list>
  520. </property>
  521. <property name='targetSheetNames'>
  522. <list>
  523. <value>veryPolite</value>
  524. <value>smallBudget</value>
  525. </list>
  526. </property>
  527. </bean>
  528. -->
  529.  
  530. <!--
  531. OPTIONAL BUT RECOMMENDED BEANS
  532. -->
  533.  
  534. <!-- ACTIONDIRECTORY: disk directory for mid-crawl operations
  535. Running job will watch directory for new files with URIs,
  536. scripts, and other data to be processed during a crawl. -->
  537. <bean id="actionDirectory" class="org.archive.crawler.framework.ActionDirectory">
  538. <!-- <property name="actionDir" value="action" /> -->
  539. <!-- <property name="doneDir" value="${launchId}/actions-done" /> -->
  540. <!-- <property name="initialDelaySeconds" value="10" /> -->
  541. <!-- <property name="delaySeconds" value="30" /> -->
  542. </bean>
  543.  
  544. <!-- CRAWLLIMITENFORCER: stops crawl when it reaches configured limits -->
  545. <bean id="crawlLimiter" class="org.archive.crawler.framework.CrawlLimitEnforcer">
  546. <!-- <property name="maxBytesDownload" value="0" /> -->
  547. <!-- <property name="maxDocumentsDownload" value="0" /> -->
  548. <!-- <property name="maxTimeSeconds" value="0" /> -->
  549. </bean>
  550.  
  551. <!-- CHECKPOINTSERVICE: checkpointing assistance -->
  552. <bean id="checkpointService"
  553. class="org.archive.crawler.framework.CheckpointService">
  554. <!-- <property name="checkpointIntervalMinutes" value="-1"/> -->
  555. <!-- <property name="checkpointsDir" value="checkpoints"/> -->
  556. <!-- <property name="forgetAllButLatest" value="true"/> -->
  557. </bean>
  558.  
  559. <!--
  560. OPTIONAL BEANS
  561. Uncomment and expand as needed, or if non-default alternate
  562. implementations are preferred.
  563. -->
  564.  
  565. <!-- CANONICALIZATION POLICY -->
  566. <!--
  567. <bean id="canonicalizationPolicy"
  568. class="org.archive.modules.canonicalize.RulesCanonicalizationPolicy">
  569. <property name="rules">
  570. <list>
  571. <bean class="org.archive.modules.canonicalize.LowercaseRule" />
  572. <bean class="org.archive.modules.canonicalize.StripUserinfoRule" />
  573. <bean class="org.archive.modules.canonicalize.StripWWWNRule" />
  574. <bean class="org.archive.modules.canonicalize.StripSessionIDs" />
  575. <bean class="org.archive.modules.canonicalize.StripSessionCFIDs" />
  576. <bean class="org.archive.modules.canonicalize.FixupQueryString" />
  577. </list>
  578. </property>
  579. </bean>
  580. -->
  581.  
  582.  
  583. <!-- QUEUE ASSIGNMENT POLICY -->
  584. <!--
  585. <bean id="queueAssignmentPolicy"
  586. class="org.archive.crawler.frontier.SurtAuthorityQueueAssignmentPolicy">
  587. <property name="forceQueueAssignment" value="" />
  588. <property name="deferToPrevious" value="true" />
  589. <property name="parallelQueues" value="1" />
  590. </bean>
  591. -->
  592.  
  593. <!-- URI PRECEDENCE POLICY -->
  594. <!--
  595. <bean id="uriPrecedencePolicy"
  596. class="org.archive.crawler.frontier.precedence.CostUriPrecedencePolicy">
  597. </bean>
  598. -->
  599.  
  600. <!-- COST ASSIGNMENT POLICY -->
  601. <!--
  602. <bean id="costAssignmentPolicy"
  603. class="org.archive.crawler.frontier.UnitCostAssignmentPolicy">
  604. </bean>
  605. -->
  606.  
  607. <!-- CREDENTIAL STORE: HTTP authentication or FORM POST credentials -->
  608. <!--
  609. <bean id="credentialStore"
  610. class="org.archive.modules.credential.CredentialStore">
  611. </bean>
  612. -->
  613.  
  614. <!-- DISK SPACE MONITOR:
  615. Pauses the crawl if disk space at monitored paths falls below minimum threshold -->
  616. <!--
  617. <bean id="diskSpaceMonitor" class="org.archive.crawler.monitor.DiskSpaceMonitor">
  618. <property name="pauseThresholdMiB" value="500" />
  619. <property name="monitorConfigPaths" value="true" />
  620. <property name="monitorPaths">
  621. <list>
  622. <value>PATH</value>
  623. </list>
  624. </property>
  625. </bean>
  626. -->
  627.  
  628. <!--
  629. REQUIRED STANDARD BEANS
  630. It will be very rare to replace or reconfigure the following beans.
  631. -->
  632.  
  633. <!-- STATISTICSTRACKER: standard stats/reporting collector -->
  634. <bean id="statisticsTracker"
  635. class="org.archive.crawler.reporting.StatisticsTracker" autowire="byName">
  636. <!-- <property name="reports">
  637. <list>
  638. <bean id="crawlSummaryReport" class="org.archive.crawler.reporting.CrawlSummaryReport" />
  639. <bean id="seedsReport" class="org.archive.crawler.reporting.SeedsReport" />
  640. <bean id="hostsReport" class="org.archive.crawler.reporting.HostsReport" />
  641. <bean id="sourceTagsReport" class="org.archive.crawler.reporting.SourceTagsReport" />
  642. <bean id="mimetypesReport" class="org.archive.crawler.reporting.MimetypesReport" />
  643. <bean id="responseCodeReport" class="org.archive.crawler.reporting.ResponseCodeReport" />
  644. <bean id="processorsReport" class="org.archive.crawler.reporting.ProcessorsReport" />
  645. <bean id="frontierSummaryReport" class="org.archive.crawler.reporting.FrontierSummaryReport" />
  646. <bean id="frontierNonemptyReport" class="org.archive.crawler.reporting.FrontierNonemptyReport" />
  647. <bean id="toeThreadsReport" class="org.archive.crawler.reporting.ToeThreadsReport" />
  648. </list>
  649. </property> -->
  650. <!-- <property name="reportsDir" value="${launchId}/reports" /> -->
  651. <!-- <property name="liveHostReportSize" value="20" /> -->
  652. <!-- <property name="intervalSeconds" value="20" /> -->
  653. <!-- <property name="keepSnapshotsCount" value="5" /> -->
  654. <!-- <property name="liveHostReportSize" value="20" /> -->
  655. </bean>
  656.  
  657. <!-- CRAWLERLOGGERMODULE: shared logging facility -->
  658. <bean id="loggerModule"
  659. class="org.archive.crawler.reporting.CrawlerLoggerModule">
  660. <!-- <property name="path" value="${launchId}/logs" /> -->
  661. <!-- <property name="crawlLogPath" value="crawl.log" /> -->
  662. <!-- <property name="alertsLogPath" value="alerts.log" /> -->
  663. <!-- <property name="progressLogPath" value="progress-statistics.log" /> -->
  664. <!-- <property name="uriErrorsLogPath" value="uri-errors.log" /> -->
  665. <!-- <property name="runtimeErrorsLogPath" value="runtime-errors.log" /> -->
  666. <!-- <property name="nonfatalErrorsLogPath" value="nonfatal-errors.log" /> -->
  667. <!-- <property name="logExtraInfo" value="false" /> -->
  668. </bean>
  669.  
  670. <!-- SHEETOVERLAYMANAGER: manager of sheets of contextual overlays
  671. Autowired to include any SheetForSurtPrefix or
  672. SheetForDecideRuled beans -->
  673. <bean id="sheetOverlaysManager" autowire="byType"
  674. class="org.archive.crawler.spring.SheetOverlaysManager">
  675. </bean>
  676.  
  677. <!-- BDBMODULE: shared BDB-JE disk persistence manager -->
  678. <bean id="bdb"
  679. class="org.archive.bdb.BdbModule">
  680. <!-- <property name="dir" value="state" /> -->
  681. <!-- if neither cachePercent or cacheSize are specified (the default), bdb
  682. uses its own default of 60% -->
  683. <!-- <property name="cachePercent" value="0" /> -->
  684. <!-- <property name="cacheSize" value="0" /> -->
  685. <!-- <property name="useSharedCache" value="true" /> -->
  686. <!-- <property name="expectedConcurrency" value="25" /> -->
  687. </bean>
  688.  
  689. <!-- BDBCOOKIESTORAGE: disk-based cookie storage for FetchHTTP -->
  690. <bean id="cookieStorage"
  691. class="org.archive.modules.fetcher.BdbCookieStorage">
  692. <!-- <property name="cookiesLoadFile"><null/></property> -->
  693. <!-- <property name="cookiesSaveFile"><null/></property> -->
  694. <!-- <property name="bdb">
  695. <ref bean="bdb"/>
  696. </property> -->
  697. </bean>
  698.  
  699. <!-- SERVERCACHE: shared cache of server/host info -->
  700. <bean id="serverCache"
  701. class="org.archive.modules.net.BdbServerCache">
  702. <!-- <property name="bdb">
  703. <ref bean="bdb"/>
  704. </property> -->
  705. </bean>
  706.  
  707. <!-- CONFIG PATH CONFIGURER: required helper making crawl paths relative
  708. to crawler-beans.cxml file, and tracking crawl files for web UI -->
  709. <bean id="configPathConfigurer"
  710. class="org.archive.spring.ConfigPathConfigurer">
  711. </bean>
  712.  
  713. </beans>
Advertisement
Add Comment
Please, Sign In to add comment