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

Method runParser

src/java/org/apache/nutch/parse/ParseUtil.java:169–182  ·  view source on GitHub ↗
(Parser p, String url, WebPage page)

Source from the content-addressed store, hash-verified

167 }
168
169 private Parse runParser(Parser p, String url, WebPage page) {
170 ParseCallable pc = new ParseCallable(p, page, url);
171 Future<Parse> task = executorService.submit(pc);
172 Parse res = null;
173 try {
174 res = task.get(maxParseTime, TimeUnit.SECONDS);
175 } catch (Exception e) {
176 LOG.warn("Error parsing " + url, e);
177 task.cancel(true);
178 } finally {
179 pc = null;
180 }
181 return res;
182 }
183
184 public boolean status(String url, WebPage page) {
185 byte status = page.getStatus().byteValue();

Callers 1

parseMethod · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected