mdsal.git
9 years agoBug 1446: Add JMX stats for in-memory data store
tpantelis [Sat, 23 Aug 2014 21:42:55 +0000 (17:42 -0400)]
Bug 1446: Add JMX stats for in-memory data store

    Added stats, available via JMX,  to track data for the various thread
    pool executors used by the in-memory data store. Also added commit stats.

Change-Id: Ica8dff7aef8989f2b23b1fc8c100a535998273b1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoMerge "Datastore: Reuse successful future"
Tony Tkacik [Wed, 3 Sep 2014 16:10:37 +0000 (16:10 +0000)]
Merge "Datastore: Reuse successful future"

9 years agoMerge "Datastore: lower in-memory change tracking overhead"
Tony Tkacik [Wed, 3 Sep 2014 16:10:11 +0000 (16:10 +0000)]
Merge "Datastore: lower in-memory change tracking overhead"

9 years agoDatastore: Reuse successful future
Robert Varga [Tue, 2 Sep 2014 09:25:51 +0000 (11:25 +0200)]
Datastore: Reuse successful future

ImmediateFuture does not keep any state, so we can reuse a single
instance, preventing garbage buildup just a tiny bit.

Change-Id: I200662a666f4529ea82a2ac3948be9536ca32281
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDatastore: lower in-memory change tracking overhead
Robert Varga [Mon, 1 Sep 2014 22:09:09 +0000 (00:09 +0200)]
Datastore: lower in-memory change tracking overhead

We needlessly track the reference to notification manager inside the
even tasks. Instead simplify the return to a Map.Entry and pipe the
resulted data into the manager. This reduces the temporary size of a
tracker, lowering the rate at which we produce garbage.

Change-Id: Ib390d0e65ce1583371a2e887525d9b7ee0392396
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-868: migrate ClassLoaderUtils user"
Tony Tkacik [Tue, 2 Sep 2014 05:42:15 +0000 (05:42 +0000)]
Merge "BUG-868: migrate ClassLoaderUtils user"

9 years agoBUG-868: migrate ClassLoaderUtils user
Robert Varga [Wed, 6 Aug 2014 21:30:34 +0000 (23:30 +0200)]
BUG-868: migrate ClassLoaderUtils user

Moves to yangtools.util, which is not deprecated.

Change-Id: Ibb69c68e027c4732d8967f44c869bf00797a1785
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1636: Fixed invalid model of inmemory-datastore configuration."
Ed Warnicke [Fri, 29 Aug 2014 01:30:48 +0000 (01:30 +0000)]
Merge "Bug 1636: Fixed invalid model of inmemory-datastore configuration."

9 years agoBug 1636: Fixed invalid model of inmemory-datastore configuration.
Tony Tkacik [Thu, 28 Aug 2014 13:12:54 +0000 (15:12 +0200)]
Bug 1636: Fixed invalid model of inmemory-datastore configuration.

Change-Id: I280cd4478d1dd5ab65e333658e802394693272bb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation"
Tom Pantelis [Wed, 27 Aug 2014 15:07:32 +0000 (15:07 +0000)]
Merge "Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation"

9 years agoMerge "BUG-1493: activate recursion elision"
Tony Tkacik [Wed, 27 Aug 2014 14:16:09 +0000 (14:16 +0000)]
Merge "BUG-1493: activate recursion elision"

9 years agoCleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation
Moiz Raja [Wed, 13 Aug 2014 23:24:36 +0000 (16:24 -0700)]
Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation

This commit also cleans up the usage of ForwardedBackwardsCompatibleDataBroker from DataBrokerTestCustomizer

Change-Id: Icfb078eb54f7dae6c436ff41e7c1657b0cf4175f
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "BUG-650: fromYangInstanceIdentifier() can return null"
Tony Tkacik [Wed, 27 Aug 2014 09:47:11 +0000 (09:47 +0000)]
Merge "BUG-650: fromYangInstanceIdentifier() can return null"

9 years agoBUG-650: fromYangInstanceIdentifier() can return null
Robert Varga [Tue, 26 Aug 2014 19:49:33 +0000 (21:49 +0200)]
BUG-650: fromYangInstanceIdentifier() can return null

Properly interpret a null return as an absent identifier.

Clarified cast in #toBinding(Entry) and explained
why it is necessary, even if Eclipse reports
it as unnecessary (difference in various java compilers).

Change-Id: I2dd7cd631cb958a28ddce8db62d20e0292ae8a39
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Simplify YangInstanceIdentifier references"
Tony Tkacik [Wed, 27 Aug 2014 08:05:27 +0000 (08:05 +0000)]
Merge "Simplify YangInstanceIdentifier references"

9 years agoSimplify YangInstanceIdentifier references
Robert Varga [Tue, 26 Aug 2014 18:44:48 +0000 (20:44 +0200)]
Simplify YangInstanceIdentifier references

Now that the (binding) InstanceIdentifier and YangInstanceIdentifier
have different names, we can import both at the same time, clarifying a
bit the code.

Change-Id: I270f2eac40c4e94eb2a61b604657bcfa28a9b3cd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: remove unneeded sort()"
Tony Tkacik [Tue, 26 Aug 2014 07:24:43 +0000 (07:24 +0000)]
Merge "BUG-650: remove unneeded sort()"

9 years agoMerge "Improve SnapshotBackedReadTransaction.close()"
Tom Pantelis [Mon, 25 Aug 2014 15:44:32 +0000 (15:44 +0000)]
Merge "Improve SnapshotBackedReadTransaction.close()"

9 years agoBUG-650: remove unneeded sort()
Robert Varga [Mon, 25 Aug 2014 12:41:20 +0000 (14:41 +0200)]
BUG-650: remove unneeded sort()

The need for sorting entries by depth disappeared with the migration to
new codec infrastructure. Tracing shows some 44% CPU being spent here,
so this should provide a marked improvement with large data changes.

Change-Id: I7c437da5656cc5946ff9413307a563d4ff9b15de
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove SnapshotBackedReadTransaction.close()
Robert Varga [Fri, 22 Aug 2014 22:18:26 +0000 (00:18 +0200)]
Improve SnapshotBackedReadTransaction.close()

This improves visibility of close() operation, resulting in improved
close/read collision detection.

Change-Id: I7d3367c4d669a5c3dcd3f5c6583ce64b7690f1d9
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Make InMemoryDOMDataStore.ready() unsynchronized"
Tony Tkacik [Mon, 25 Aug 2014 10:25:52 +0000 (10:25 +0000)]
Merge "Make InMemoryDOMDataStore.ready() unsynchronized"

9 years agoBUG-1493: activate recursion elision
Robert Varga [Wed, 20 Aug 2014 11:05:51 +0000 (13:05 +0200)]
BUG-1493: activate recursion elision

Previous patch prepared the infrastructure for elision, but it did not
actually activate it. This patch flips the switch on.

Change-Id: Ic02af3ccc7f5ee5f8ae4d0617562b8fdffc771c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake InMemoryDOMDataStore.ready() unsynchronized
Robert Varga [Sat, 23 Aug 2014 21:01:47 +0000 (23:01 +0200)]
Make InMemoryDOMDataStore.ready() unsynchronized

Tracing datastore operations has revealed some contention on the
datastore, specifically when users call WriteTransaction.ready(). It
seems this method does not need synchronization at all, as it is not
directly changing any state.

Change-Id: I635f6a925694e4b68e629978fbd535fedb3a6cd6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1262 - Document Transaction Chaining of MD-SAL"
Ed Warnicke [Sat, 23 Aug 2014 19:41:47 +0000 (19:41 +0000)]
Merge "Bug 1262 - Document Transaction Chaining of MD-SAL"

9 years agoBug 1262 - Document Transaction Chaining of MD-SAL
Robert Varga [Mon, 7 Jul 2014 12:06:21 +0000 (14:06 +0200)]
Bug 1262 - Document Transaction Chaining of MD-SAL

Improves and clarifies the transaction chain concept and related APIs.

Change-Id: Ib509cdef33f8b51f8bd142b93657eace489e03a1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove unused getter"
Devin Avery [Fri, 22 Aug 2014 09:09:38 +0000 (09:09 +0000)]
Merge "Remove unused getter"

9 years agoMerge "BUG-868: remove unused things"
Devin Avery [Fri, 22 Aug 2014 09:04:45 +0000 (09:04 +0000)]
Merge "BUG-868: remove unused things"

