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

Method run

src/java/org/apache/nutch/host/HostInjectorJob.java:158–176  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

156 }
157
158 @Override
159 public int run(String[] args) throws Exception {
160 if (args.length < 1) {
161 System.err.println("Usage: HostInjectorJob <host_dir>");
162 return -1;
163 }
164 try {
165 boolean success = inject(new Path(args[0]));
166 if (!success) {
167 LOG.error("HostInjectorJob: failed ");
168 return -1;
169 }
170 LOG.info("HostInjectorJob: finished");
171 return -0;
172 } catch (Exception e) {
173 LOG.error("HostInjectorJob: " + StringUtils.stringifyException(e));
174 return -1;
175 }
176 }
177
178 public static void main(String[] args) throws Exception {
179 int res = ToolRunner.run(NutchConfiguration.create(),

Callers 1

mainMethod · 0.45

Calls 2

injectMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected