Add host linker mapreduce for RDE imports

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147025088
This commit is contained in:
Wolfgang Meyers 2017-02-09 05:49:24 -08:00 committed by Ben McIlwain
parent 6cdb3d81d3
commit da1f83a7b4
15 changed files with 353 additions and 29 deletions

View file

@ -163,18 +163,12 @@ public class RdeDomainImportAction implements Runnable {
logger.infofmt("Domain %s was imported successfully", xjcDomain.getName());
} catch (ResourceExistsException e) {
// Record the number of domains already in the registry
getContext().incrementCounter("domains skipped");
getContext().incrementCounter("existing domains skipped");
logger.infofmt("Domain %s already exists", xjcDomain.getName());
} catch (Exception e) {
getContext().incrementCounter("domain import errors");
throw new DomainImportException(xjcDomain.getName(), xjcDomain.toString(), e);
logger.severefmt(e, "Error processing domain %s; xml=%s", xjcDomain.getName(), xjcDomain);
}
}
}
private static class DomainImportException extends RuntimeException {
DomainImportException(String domainName, String xml, Throwable cause) {
super(String.format("Error processing domain %s; xml=%s", domainName, xml), cause);
}
}
}