9 years agoMerge "BUG-868: remove deprecated call"
Devin Avery [Fri, 22 Aug 2014 09:02:56 +0000 (09:02 +0000)]
Merge "BUG-868: remove deprecated call"

9 years agoRemove unused getter
Robert Varga [Wed, 13 Aug 2014 20:29:38 +0000 (22:29 +0200)]
Remove unused getter

Change-Id: Ib43a2a6a00029260b89358e115f0549db8f3e3ed
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: remove unused things
Robert Varga [Wed, 13 Aug 2014 20:27:29 +0000 (22:27 +0200)]
BUG-868: remove unused things

Change-Id: Ia90c279cb4f0871e4dccc4facf2dd739ab83d573
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: remove deprecated call
Robert Varga [Wed, 13 Aug 2014 20:26:43 +0000 (22:26 +0200)]
BUG-868: remove deprecated call

Change-Id: I1dc3b1634f2439dfa456415968bb718509de2ebc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec...
Tony Tkacik [Thu, 21 Aug 2014 09:58:22 +0000 (09:58 +0000)]
Merge "Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path"""

9 years agoMerge "BUG-1493: split off recursion tracking and rework it"
Tony Tkacik [Thu, 21 Aug 2014 07:18:03 +0000 (07:18 +0000)]
Merge "BUG-1493: split off recursion tracking and rework it"

9 years agoMerge "BUG-1493: Add test suite documentation"
Tony Tkacik [Thu, 21 Aug 2014 07:17:48 +0000 (07:17 +0000)]
Merge "BUG-1493: Add test suite documentation"

9 years agoBUG-1493: split off recursion tracking and rework it
Robert Varga [Thu, 14 Aug 2014 09:13:19 +0000 (11:13 +0200)]
BUG-1493: split off recursion tracking and rework it

This patch reworks tracking of recursion state into a separate class.
This allows us to unify the four call sites and provide a simple
heuristic. A state object is allocated each time we enter a new child
and its buidlers are collected when we emerge from it -- resulting in
more accurate event reporting, eliminating false positives.

Further optimization allows us to stop recursing as soon as we know no
listeners are affected by the outcome at a particular level.

Change-Id: I2be29cebb79892c85a22e79b18c2e62f77bfb7d4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1493: Add test suite documentation
Robert Varga [Sat, 16 Aug 2014 00:23:50 +0000 (02:23 +0200)]
BUG-1493: Add test suite documentation

This patch adds some sorely needed documentation.

Change-Id: I2cdf5122ba861b083203f82336300736e824ca3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1430: Obtain config params from config system"
Devin Avery [Mon, 18 Aug 2014 15:28:25 +0000 (15:28 +0000)]
Merge "Bug 1430: Obtain config params from config system"

9 years agoMerge "BUG-1558 Fix BindingAwareActivator ignoring removedService call."
Ed Warnicke [Mon, 18 Aug 2014 14:52:43 +0000 (14:52 +0000)]
Merge "BUG-1558 Fix BindingAwareActivator ignoring removedService call."

9 years agoBUG-1558 Fix BindingAwareActivator ignoring removedService call.
Maros Marsalek [Mon, 18 Aug 2014 07:42:02 +0000 (09:42 +0200)]
BUG-1558 Fix BindingAwareActivator ignoring removedService call.

Change-Id: I0a062bb144af7d4d70bc3f708e0f919bcce3dc9b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoRevert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write...
Robert Varga [Fri, 15 Aug 2014 19:28:52 +0000 (21:28 +0200)]
Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path""

This reverts commit be2b35105f8e10ada7d73f4523a5a931c57323b3,
reinstating the new codecs, with hopefully all the users able to cope.

Change-Id: I1cd50e71d92a32ded32e78310f3c958e76d0bdbd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write...
Ed Warnicke [Fri, 15 Aug 2014 15:24:43 +0000 (15:24 +0000)]
Merge "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path""

9 years agoRevert "BUG-1425: Integrated new Binding to Normalized Node codec for write path"
Ed Warnicke [Fri, 15 Aug 2014 14:49:27 +0000 (14:49 +0000)]
Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path"

