Project

General

Profile

Statistics
| Revision:

# Date Author Comment
6869 01/09/2012 05:08 PM Chris Jones

Update the CN methods to throw a VersionMismatch where the API changed (where serialVersion is a required parameter). These were previously throwing an InvalidRequest exception.
Change the exception handling for calls to Hazelcast to catch a RuntimeException (not Exception) so we don't catch exceptions that we purposefully throw....

6868 01/09/2012 04:59 PM Chris Jones

Use a Logger instead of System.out for SystemMetadataMap.

6867 01/07/2012 06:01 PM Chris Jones

Don't lock() on the map.get() in isNodeAuthorized() (this assumes that the CN has queued the task already). Add more lock/unlock debug statements, and fix setReplicationStatus() - I missed a finally statement to unlock the pid.

6866 01/07/2012 12:39 PM Chris Jones

Modify CNReplication methods setReplicationStatus(), updateReplicationMetadata() and setReplicationPolicy() to allow administrative access from a Coordinating Node by calling isAdminAuthorized().

6865 01/07/2012 12:34 PM Chris Jones

Add isAdminAuthorized() to D1NodeService to check if the operation is being requested from a CN. Consult the NodeList from the CN and test the NodeType of the given node and the X509 certificate Subject. Perhaps we should expand this to also check for service-level access in the future.

6863 01/06/2012 12:51 PM Chris Jones

In registerSystemMetadata(), lock the pid prior to calling map.containsKey(pid) since a put to the map could occur between the check and the subsequent put().

6859 01/06/2012 07:23 AM Chris Jones

Use Lock instead of ILock to be consistent across classes.

6858 01/05/2012 06:32 PM Chris Jones

After reviewing CNodeService and D1NodeService prompted by Robert comparing the Hazelcast locking with the d1_synchronization locking, I've made a number of changes that will prevent locking problems:

1) Multiple methods contained try/catch blocks that would:...

6855 01/05/2012 01:37 PM ben leinfelder

use inherited access control from EML for the data file we download from a remote source
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5522

6852 01/05/2012 12:06 PM ben leinfelder

download remote data and save locally when it is referenced by an EML package, then include it in the ORE map.
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5522

6830 01/03/2012 03:56 PM ben leinfelder

exapnd permissions on the exisiting access rule not on the permission being checked. (hierarchical permissions)

6822 12/22/2011 11:51 AM Chris Jones

Make sure the local id isn't null when we try to get the object from the local instance.

6821 12/22/2011 11:16 AM Chris Jones

Simplify the error handling, and throw the exception once the CN is updated with the new status.

6820 12/22/2011 11:13 AM Chris Jones

Set the replica status to failed (not invalidated) when we get exceptions trying to read the object bytes. Not much of a difference, but only the CN, in theory, is supposed to be able to set the invalidated status.

6819 12/22/2011 11:07 AM Chris Jones

Set the replication status to invalidated when we have a localId, but getting the object bytes fails for any reason.

6818 12/22/2011 10:51 AM Chris Jones

Only call super.create() if there's no localId found on the MN (ie a replica is there from an out of band process).

6817 12/22/2011 10:40 AM Chris Jones

Get the object inputstream from the local metacat instance using MetacatHandler.get() rather than MN.getReplica() so we don't throw an InvalidToken exception when passing in a null Session. The D1Client object is never used for this local call.

6816 12/22/2011 09:24 AM ben leinfelder

interpret permissions as hierarchical
https://redmine.dataone.org/issues/2150

6808 12/20/2011 11:25 AM ben leinfelder

process the current revision, not the latest!
use direct object/system metadata insertion for ORE maps.

6807 12/20/2011 11:21 AM ben leinfelder

allow other Metacat process (system metadata and ORE generation) to directly insert objects and system metadata without having to go through the MN/CN methods.

6805 12/19/2011 01:07 PM ben leinfelder

only attempt to unlock a lock if it was created (in the finally block)

6803 12/16/2011 04:24 PM ben leinfelder

new jars with many changes -- including new CN methods: ping, describe, listChecksumAlgorithm. Removed MN.setAccessPolicy. Refactored CN.setOwner() to CN.setRightsHolder().

6800 12/16/2011 11:00 AM ben leinfelder

add revision history to the generated ORE objects -- we use the revision history of the EML package as a basis because the each ORE revision mirrors the revision of the EML package.
Add a placeholder for checking if an equivalent ORE map exists in the DataONE infrastructure - this will be a call to CN.search() that looks at the solr index for OREs based on the EML package ID.

6795 12/16/2011 07:42 AM Chris Jones

In the call to MNReplication.replicate(), call back to CNReplication.setReplicationStatus() and set the status to failed when we get local exceptions, exceptions from the source MN when calling getReplica(). Send back an exception with a description when setting the status. Add a private setReplicationStatus() method to refactor these calls out.

6792 12/16/2011 07:29 AM Chris Jones

Change setReplicationStatus() to drop serialVersion and report the failure exception message in the CN log.

6787 12/15/2011 01:29 PM ben leinfelder

set SystemMetadata.archived=true on MN.delete
There is ongoing discussion on what the exact behavior should be here, but this mimics Metacat's delete-as-archive action.
http://redmine.dataone.org/issues/882

6786 12/14/2011 08:48 AM Chris Jones

In MNodeService.replicate(), check to see if we have a replica (via an out of band channel) before we call sourceMN.getReplica().

6777 12/13/2011 12:22 PM ben leinfelder

updated D1 API -- removed Permission.REPLICATE and associated parameters

6773 12/13/2011 10:58 AM ben leinfelder

include SerialVersion in describe response
https://redmine.dataone.org/issues/2135
NOTE: d1 jars should be replaced once all schema changes are finalized and the generate d1_common code is committed to svn

6757 12/09/2011 09:05 AM Chris Jones

If a member node cannot be found in the node list matching the targetNodeSubject given in isNodeAuthorized(), throw a ServiceFailure exception.

6754 12/08/2011 01:51 PM ben leinfelder

update with latest d1_common/d1_lib (includes latest schema changes)

6747 12/07/2011 05:05 PM ben leinfelder

for now, look up SystemMetadata directly from the table otherwise we won't have the latest access information. Need to refresh the in-memory copy everytime we edit the access policy via Metacat (includes EML parser)

6744 12/07/2011 12:18 PM ben leinfelder

refactor Metacat access handling to be on a per-revision basis so that it more closely aligns with the DataONE approach
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5560

6727 12/01/2011 01:30 PM ben leinfelder

ensure that the revision list is ordered ascending in case someone changes the sql query without realizing that it matters...

6726 12/01/2011 01:21 PM ben leinfelder

set the byte size of the ORE map before adding it

6725 12/01/2011 01:12 PM ben leinfelder

set/update the obsoletes/obsoletedBy fields in system metadata so that we always have a complete revision history for each object.
Note: ORE maps do not have revision history...yet(?)

6721 11/30/2011 05:31 PM ben leinfelder

generating ORE maps and creating/updating system metadata now. There are some Permission conversion issues to be worked out yet

6719 11/30/2011 05:23 PM ben leinfelder

make exception/error reporting clearer -- was getting lock messages when perhaps that was not the correct exception.

6717 11/30/2011 02:22 PM Chris Jones

Add log statements for each call to ILock.unlock() for debugging.

6714 11/29/2011 03:43 PM ben leinfelder

evict the HazelCast SystemMetadata entry if we update the access control rules via Metacat's legacy API, otherwise stale SystemMetadata stays in memory instead of being looked up from the backing table store.

6713 11/29/2011 03:41 PM ben leinfelder

optionally include ORE generation/insertion into Metacat when generating SystemMetadata
https://redmine.dataone.org/issues/2056

6712 11/29/2011 02:15 PM ben leinfelder

optionally include ORE generation/insertion into Metacat when generating SystemMetadata
https://redmine.dataone.org/issues/2056

6711 11/29/2011 01:44 PM Chris Jones

Set a default HazelcastInstance after init() is called, and use this instance in getLock() to acquire a lock in the cluster.

6710 11/29/2011 01:41 PM ben leinfelder

no need to cast docInfo entries to String -- they are all strings

6709 11/29/2011 01:39 PM ben leinfelder

set revision history, the create/update dates and the owner/submitter (correctly)

6708 11/29/2011 01:05 PM ben leinfelder

use shared method for looking up "docInfo" map -- both in Metacat replication and in D1 system metadata generation

6707 11/29/2011 12:38 PM ben leinfelder

make default formatting a little bit easier to read

6706 11/29/2011 12:33 PM ben leinfelder

reformat code -- no changes

6705 11/29/2011 12:31 PM ben leinfelder

refactor SystemMetadata creation into separate class from the MetacatHandler -- this will be shared by upgrade code and normal metacat api.

6703 11/29/2011 10:10 AM Chris Jones

