MCPcopy Create free account
hub / github.com/apache/nutch / setup

Method setup

src/java/org/apache/nutch/crawl/GeneratorMapper.java:110–129  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

108 }
109
110 @Override
111 public void setup(Context context) {
112 Configuration conf = context.getConfiguration();
113 filter = conf.getBoolean(GeneratorJob.GENERATOR_FILTER, true);
114 normalise = conf.getBoolean(GeneratorJob.GENERATOR_NORMALISE, true);
115 sitemap = conf.getBoolean(GeneratorJob.GENERATOR_SITEMAP, false);
116 if (filter) {
117 filters = new URLFilters(conf);
118 }
119 if (normalise) {
120 normalizers = new URLNormalizers(conf,
121 URLNormalizers.SCOPE_GENERATE_HOST_COUNT);
122 }
123 maxDistance = conf.getInt("generate.max.distance", -1);
124 curTime = conf.getLong(GeneratorJob.GENERATOR_CUR_TIME,
125 System.currentTimeMillis());
126 schedule = FetchScheduleFactory.getFetchSchedule(conf);
127 scoringFilters = new ScoringFilters(conf);
128 scoreThreshold = conf.getFloat(GeneratorJob.GENERATOR_MIN_SCORE, Float.NaN);
129 }
130}

Callers

nothing calls this directly

Calls 4

getFetchScheduleMethod · 0.95
getIntMethod · 0.80
getLongMethod · 0.80
getConfigurationMethod · 0.45

Tested by

no test coverage detected