This reverts commit eb2bd48a9148a4fbeae292ffd03e30083c2ff024.

Change-Id: Ic8183f6620c51d8a4a87a38af1e9a554e7f9016a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge changes I162c84f7,Iffa37d3f
Ed Warnicke [Thu, 14 Aug 2014 09:21:13 +0000 (09:21 +0000)]
Merge changes I162c84f7,Iffa37d3f

* changes:
  BUG-1425: Integrated new Binding to Normalized Node codec for write path
  BUG-1425: package binding-data-codec

9 years agoBUG-1425: Integrated new Binding to Normalized Node codec for write path
Robert Varga [Mon, 4 Aug 2014 17:29:10 +0000 (19:29 +0200)]
BUG-1425: Integrated new Binding to Normalized Node codec for write path

Integrated binding to normalized node codec for write path to datastore,
for deserialization legacy codecs are still used.

This patch requires https://git.opendaylight.org/gerrit/9795
to be merged in YANGTools before.

Removed private dead data broker code from MD-SAL.

Change-Id: I162c84f7da8330d94992122de3af19e76c1e41d2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1430: Obtain config params from config system
tpantelis [Sat, 9 Aug 2014 02:38:04 +0000 (22:38 -0400)]
Bug 1430: Obtain config params from config system

This is a follow-up patch to obtain the various data store executor
config params from the config system intsead of system properties.

Change-Id: Ib7fa03f053d6165fdcb52300be9add8ebe80b2c2
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Add exists method on DOMStoreReadTransaction and DOMDataReadTransaction"
Tom Pantelis [Wed, 13 Aug 2014 12:12:10 +0000 (12:12 +0000)]
Merge "Add exists method on DOMStoreReadTransaction and DOMDataReadTransaction"

9 years agoAdd exists method on DOMStoreReadTransaction and DOMDataReadTransaction
Moiz Raja [Sun, 10 Aug 2014 23:18:33 +0000 (16:18 -0700)]
Add exists method on DOMStoreReadTransaction and DOMDataReadTransaction

Introducing this API does not impact clients as it is mostly internal.

One reason for adding this API is because of ensureParentsByMerge used in a couple of places
which keeps checking if a parent node exists by reading a node to figure out if it exists. This is
fine for the InMemoryDataStore but it can be terrible in a distributed data store where the shard
which contains the data is remote. All sorts of overhead is associated with a remote read including
serialization which can actually be pretty expensive.

Change-Id: Ib5be5f6dc60be683d7a04c81dad08c56cd5681f4
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "Bug 1430: Off-load notifications from single commit thread"
Devin Avery [Mon, 11 Aug 2014 15:28:26 +0000 (15:28 +0000)]
Merge "Bug 1430: Off-load notifications from single commit thread"

9 years agoMerge "BUG-1511: add FIXME markers"
Ed Warnicke [Mon, 11 Aug 2014 13:01:37 +0000 (13:01 +0000)]
Merge "BUG-1511: add FIXME markers"

9 years agoBUG-1511: add FIXME markers
Robert Varga [Sat, 9 Aug 2014 10:38:17 +0000 (12:38 +0200)]
BUG-1511: add FIXME markers

Fixes a simple typo and drops marker FIXMEs for future implementation.

Change-Id: Ic4f67afd978f4bb43314d161afcfe1e56c831be6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1495: fail future when no local RPC is found"
Tony Tkacik [Fri, 8 Aug 2014 07:19:52 +0000 (07:19 +0000)]
Merge "BUG-1495: fail future when no local RPC is found"

9 years agoMerge "BUG-868: migrate ListenerRegistry"
Tony Tkacik [Thu, 7 Aug 2014 20:17:21 +0000 (20:17 +0000)]
Merge "BUG-868: migrate ListenerRegistry"

9 years agoMerge "BUG-1493: do not instantiate HashSet"
Tony Tkacik [Thu, 7 Aug 2014 19:57:53 +0000 (19:57 +0000)]
Merge "BUG-1493: do not instantiate HashSet"

9 years agoBUG-1495: fail future when no local RPC is found
Robert Varga [Thu, 7 Aug 2014 12:15:45 +0000 (14:15 +0200)]
BUG-1495: fail future when no local RPC is found

