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

@ -148,19 +148,13 @@ public class RdeContactImportAction implements Runnable {
logger.infofmt("Contact %s was imported successfully", xjcContact.getId());
} catch (ResourceExistsException e) {
// Record the number of contacts already in the registry
getContext().incrementCounter("contacts skipped");
getContext().incrementCounter("existing contacts skipped");
logger.infofmt("Contact %s already exists", xjcContact.getId());
} catch (Exception e) {
// Record the number of contacts with unexpected errors
getContext().incrementCounter("contact import errors");
throw new ContactImportException(xjcContact.getId(), xjcContact.toString(), e);
logger.severefmt(e, "Error importing contact %s; xml=%s", xjcContact.getId(), xjcContact);
}
}
}
private static class ContactImportException extends RuntimeException {
ContactImportException(String contactId, String xml, Throwable cause) {
super(String.format("Error importing contact %s; xml=%s", contactId, xml), cause);
}
}
}