if (newUrl == null || newUrl.equals(url)) {
return;
}
reprUrl = URLUtil.chooseRepr(reprUrl, newUrl, temp);
final String reversedNewUrl = TableUtil.reverseUrl(newUrl);
WebPage newWebPage = new WebPage();
if (!reprUrl.equals(url)) {
newWebPage.setReprUrl(new Utf8(reprUrl));
}
newWebPage.putToMetadata(FetcherJob.REDIRECT_DISCOVERED, TableUtil.YES_VAL);
context.write(reversedNewUrl, newWebPage);
if (LOG.isDebugEnabled()) {
LOG.debug(" - " + redirType + " redirect to " +
reprUrl + " (fetching later)");
}