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

Method setup

src/java/org/apache/nutch/crawl/GeneratorReducer.java:90–109  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

88 }
89
90 @Override
91 protected void setup(Context context) throws IOException,
92 InterruptedException {
93 Configuration conf = context.getConfiguration();
94 long totalLimit = conf
95 .getLong(GeneratorJob.GENERATOR_TOP_N, Long.MAX_VALUE);
96 if (totalLimit == Long.MAX_VALUE) {
97 limit = Long.MAX_VALUE;
98 } else {
99 limit = totalLimit / context.getNumReduceTasks();
100 }
101 maxCount = conf.getLong(GeneratorJob.GENERATOR_MAX_COUNT, -2);
102 batchId = new Utf8(conf.get(GeneratorJob.BATCH_ID));
103 String countMode = conf.get(GeneratorJob.GENERATOR_COUNT_MODE,
104 GeneratorJob.GENERATOR_COUNT_VALUE_HOST);
105 if (countMode.equals(GeneratorJob.GENERATOR_COUNT_VALUE_DOMAIN)) {
106 byDomain = true;
107 }
108
109 }
110
111}

Callers

nothing calls this directly

Calls 4

getLongMethod · 0.80
getMethod · 0.65
getConfigurationMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected