mirror of
https://github.com/google/nomulus.git
synced 2025-07-11 21:48:18 +02: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:
parent
6cdb3d81d3
commit
da1f83a7b4
15 changed files with 353 additions and 29 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue