Project

General

Profile

# Date Author Comment
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().

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:...

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().

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

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

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

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

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.

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

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

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

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.

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)

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.

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

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.

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

Minor indentation cleanup.

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.

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

add User-Agent logging to support D1 requirements

6495 09/22/2011 10:12 AM ben leinfelder

log errors on create() and registerSM

6484 09/21/2011 04:58 PM Chris Jones

Don't use the hzNodes map yet (as a hazelcast client). Use D1Client instead to get the node list in isNodeAuthorized().

6471 09/20/2011 02:08 PM Matt Jones

Reverting previous @Overrides chanrge from r6470, as that is the desired
behavior under Java 1.6 -- previous versions of Java (e.g., 1.5) will not
comile with this usage of the @Overrides annotation, but the currently
supported version will. So reverting to the 1.6 convention.

6470 09/20/2011 01:36 PM Matt Jones

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.

6468 09/20/2011 10:48 AM ben leinfelder

catch runtime exceptions that arise from hazelcast storage errors in the system metadata map

6467 09/20/2011 09:12 AM Chris Jones

Lock the system metadata entry in hzSystemMetadata when calling setReplicationPolicy().

6466 09/20/2011 09:10 AM Chris Jones

Lock the system metadata entry in hzSystemMetadata when calling registerSystemMetadata().

6465 09/20/2011 07:18 AM Chris Jones

Remove references to CNReplicationTask.

6463 09/20/2011 07:12 AM Chris Jones

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.

6455 09/19/2011 10:18 AM ben leinfelder

move CNReplicationTask to the hazelcast package

6449 09/16/2011 03:23 PM ben leinfelder

only "save" to the shared system metadata map - not directly to the table store.

6447 09/16/2011 03:07 PM ben leinfelder

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

6446 09/16/2011 02:24 PM ben leinfelder

move bulk of the Hazelcast code into HazelcastService from CNodeService so that it is centrall located - easier to manage and configure

6437 09/15/2011 12:57 PM ben leinfelder

initialize Hazelcast from the custom configuration when initializing the Metacat service.

6435 09/15/2011 10:40 AM ben leinfelder

handle entryAdded and entryUpdated the same - update the entry if it exists, otherwise create it

6434 09/15/2011 10:38 AM ben leinfelder

handle entryAdded (to hzSystemMetadata) to store sysmeta to local store when it is not already present

6430 09/14/2011 05:30 PM ben leinfelder

add code to handle new entry when it is not on the local member of the sysmeta cluster

6427 09/14/2011 03:17 PM ben leinfelder

comment out processCluster connections that use hzClient until that is finalized

6419 09/13/2011 04:13 PM ben leinfelder

use pending replication task queue to check if node is authorized for replication. moved from old ReplicationService code

6411 09/11/2011 06:41 PM Chris Jones

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.

6410 09/11/2011 06:27 PM Chris Jones

Minor cleanup - tabs to spaces.

6409 09/11/2011 06:26 PM Chris Jones

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.

6397 09/07/2011 05:16 PM ben leinfelder

changes for schema update (d1_common)

6384 08/31/2011 02:36 PM Chris Jones

Update classes to use the DataONE 0.6.4 schema and types. Major changes involve using BigInteger vs long in SystemMetadata.size, and using ObjectFormatIdentifier rather than Object format.

6378 08/03/2011 10:46 AM ben leinfelder

latest D1 jars - changes include:
updateSystemMetadata() impl for CN
new identifier methods (generate is its own method)
removal of the resourceMap pointer from system metadata

6366 07/27/2011 04:25 PM ben leinfelder

use new "v1" types from DataONE

6339 07/13/2011 03:09 PM ben leinfelder

add hasReservation() method (NotImplemented, however)

6337 07/12/2011 03:02 PM ben leinfelder

use objectFormatIdentifier for listObjects()
remove provisional system metadata indicator - Metacat will not implement reserveIdentifier()

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

allow very minimal system metadata for provisional entries (CN.reserveIdentifier)

6303 07/06/2011 01:35 PM ben leinfelder

remove resolve() test -- not implemented in Metacat

6300 07/06/2011 11:52 AM ben leinfelder

catch exceptions from system meta data query and throw service failure rather than swallowing them with an error msg

6294 07/05/2011 04:19 PM ben leinfelder

use super class' create() method
use string comparison for assertRelation method

6286 07/05/2011 10:49 AM ben leinfelder

return all public objects for the search() method [for now]

6281 07/01/2011 05:01 PM ben leinfelder

add the old ecogrid query code (still commented out) from the old Rest handler

6278 07/01/2011 12:37 PM ben leinfelder

implement reserveIdentifier() and check whether the id is reserved when creating records (only allow the create when the Subject creating matches the Subject who reserved it -- currently stored in rightsHolder)

6276 07/01/2011 11:10 AM ben leinfelder

remove extraneous update() call when create() does the call for us

6254 06/29/2011 05:50 PM Chris Jones

At Ben's suggestion, add metacatUrl to D1NodeService and make it available to subclasses. Set the metacatUrl in the constructor using SystemUtil rather than all roll your own PropertyService calls. More concise. Also, log the delete event in MNodeService.delete().

6241 06/29/2011 08:44 AM Chris Jones

Implement [MN|CN]Storage.create() in D1NodeService. Since MetacatHandler requires an IP for event logging, we pass in the metacat URL (hold over from CrudService). To do this in the abstract D1NodeService, change the constructors to take metacatUrl as a parameter and get the URL from the metacat properties file in getInstance() of the subclasses. Needs testing.

6239 06/28/2011 04:48 PM ben leinfelder

include URL in resolve() method as well as placeholder for preference

6235 06/28/2011 01:46 PM ben leinfelder

Metacat does not implement CNRegister

6225 06/27/2011 02:39 PM ben leinfelder

-use every Subject in the session (alt Ids and Group membership)
-consolidate to single isAuthorized method

6223 06/27/2011 01:19 PM ben leinfelder

throw exception for unimplemented methods

6222 06/27/2011 12:22 PM ben leinfelder

implement resolve() method

6221 06/27/2011 11:56 AM ben leinfelder

implement assertRelation

6220 06/27/2011 11:41 AM ben leinfelder

implement CNReplication.setReplicationStatus() but with a note about selecting which replica's status should be set (right now it is all)

6219 06/27/2011 11:29 AM ben leinfelder

implement CNReplication.setReplicationPolicy

6218 06/27/2011 11:13 AM ben leinfelder

correction: implementation is CN-specific

6217 06/27/2011 11:12 AM ben leinfelder

implement getChecksum() in the superclass

6216 06/27/2011 11:07 AM ben leinfelder

implement getChecksum (retrieves from system metadata)

6215 06/27/2011 10:59 AM ben leinfelder

use shared get() method from superclass

6214 06/27/2011 10:55 AM ben leinfelder

use shared getLogRecords method

6194 06/23/2011 03:58 PM ben leinfelder

implement CNAuthorization

6189 06/23/2011 02:26 PM ben leinfelder

Metacat does not implement CNIdentity - it is a stand-alone service

6188 06/23/2011 02:20 PM ben leinfelder

implement registerSystemMetadata

6187 06/23/2011 02:19 PM ben leinfelder

implement object format methods - using a separate class to do the actual metacat lookup/caching so that teh CN implementation looks cleaner

6179 06/22/2011 11:03 AM Chris Jones

Initial check in of the MNodeService stub methods that implement the D1 MN* interfaces. CrudService methods will be transitioned into this class. The methods follow the D1 0.6.2 API thus far.

Also changed CNodeService to reflect minor changes to the D1NodeService class.

6178 06/22/2011 08:13 AM Chris Jones

Add a static getInstance() method to CNodeService and make CNodeService a singleton.

6177 06/22/2011 08:06 AM Chris Jones

Initial check in of the CNodeService stub methods that implement the D1 CN* interfaces. CNCoreImpl methods will be transitioned into this class. The methods follow the D1 0.6.2 API thus far.