Use multicast in the hazelcast config for local deployments.
comment out the external hazelcast config location for default building
include default hazelcast.xml in the war build
Add in the hzObjectPath map to the hazelcast config file for a local deployment. Enable the MapStore impl for both maps.
Don't use the hzNodes map yet (as a hazelcast client). Use D1Client instead to get the node list in isNodeAuthorized().
For now, remove the hzClient code connecting to the DataONE process cluster to get the hzNodes map. This will be moved into the storage cluster, but use D1Client to get the node list for now.
A default hazelcast config file for metacat.
going back to using IDentifier as the key for the ObjectPAthMap.
Removed extraneous comments.
Add boolean field for synchronization status.
New default properties for dataone MN properties.
A configuration section for DataONE Member Node properties.
Fix getCapabilities to properly throw ServiceFailure when properties can not be read, rather than failing with a log message. Fix properties in the Node object to reflect their correct values. Set the sync schedule properly to default to 5 minute intervals. Improve documentation.
Reformatted to correct indentation to make class readable.
newer d1 jars -- contains CN.isNodeAuthorized() method
explicitly require java 1.6
collect "message" param from multipart request for MN.synchronizationFailed method
Reverting previous @Overrides chanrge from r6470, as that is the desiredbehavior under Java 1.6 -- previous versions of Java (e.g., 1.5) will notcomile with this usage of the @Overrides annotation, but the currentlysupported version will. So reverting to the 1.6 convention.
Removing incorrect @Override annotations that were preventing compilation. The methods marked did not actually override a method in the superclass, so they were not compiling. I think @Overrides was being mistaken for methods that implement an interface but aren't actually in the superclass.
use d1_common_java's date serialization utility for parsing parameters
catch runtime exceptions that arise from hazelcast storage errors in the system metadata map
Lock the system metadata entry in hzSystemMetadata when calling setReplicationPolicy().
Lock the system metadata entry in hzSystemMetadata when calling registerSystemMetadata().
Remove references to CNReplicationTask.
Remove the CNReplicationTask (for now). We will be using Metacat's ForceReplicationHandler to replicate science metadata across CNs, and may explore the use of a 100% evicted hzScienceMetadata map. Either way, the distributed task design won't be needed. When a dropped CN comes back online, we'll catch it up based on last modified dates for PIDs in the hzSystemMetadata map.
Change isNodeAuthorized() to query the hzSystemMetadata map rather than the hzPendingreplicationTasks map. The latter isn't needed for authorization since the ReplicationStatus for each Replica in SystemMetadata lists the status of the replica and can be queried.
Add getNodesMap() to return the hzNodes map from the process cluster. Remove getPendingReplicationTasks since that structure is being removed. Add minor documentation.
Set the correct cluster name and password for the D1 Hazelcast process cluster. This will likely change for production deployments.
only include 0.6.4 schemas for D1. Will also need to update this when we release whatever v1 ends up being.
lookup latest system metadata update date for use in synchronizing CN-CN when an offline nodes comes back online
changed the key type from Identifier to String for ObjectPathMap. (need a Comparable key).
rework this to be MN->MN replication. Should be fleshed out more.
throw RuntimeExceptions when store() methods throw declared exceptions -- we want callers to put() to be alerted if there are errors.
move CNReplicationTask to the hazelcast package
do not throw exception when checking for system metadata - boolean return is good.use ReplicationStatus.valueOf() instead of convert()
implicit success for setting accessPolicy - trust that the MapStore persists the updated system metadata
test relationship assertion using obsoletes
check if system metadata exists rather than just the id mapping (before creating the entry)
treat access rules atomically - do not group them together otherwise the intent is subverted
only "save" to the shared system metadata map - not directly to the table store.
do not send <systemMetadata> with the <docInfo> replication information - this is handled by the Hazelcast shared map
rely on Hazelcast to store the SystemMetadata locally for the node. Entry event listeners store the shared system metadata on their local node when alerted. TODO: remove old replication code that included system metadata xml when replicating scimeta and data
move bulk of the Hazelcast code into HazelcastService from CNodeService so that it is centrall located - easier to manage and configure
verify that the sysmeta checksum value matches the computed checksum value when calling create()https://redmine.dataone.org/issues/1795
include sysmeta for uploaded BIN data that comes through the legacy Metacat servlet API
check for null pointers when adding system metadata/creating records during cn.create()
removing unneeded class (never used)
allow urls with "v1" in them
cleaned up mock tests on hzObjectPathMap. split out code for mocking a datastore into MockObjectPathMap.
remove unused/old D1 SCHEMA downloads and build tasks
initialize Hazelcast from the custom configuration when initializing the Metacat service.
use shared hazelcast properties location on the CN
handle entryAdded and entryUpdated the same - update the entry if it exists, otherwise create it
handle entryAdded (to hzSystemMetadata) to store sysmeta to local store when it is not already present
make isScienceMetadata() method public/static to be called throughout Metacat
only create ObjectFormatId when we actually have the parameter (downstream we rely on it being null or not when constructing the query)
exercise the shared hazelecast system metadata map and custom loader/store by inserting normally and also directly into the map. both mechanisms allow up to read the same system metadata (only tested on single local instance)
add code to handle new entry when it is not on the local member of the sysmeta cluster
clean up imports - randome quicktime package had been included
test hzSystemMetadata Map and custom loader
comment out processCluster connections that use hzClient until that is finalized
use HashMap, HashSet instead of the Tree* classes that require Identifier objects implement Comparable
copied default hazelcast configuration from the jar into hazelcast.test.properties.xml, to get instances to talk to each other.
configuring hazelcast tests
do not add obsoletes and obsoletedBy elements if their values are null (jibx chokes on the emptiness)
use both guid and docid when creating access row - then either mechanism can be used when retrieving the access rules
check for null session before looking at subject
further refactoring and start of unit tests for hazelcast elements
use pending replication task queue to check if node is authorized for replication. moved from old ReplicationService code
save system metadata and/or science metadata and/or ORE objects to the local CN if needed.
small code cleanup - removed unused instantiations of DBUtils.
fixed logic wrt localID and docid. Implemented new method in IdentifierManager to getAllGUIDs from identifier table for implementation of loadAllKeys in ObjectPathMapLoader.
further development of ObjectPathMapLoader.
new class for refreshing the hazelcast map with metacat. Initial commit.
return the test Identifier so other tests can piggyback
check session != null before checking authorization
Add stub methods in CNodeService that implement the Hazelcast EntryListener interface: entryAdded(), entryRemoved(), entryUpdated(), and entryEvicted(). Add a listener to the hzSystemMetadata map so the CNodeService can respond to those events and create appropriate CNReplicationTask objects for distributed execution across the CN cluster. Again, stubs only so far.
Minor cleanup - tabs to spaces.
Enable CNodeService to access 1) the hzNodes map defined in the DataONE process cluster by becoming a Hazelcast client (hzClient) to that cluster and 2) the hzSystemMetadata map defined in the DataONE storage cluster by becoming a member to that cluster (using direct Hazelcast calls). Added fields for maintaining the DataONE cluster properties.
Add properties for strings used to connect to the DataONE storage and process Hazelcast clusters. The storage cluster is defined in the hazelcast.xml config file, and we list the names of the systemMetadataMap and the tasksIdNamespace in order to connect to these structures. When creating CNReplicationTask objects, use the task id generator to get a unique task id.
Add in the Hazelcast Id generation namespace and an IdGenerator instance for task ids. Hazelcast will produce cluster-wide unique ids for the "task-ids" namespace, to be used when creating CNreplicationTask objects.
Add the hazelcast client jar so Metacat can connect to the DataONE storage cluster that initializes the hzNodes shared node map and other structures as needed.
Add a CNReplicationTask class that will be submitted to the CN storage cluster when there are changes to the object store involving system metadata, science metadata, and resource maps. When a new entry is added to the hzSystemMetadata map, a new data, science metadata, or resource map was added to the VO, and all CN cluster members need to be updated with the object and it's system metadata. This task is executed on each CN to replicate the information. If the event is an update to an existing system metadata entry, it may only involve a change to system metadata, or may involve a change to science metadata as well. The task will return with the PID of the object replicated, be it a sysmeta, scimeta, or resource object. Locking of the PID will be handled by the task.
Update test for getReplicationStatus to reflect API change.
Newest version of the D1 0.6.4 common jar.
Catch D1nodeService up to the DataONE 0.6.4 schema where there is no ObjectFormat.isScienceMetadata() method, but rather ObjectFormat.getFormatType() where type is currently one of 'DATA, 'METADATA', or 'RESOURCE'.
Modify HazelcastService to read configuration information from an on-disk file (not from a jar file). Added init() to start up the service (was calling doRefresh() before. We still need to decide if this is a refreshable service.
Add the dataone.hazelcast.configFilePath property to be used when MetacatServlet becomes a Hazelcast cluster member using HazelcastService. TODO: what are the consequences of restarting the service via doRefresh()? It's set to false for now.
move HazelcastService to D1 package
Adding a HazelcastService for Metacat to enable Metacat as a Hazelcast cluster member in DataONE. This will require the hazelcast.xml configuration file used for the DataONE cluster to be on the Metacat classpath.
changes for schema update (d1_common)
do not parse from last slash ("/") to the end when processing the request uri - otherwise things like format ids (text/csv) will be handled incorrectly.https://redmine.dataone.org/issues/1773
added HazelCast MapStore and MapLoader implementation for SystemMetadata
use InvalidRequest when the PID is not found. https://redmine.dataone.org/issues/1768
remove unused dataone properties
use 0.6.4 for node capabilities
use Permission.REPLICATE not EXECUTE
check with the CN if replication is allowed for the object in question for getReplica()
add getReplica() implementation. same as get() but with different logging. seems silly, but maybe I missed something important that distinguishes this method.