mirror of
https://github.com/google/nomulus
synced 2026-09-06 16:17:13 +00:00
Add host linker mapreduce for RDE imports
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147025088
This commit is contained in:
committed by
Ben McIlwain
parent
6cdb3d81d3
commit
da1f83a7b4
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user