Instead of checking state, we return a failed future, which will have a
RpcImplementationUnavailableException as its cause. The current call
site is the remote broker, which is the provider of last resort and it
throws it when it has no foreign system available.

Change-Id: Ib9d8534ca75e60f1867a7c275ee653a70dbd7a00
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1493: do not instantiate HashSet
Robert Varga [Wed, 6 Aug 2014 18:01:24 +0000 (20:01 +0200)]
BUG-1493: do not instantiate HashSet

This HashSet is used to track processed nodes -- but the parent node is
already giving us a method, which checks if it contains a particular
node ID. Let's use that instead of maintaining the set.

Based on traces, this should speed the datastore up by about 4.8%.

Change-Id: I09e1135f51c8967b9fe8c520a0e166918472de7d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1430: Off-load notifications from single commit thread
tpantelis [Tue, 29 Jul 2014 10:42:14 +0000 (06:42 -0400)]
Bug 1430: Off-load notifications from single commit thread

Modified the InMemoryDOMDataStore to use the new
QueuedNotificationManager class added to yangtools common util for
DataChangeListener notifications.

Modified DOMDataCommitCoordinatorImpl's ListeningExecutorService to one
that off-loads ListenableFuture Runnable callbacks on a separate
executor.

Change-Id: I31f2fb002131c6d91b205d33255dd1bbc6433d9b
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Bug 1386: Avoid commit deadlock"
Tony Tkacik [Wed, 6 Aug 2014 17:05:10 +0000 (17:05 +0000)]
Merge "Bug 1386: Avoid commit deadlock"

9 years agoMerge "Bug 1418 - onDataChange notification is not returning any data to the getCrea...
Tony Tkacik [Wed, 6 Aug 2014 09:25:10 +0000 (09:25 +0000)]
Merge "Bug 1418 - onDataChange notification is not returning any data to  the getCreatedData and getModifiedData function calls. Data change  notification does not seem to work."

9 years agoBug 1418 - onDataChange notification is not returning any data to
Jan Hajnar [Tue, 5 Aug 2014 10:25:44 +0000 (12:25 +0200)]
Bug 1418 - onDataChange notification is not returning any data to
the getCreatedData and getModifiedData function calls. Data change
notification does not seem to work.

* Changed normalized to binding data change event translation call to
include event listener path. This path is then used to decode leaf or
mixin only augmentation because it can't be injected through children.
* Added verification tests.

Change-Id: Ia9d936f17b30b94fe4878e343cff7babb8d29d0f
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBug 1386: Avoid commit deadlock
tpantelis [Mon, 14 Jul 2014 12:01:16 +0000 (08:01 -0400)]
Bug 1386: Avoid commit deadlock

Changed the executor in DOMDataCommitCoordinatorImpl to a new
class DeadlockDetectingListeningExecutorService added to yangtools util.
This detects deadlock if another blocking commit is done by a client
notified from the single commit thread.

Change-Id: Icdc2b835fd336a1bbc37953828126b57253929c0
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBUG-868: migrate ListenerRegistry
Robert Varga [Tue, 5 Aug 2014 07:16:49 +0000 (09:16 +0200)]
BUG-868: migrate ListenerRegistry

yangtools.concepts.util is being migrated to yangtools.util, so adjust
users to lower the number of warnings.

Change-Id: I652f0131a59fdb2481d779c181861f7ed7674b03
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1392: Change ReadTransaction#read to return CheckedFuture"
Tony Tkacik [Sun, 3 Aug 2014 18:17:46 +0000 (18:17 +0000)]
Merge "Bug 1392: Change ReadTransaction#read to return CheckedFuture"

9 years agoMerge "Bug 1333: Regression Test suite."
Ed Warnicke [Fri, 1 Aug 2014 10:25:31 +0000 (10:25 +0000)]
Merge "Bug 1333: Regression Test suite."

9 years agoMerge "Bug 1369: Use separate single threadpool for data operations on binding mountp...
Ed Warnicke [Fri, 1 Aug 2014 09:35:31 +0000 (09:35 +0000)]
Merge "Bug 1369: Use separate single threadpool for data operations on binding mountpoint."

