yangtools.git
9 years agoMerge "Optimized version of NormalizedNode Serialization"
Tom Pantelis [Fri, 29 Aug 2014 18:14:59 +0000 (18:14 +0000)]
Merge "Optimized version of NormalizedNode Serialization"

9 years agoMoving protobuff files to sal-clustering-commons
Basheeruddin Ahmed [Wed, 27 Aug 2014 23:36:00 +0000 (16:36 -0700)]
Moving protobuff files to sal-clustering-commons

Change-Id: I299886a22aa250f4a35c8c35385c89b5c58e297d
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
9 years agoOptimized version of NormalizedNode Serialization
Moiz Raja [Tue, 26 Aug 2014 02:04:30 +0000 (19:04 -0700)]
Optimized version of NormalizedNode Serialization

This commit contains the following,
- Conversion of NormalizedNode to Protocol Buffer using simple tree traversal
- Encoding of QNames and other values to small sized codes to reduce the size of the protobuf message
- Also we now do not use SchemaContext for decoding a NormalizedNode

In addition to these changes I have snuck in an unrelated change to the pom files
to get the appropriate jacoco settings in it.

Change-Id: I6ab48c9f53cf76d6d0c865cf6e5522ff27a30e3f
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "BUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier...
Ed Warnicke [Mon, 25 Aug 2014 09:07:28 +0000 (09:07 +0000)]
Merge "BUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier/PathArgument"

9 years agoKeep a cache of QName
Moiz Raja [Mon, 11 Aug 2014 22:44:56 +0000 (15:44 -0700)]
Keep a cache of QName

QName creation is expensive so keep of cache of 10,000 QNames around so that
we can lookup QNames that were previously created

Change-Id: I04e19bbe733a9da46b999e517e2eefdbb88d1259
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoBUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier/PathAr...
Moiz Raja [Sat, 23 Aug 2014 10:34:43 +0000 (03:34 -0700)]
BUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier/PathArgument

The code has been modified to stop interpreting YangInstanceIdentifier.toString
and PathArgument.toString as a serialized versions of those objects. The toString
implementations of those objects has now been moved into PathUtils.

- NormalizedNodeGetter and NormalizedNodeToNodeCodecTest have been modified to use
PathUtils.toString instead of YangInstanceIdentifier.toString or PathArgument.toString

- Added tests to cover all the utilities in PathUtils

Change-Id: I1ed2c452e15a45229c36532d59db7fa1a77d283d
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "Custom mailbox that is bounded and instrumented."
Moiz Raja [Tue, 19 Aug 2014 16:54:17 +0000 (16:54 +0000)]
Merge "Custom mailbox that is bounded and instrumented."

9 years agoCustom mailbox that is bounded and instrumented.
Abhishek Kumar [Fri, 15 Aug 2014 06:15:28 +0000 (23:15 -0700)]
Custom mailbox that is bounded and instrumented.

This is for use with Akka actors. It enables monitoring
of actor's mailbox size via JMX.

Change-Id: Ic1e478e4411f53ff0239d316a1ca02eaa80360ed
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
9 years agoMoving common code out of remote rpc to clustering common bundle
Harman Singh [Sat, 16 Aug 2014 00:50:58 +0000 (17:50 -0700)]
Moving common code out of remote rpc to clustering common bundle

Change-Id: Iad469f809ac55b2d873ff4d48e912ad66184c68d
Signed-off-by: Harman Singh <harmasin@cisco.com>
9 years agoMove the CompositeModificatoinPayload message to proper
Basheeruddin Ahmed [Wed, 13 Aug 2014 23:35:27 +0000 (16:35 -0700)]
Move the CompositeModificatoinPayload message to proper
package
The package of protobuff generated code is
excluded from sonar testing

Change-Id: I4eeae429febe32a8a347c319f6dec60cd0df5946
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
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 agoFix usage of StringBuilder when getting parent path
Basheeruddin Ahmed [Fri, 8 Aug 2014 21:39:25 +0000 (14:39 -0700)]
Fix usage of StringBuilder when getting parent path
in PathUtils
Making constants final
timing encode/decode in a test case

Change-Id: Ia552163dfe35dcd268bd8a0620c6b34c910f47b2
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
9 years agoUtilize transaction type to create read-only or
Basheeruddin Ahmed [Wed, 6 Aug 2014 22:38:35 +0000 (15:38 -0700)]
Utilize transaction type to create read-only or
write-only or read-write transaction instead of always
creating read-write transaction

patch 2: updated based on review comments

Change-Id: I36390ab348c5774cf4bf180ea1608fe04f75d073
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
9 years agoCreated sal-clustering-commons and moved
Basheeruddin Ahmed [Tue, 5 Aug 2014 00:18:27 +0000 (17:18 -0700)]
Created sal-clustering-commons and moved
sal-protobuff-encoding files to sal-clustering-commons

updated sal-distributed-datastore pom with the above change

removed sal-clustering-commons as part of distribution as it is embedded currently as part of distributed-datastore

Note - after this is merged we need to move
 out the .proto from  akka-raft to sal-clustering-commons
and add dependency of sal-akka-raft on sal-clustering-commons
and embed the same
rebased
Change-Id: I7d4ac51628cef96ffb16acfcfd596dfd3129e0fa
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>