When using ILock.lock(), get a lock on the string value of the Identifier, not the Identifier object itself. Hazelcast locking won't work otherwise.

6702 11/29/2011 08:55 AM Chris Jones

Use the Hazelcast ILock mechanism to lock the system metadata identifier rather than using IMap.lock(pid).

6693 11/23/2011 12:10 PM ben leinfelder

verify checksum when retrieving replica from another member node.
https://redmine.dataone.org/issues/1794

6692 11/23/2011 11:59 AM ben leinfelder

make sure to get/put system metadata to the HZ map instead of using IdentifierManager directly
verified changes for: https://redmine.dataone.org/issues/1999

6689 11/23/2011 11:03 AM ben leinfelder

look-up sych schedule from metacat properties instead of hardcoding them
https://redmine.dataone.org/issues/1933

6688 11/23/2011 10:19 AM ben leinfelder

when comparing D1 Subject objects, use the equals() method not direct string comparison
https://redmine.dataone.org/issues/2050

6687 11/23/2011 10:07 AM ben leinfelder

access nodeList list correctly
https://redmine.dataone.org/issues/2049

6676 11/18/2011 09:10 AM Chris Jones

Use Subject.equals() when comparing DNs rather than CertificateManager.equalsDN(). Don't lock the pid in isNodeAuthorized() to debug for timeout issues. Minor debugging changes.

6665 11/16/2011 06:15 PM Chris Jones

Minor logging for isNodeAuthorized(), and compare subjects properly. Change this to Subject.compareTo() when it is vetted.

6664 11/16/2011 04:09 PM ben leinfelder

check for authenticated and verified user permissions

6663 11/16/2011 03:34 PM ben leinfelder

throw NotAuthorized when there is no session

6662 11/16/2011 02:27 PM Chris Jones

Catch RuntimeExceptions thrown by Hazelcast as opposed to general Exceptions to we don't catch exceptions we're trying to throw.

6659 11/16/2011 10:45 AM ben leinfelder

generalize exception handling -- add cause detail

6657 11/16/2011 10:34 AM Chris Jones

Changes to setReplicationStatus and isNodeAuthorized(), working out minor bugs in replication.

6656 11/16/2011 09:50 AM ben leinfelder

include exception cause when throwing new exception (combine RuntimeException in Exception handling -- they are almst identical)

6653 11/15/2011 10:48 AM ben leinfelder

throw InvalidToken when session is null

6652 11/15/2011 10:47 AM ben leinfelder

correct typo

6651 11/15/2011 09:37 AM Chris Jones

Send the correct node id (the target node) when calling setReplicationStatus()

6649 11/14/2011 03:49 PM ben leinfelder

check obsoletes and obsoletedBy PIDs when updating objects

6648 11/14/2011 03:34 PM ben leinfelder

delete system metadata when MN.delete() is called.

6645 11/14/2011 02:59 PM ben leinfelder

throw InvalidToken when there is no session (certificate) provided in update() and delete() methods.

6644 11/13/2011 05:47 PM Chris Jones

Calls to setReplicationStatus() can only be made by a CN or the MN that is the target replica node. Implement this service restriction in CNodeService using CertificateManager's equalsDN() method.

6636 11/11/2011 08:58 AM Chris Jones

Added stack trace debugging for CNodeService.isNodeAuthorized() for tracking down replication issues.

6632 11/10/2011 08:30 AM Chris Jones

Use a session object that is set to null when calling CNode.setReplicationStatus()

6631 11/10/2011 08:05 AM Chris Jones

Add debugging code to MNodeService.getReplica().

6630 11/09/2011 06:55 PM Chris Jones

Set a new Session object to null, to be overwritten by the CertificateManager session information from the X.509 certificate.

6624 11/09/2011 07:14 AM Chris Jones

Fix cast to List<Node> in isNodeAuthorized().

6622 11/08/2011 03:49 PM ben leinfelder

upgrade to 1.0.1-SNAPSHOT DataONE jars

6610 11/07/2011 10:52 AM Chris Jones

Update methods in MNodeService to reflect they modifications of the MN API with regard to exceptions being raised. Largely removed InvalidRequest from a number of methods, and instead threw an appropriate NotFound or ServiceFailure instead.

6609 11/07/2011 10:01 AM Chris Jones

D1NodeService get(), getSystemMetadata(), and isAuthorized() no longer throw InvalidRequest.

6600 11/03/2011 12:55 PM Chris Jones