9 years agoMerge "BUG-868: Migrate to SchemaContextListener"
Tony Tkacik [Fri, 1 Aug 2014 08:00:43 +0000 (08:00 +0000)]
Merge "BUG-868: Migrate to SchemaContextListener"

9 years agoBUG-868: Migrate to SchemaContextListener
Robert Varga [Sun, 9 Mar 2014 18:34:51 +0000 (19:34 +0100)]
BUG-868: Migrate to SchemaContextListener

SchemaServiceListener is deprecated, SchemaContextListener is its new
name. The class hierarchy allows for incremental migration.

Change-Id: I15d495d805eb7a08c3bcd3ab0cf8b5a8d2797db5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1228: Optimize AbstractForwardedDataBroker a bit
Robert Varga [Wed, 30 Jul 2014 18:42:00 +0000 (20:42 +0200)]
BUG-1228: Optimize AbstractForwardedDataBroker a bit

Profiling OFP with datastore backend has revealed that we spend about 9%
of CPU in AbstractForwardedDataBroker$1.compare(). This turns out to be
a comparator, which compares two YangInstanceIdentifiers by their path
length -- and to do that it iterates fully through both of them.

We perform three optimizations:
- make the comparator itself shareable, so we do not instantiate it
  (6000 during the profiling run)
- make the .sortedEntries() smart about empty maps
- teach the comparator to abort iteration as soon as the result is
  known

At the same time we import YangInstanceIdentifier, making the code a bit
more readable.

Change-Id: I38d3629ab33dac9e2e29b092e3a89d0821d09b07
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1392: Change ReadTransaction#read to return CheckedFuture
tpantelis [Mon, 14 Jul 2014 16:35:57 +0000 (12:35 -0400)]
Bug 1392: Change ReadTransaction#read to return CheckedFuture

Added a ReadFailedException that is used with the CheckedFuture.
Moved the RpcError list from TransactionCommitFailedException to a new base
OperationFailedException in yangtools and also derived ReadFailedException from
OperationFailedException.

Added a static MAPPER in ReadFailedException class using the new generalized base
ExceptionMapper class in yangtools. Also derived
TransactionCommitFailedExceptionMapper from ExceptionMapper.

