(Map<String, Object> args)
| 134 | } |
| 135 | |
| 136 | @Override |
| 137 | public Map<String, Object> run(Map<String, Object> args) throws Exception { |
| 138 | getConf().setBoolean(ARG_COMMIT, (Boolean) args.get(ARG_COMMIT)); |
| 139 | currentJob = NutchJob.getInstance(getConf(), "CleaningJob"); |
| 140 | currentJob.getConfiguration().setClass( |
| 141 | "mapreduce.job.output.key.comparator.class", StringComparator.class, |
| 142 | RawComparator.class); |
| 143 | |
| 144 | Collection<WebPage.Field> fields = getFields(currentJob); |
| 145 | StorageUtils.initMapperJob(currentJob, fields, String.class, WebPage.class, |
| 146 | CleanMapper.class); |
| 147 | currentJob.setReducerClass(CleanReducer.class); |
| 148 | currentJob.setOutputFormatClass(NullOutputFormat.class); |
| 149 | currentJob.waitForCompletion(true); |
| 150 | ToolUtil.recordJobStatus(null, currentJob, results); |
| 151 | return results; |
| 152 | } |
| 153 | |
| 154 | public int delete(boolean commit) throws Exception { |
| 155 | LOG.info("CleaningJob: starting"); |
no test coverage detected