Add in the systemMetadataChanged() method in MNodeService to respond to notifications. Only allow subjects from CNs listed in the node list to make the call. Update the local copy of the system metadata document for the given pid.

6599 11/03/2011 10:36 AM Chris Jones

Include the serialVersion in the call to CN.setReplicationStatus() after replicating data.

6596 11/02/2011 09:58 PM ben leinfelder

make MNodeServiceTest pass JUnit testing

6593 11/02/2011 08:04 PM Chris Jones

Update CNodeService to use the serialVersion parameter and compare it to the current serialVersion of the system metadata found in the hzSystemMetadata map. Throw an InvalidRequest exception if they are not equal. This affects updateReplicationMetadata(), setReplicationStatus(), setReplicationPolicy(), setAccessPolicy(), and setOwner().

6578 11/01/2011 11:54 AM Chris Jones

Add updateReplicationMetadata() to the CN service implementation. This was missing from the API, and likely never called. It fully replaces the given replica item in the list of replicas in system metadata.

6576 11/01/2011 08:59 AM Chris Jones

getReplica() should log replication events as DataONE Types.Event.replicate (vs 'getreplica')

6575 11/01/2011 08:54 AM Chris Jones

Minor indentation cleanup.

6574 11/01/2011 06:48 AM Chris Jones

Modify isAuthorized() to get the most up to date system metadata from the hzSystemMetadata map.

6573 11/01/2011 06:40 AM Chris Jones

Add a placeholder setAccessPolicy() method in MNodeService that throws NotImplemented since this method is being deprecated. Note: need to confirm that this shouldn't be calling D1Client.getCN().setAccessPolicy().

6572 11/01/2011 06:37 AM Chris Jones

Update getSystemMetadata() to lock(); get(); unlock() to ensure we have the latest version of system metadata from the hzSystemMetadata map. Remove the setAccessPolicy() method since it is being deprecated in the MNAuthorization API.
change insertSystemMetadata() to use a finer grained Date object on insertion. Locking of the pid happens in the subclass prior to the insert.

6571 11/01/2011 06:33 AM Chris Jones

Add setAccessPolicy() to CNodeService since the CN should only make changes to access policies for objects registered with the D1 system. Increment the serial version after locling and getting the most up to fdate system metadata.
Note: CCIT meeting decision says the serial version of the system metadata (during the change) should equal the current serial version, but setAccessPolicy() does not pass in the entire system metadata object, so there's no way to check. For now, increment the latest system metadata from the hzSystemMetadata map.

6570 10/31/2011 04:37 PM Chris Jones

In CNodeService, separate the CN.create() functionality from the MN.create() functionality while still using the superclass to call create(). Deal with Hazelcast locks and setting serial versions only in the CN implementation.

6569 10/31/2011 01:13 PM Chris Jones

Change updateSystemMetadata() to evaluate the incoming system metadata serial version against that found in the hzSystemMetadata map. If they are the same, do the update. If not, throw an InvalidRequest explaining that they need the most current version.

6568 10/29/2011 07:21 PM Chris Jones

Modify CNodeService's registerSystemMetadata() with support for SystemMetadata's serialVersion field. Also, use the hzSystemMetadata map for all system metadata reads using a lock on the pid in order to get the very latest version. This affected isNodeAuthorized(), getChecksum(), and assertRelation(). Since we're using Hazelcast, exceptions are masked as RuntimeException, so throw a ServiceFailure with the underlying message.

6567 10/28/2011 09:46 PM Chris Jones

Modify CNodeService's updateSystemMetadata(), setReplicationStatus(), setReplicationPolicy(), and setOwner() with support for SystemMetadata's serialVersion field. Other methods still pending an update. Use the hzSystemMetadata map for all system metadata reads using a lock on the pid in order to get the very latest version.

6564 10/28/2011 04:05 PM Chris Jones

SystemMetadataManager's functionality is handled by IdentifierManager. Removing it and it's test.

6563 10/28/2011 04:01 PM Chris Jones

MetadataTypeRegister is now replaced by ObjectFormatService. Removing it and it's test.

6561 10/27/2011 05:51 PM ben leinfelder

move the DataONE 1.0.0-SNAPSHOT

6552 10/27/2011 02:13 PM ben leinfelder

Configure and use CertificateManager in order to act as the MN when performing replicate() and getReplica() mthods.

6542 10/20/2011 02:03 PM ben leinfelder

add User-Agent logging to support D1 requirements

6540 10/16/2011 10:47 AM Chris Jones

Add debugging output to MNodeService.