Modified uses of Futures#makeChecked in the read Tx and write Tx submit
to use the new MappingCheckedFuture class in yangtools (see
https://git.opendaylight.org/gerrit/#/c/9240/ for details).

Change-Id: I5c4f717f0b8664b7d39c1e6f0366525f04e6634d
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBUG-1092: adjust to YangInstanceIdentifier
Robert Varga [Tue, 29 Jul 2014 10:15:49 +0000 (12:15 +0200)]
BUG-1092: adjust to YangInstanceIdentifier

This is a compation to I1e30a0df93d8bfb891d047c58abcb117d4006c76,
adjusting the components to use the new name.

Change-Id: I615763240581e850f7752f82e44d752c8fceb169
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I1d768b2b,I9302e88a
Tony Tkacik [Tue, 29 Jul 2014 10:48:46 +0000 (10:48 +0000)]
Merge changes I1d768b2b,I9302e88a

* changes:
  Fix identity-ref serialization in netconf.
  BUG-1083 Netconf connector rework sal facade.

9 years agoMerge changes Ifd28301d,I38220acb,I9bad24df
Tony Tkacik [Tue, 29 Jul 2014 09:29:39 +0000 (09:29 +0000)]
Merge changes Ifd28301d,I38220acb,I9bad24df

* changes:
  WIP: Backwards compatible MountPointService
  Fix children element lookup in XmlElement
  Fix config attributes with same names for different modules.

9 years agoBUG-1083 Netconf connector rework sal facade.
Maros Marsalek [Tue, 22 Jul 2014 13:02:25 +0000 (15:02 +0200)]
BUG-1083 Netconf connector rework sal facade.

Change-Id: I9302e88ac3e831e2966e2baec9493a03e0a96be4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoWIP: Backwards compatible MountPointService
Maros Marsalek [Fri, 18 Jul 2014 12:29:39 +0000 (14:29 +0200)]
WIP: Backwards compatible MountPointService

Change-Id: Ifd28301ddd08d4edba93dba04a4d38c2ee13078a
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix config attributes with same names for different modules.
Maros Marsalek [Thu, 24 Jul 2014 15:09:53 +0000 (17:09 +0200)]
Fix config attributes with same names for different modules.

Yang does not allow attributes in different cases to have the same name.
In yang modules for config, the configuration is located in cases and if 2 cases in same yang module contain child with same name, the transformation of data from CompositeNode to NormalizedNode

NOTE: This might break bgpcep and SP distribution, check.

Change-Id: I9bad24df9ac149da74b745ff648c72345e33deb1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-432: migrate users of Registration as appropriate"
Tony Tkacik [Mon, 28 Jul 2014 12:24:45 +0000 (12:24 +0000)]
Merge "BUG-432: migrate users of Registration as appropriate"

9 years agoMerge "RPC registrations should not throw"
Tony Tkacik [Mon, 28 Jul 2014 12:04:31 +0000 (12:04 +0000)]
Merge "RPC registrations should not throw"

9 years agoMerge "Deprecating unused get{Provider,Consumer} Functionality"
Tony Tkacik [Mon, 28 Jul 2014 09:01:25 +0000 (09:01 +0000)]
Merge "Deprecating unused get{Provider,Consumer} Functionality"

9 years agoMerge "Removed BundleContext from Broker.register{Consumer,Provider} (Part 2)"
Tony Tkacik [Mon, 28 Jul 2014 09:01:02 +0000 (09:01 +0000)]
Merge "Removed BundleContext from Broker.register{Consumer,Provider} (Part 2)"

9 years agoMerge "Removed BundleContext from Broker.register{Consumer,Provider}"
Tony Tkacik [Mon, 28 Jul 2014 09:00:21 +0000 (09:00 +0000)]
Merge "Removed BundleContext from Broker.register{Consumer,Provider}"

9 years agoMerge "Allow getChildNodes() to become a Collection"
Tony Tkacik [Mon, 28 Jul 2014 08:56:15 +0000 (08:56 +0000)]
Merge "Allow getChildNodes() to become a Collection"

9 years agoMerge "BUG-1381: do not use JavassistUtils.getLock()"
Tony Tkacik [Mon, 28 Jul 2014 08:53:03 +0000 (08:53 +0000)]
Merge "BUG-1381: do not use JavassistUtils.getLock()"

9 years agoBUG-432: migrate users of Registration as appropriate
Robert Varga [Sun, 27 Jul 2014 20:27:21 +0000 (22:27 +0200)]
BUG-432: migrate users of Registration as appropriate

This patch adjust all users to the non-generic nator of Registration,
plus migrates a few to ListenerRegistration.

Change-Id: I69c1c61890f866d24a4b50e685bddba32bac7815
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRPC registrations should not throw
Robert Varga [Fri, 25 Jul 2014 12:39:27 +0000 (14:39 +0200)]
RPC registrations should not throw

Change-Id: I7f7f13ea7bdce3db5e833e3532c2e5db873daf74
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAllow getChildNodes() to become a Collection
Robert Varga [Sat, 26 Jul 2014 04:06:52 +0000 (06:06 +0200)]
Allow getChildNodes() to become a Collection

Preparatory patch for yangtools change -- getChildNodes() will start
returning a Collection, not a Set.

Change-Id: Ie7255757e3f48465e3acd9e65764f1b79a3a9511
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1381: do not use JavassistUtils.getLock()
Robert Varga [Fri, 25 Jul 2014 13:33:05 +0000 (15:33 +0200)]
BUG-1381: do not use JavassistUtils.getLock()

We have it now synchronized through the instance, so there's no need for
getLock().

Change-Id: I3e962f284132b376f77e9e2665b3fbb47f246514
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDeprecating unused get{Provider,Consumer} Functionality
Ed Warnicke [Fri, 25 Jul 2014 12:21:31 +0000 (07:21 -0500)]
Deprecating unused get{Provider,Consumer} Functionality

Provider.getProviderFunctionality
Consumer.getConsumerFunctionality
interface ProviderFunctionality
interface ConsumerFunctionality

are unused.  They should go away, so this patch marks
them as deprecated.

Change-Id: Icfcbf9f4cfed0186c720eab26405894183b9009f
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoRemoved BundleContext from Broker.register{Consumer,Provider} (Part 2)
Ed Warnicke [Fri, 25 Jul 2014 12:05:21 +0000 (07:05 -0500)]
Removed BundleContext from Broker.register{Consumer,Provider} (Part 2)

Moved the bodies of the methods around to make the deprecated
methods just call throughs to the new methods.

Removed extra argument from private method newSessionFor

Change-Id: I748662491e6670262ecfad4122bcc7a9f831107d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoRemoved BundleContext from Broker.register{Consumer,Provider}
Ed Warnicke [Fri, 25 Jul 2014 12:00:14 +0000 (07:00 -0500)]
Removed BundleContext from Broker.register{Consumer,Provider}

Don't freak out... the old methods are still there, just
deprecated.

Change-Id: I6f37af7d93948bbf0d3b23635c73803645028ec7
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "BUG-1381: make users of JavassistUtils.getLock synchronized properly"
Tony Tkacik [Fri, 25 Jul 2014 11:17:52 +0000 (11:17 +0000)]
Merge "BUG-1381: make users of JavassistUtils.getLock synchronized properly"

9 years agoMerge "Override TransactionFactor method in DataBroker to return correct TransactionC...
Tony Tkacik [Fri, 25 Jul 2014 11:16:05 +0000 (11:16 +0000)]
Merge "Override TransactionFactor method in DataBroker to return correct TransactionChain."

9 years agoMake DOMMountPointService listenable
Maros Marsalek [Thu, 24 Jul 2014 11:43:09 +0000 (13:43 +0200)]
Make DOMMountPointService listenable

Change-Id: Ic44a4bf214f6f6a6d653627b6a62ab2f47bd9963
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 1280: Added option to automaticly create parents"
Tom Pantelis [Thu, 24 Jul 2014 19:44:19 +0000 (19:44 +0000)]
Merge "Bug 1280: Added option to automaticly create parents"

9 years agoBUG-1381: make users of JavassistUtils.getLock synchronized properly
Robert Varga [Wed, 16 Jul 2014 21:07:27 +0000 (23:07 +0200)]
BUG-1381: make users of JavassistUtils.getLock synchronized properly

As a transition period, use both locking schemes. Once the initial
patches are in, we can then remove the use of getLock().

Change-Id: Ibf4c0ea9f420d81dfe74f7b0c5479f01b45a8d2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOverride TransactionFactor method in DataBroker to return correct TransactionChain.
Maros Marsalek [Thu, 24 Jul 2014 09:30:11 +0000 (11:30 +0200)]
Override TransactionFactor method in DataBroker to return correct TransactionChain.

Change-Id: Ib86159c8faa8ddd729b9abc69ea7708fd4b086f3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 279, 1390: Used Guava Cache r for lazy-loading of RPC Routers"
Tom Pantelis [Wed, 23 Jul 2014 14:30:44 +0000 (14:30 +0000)]
Merge "Bug 279, 1390: Used Guava Cache r for lazy-loading of RPC Routers"

9 years agoMerge "NormalizedNode Mount APIs."
Tony Tkacik [Wed, 23 Jul 2014 05:41:39 +0000 (05:41 +0000)]
Merge "NormalizedNode Mount APIs."

9 years agoNormalizedNode Mount APIs.
Maros Marsalek [Fri, 18 Jul 2014 12:28:53 +0000 (14:28 +0200)]
NormalizedNode Mount APIs.

Change-Id: Iee3b7101642bde9aa1a38150ee2a62b84c3de1fb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "API Usability: Introduced type capture for Transaction Factory"
Devin Avery [Tue, 22 Jul 2014 13:43:37 +0000 (13:43 +0000)]
Merge "API Usability: Introduced type capture for Transaction Factory"

9 years agoMerge "Change put/merge methods to be type-safe in WriteTransaction"
Devin Avery [Mon, 21 Jul 2014 14:16:31 +0000 (14:16 +0000)]
Merge "Change put/merge methods to be type-safe in WriteTransaction"

9 years agoBug 1333: Regression Test suite.
Tony Tkacik [Thu, 10 Jul 2014 15:24:53 +0000 (17:24 +0200)]
Bug 1333: Regression Test suite.

Change-Id: Ib7e95b73bfb6a48f08b008427ac4d9d25dfb8355
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>