Project

General

Profile

« Previous | Next » 

Revision 6666

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

View differences:

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);

Also available in: Unified diff