| 279 | } |
| 280 | |
| 281 | public void inject(Path urlDir) throws Exception { |
| 282 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT); |
| 283 | long start = System.currentTimeMillis(); |
| 284 | LOG.info("InjectorJob: starting at " + sdf.format(start)); |
| 285 | LOG.info("InjectorJob: Injecting urlDir: " + urlDir); |
| 286 | run(ToolUtil.toArgMap(Nutch.ARG_SEEDDIR, urlDir)); |
| 287 | long end = System.currentTimeMillis(); |
| 288 | LOG.info("Injector: finished at " + sdf.format(end) + ", elapsed: " |
| 289 | + TimingUtil.elapsedTime(start, end)); |
| 290 | } |
| 291 | |
| 292 | @Override |
| 293 | public int run(String[] args) throws Exception { |