Revision 6666
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java | ||
---|---|---|
467 | 467 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
468 | 468 |
// need the guid-to-docid mapping |
469 | 469 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), accNumber); |
470 |
// save the system metadata |
|
471 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
470 | 472 |
} |
471 | 473 |
|
472 | 474 |
logReplication.info("ReplicationHandler.handleSingleXMLDocument - Successfully replicated doc " + accNumber); |
... | ... | |
619 | 621 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
620 | 622 |
// need the guid-to-docid mapping |
621 | 623 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), accNumber); |
624 |
// save the system metadata |
|
625 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
626 |
|
|
622 | 627 |
} |
623 | 628 |
|
624 | 629 |
logReplication.info("ReplicationHandler.handleSingleDataFile - Successfully to write datafile " + accNumber); |
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
603 | 603 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
604 | 604 |
// need the guid-to-docid mapping |
605 | 605 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), docid); |
606 |
// save the system metadata |
|
607 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
606 | 608 |
} |
607 | 609 |
|
608 | 610 |
// dates |
... | ... | |
879 | 881 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
880 | 882 |
// need the guid-to-docid mapping |
881 | 883 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), docid); |
884 |
// save the system metadata |
|
885 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
882 | 886 |
} |
883 | 887 |
|
884 | 888 |
if (writeException != null) { |
Also available in: Unified diff
save SystemMetadata when replicating data and metadata -- this way if/when the node decides to be a DataONE MN it already has the information needed for each object