Remove prefix shard leftovers With the removal of everything producer related we can also remove everything related to prefix shards. JIRA: CONTROLLER-1977 Change-Id: I05bd1a286cd8fac252c122d2118d1d7dedcc8941 Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Bump odlparent/yangtools/mdsal Adopt latest versions, namely; - odlparent-9.0.1 - yangtools-7.0.1 - mdsal-8.0.0-SNAPSHOT There are a few adjustments needed, which mostly deal with the interface to NormalizedNode. Change-Id: I918fb885a6df62e16e17119a7e04ba1672ef7c39 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix modernization issues This fixes issues pointed out by Modernizer, which mostly boil down to using Objects.requireNonNull() and direct java.util collections. Change-Id: Id32530a6722cd101f96c23f6a745f91b2f09e2f9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Optimize use of YangInstanceIdentifier.getPathArguments() This method returns a list, hence we can lookup the first item without iterating and also can use Lists.transform(). Change-Id: Ie26bfcc225c74154d65ef963e3444ac5ec10bafb Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
BUG-2138: Create DistributedShardFrontend Use the abstract shard implementations from md-sal to create a frontend implementation of a cds shard that forwards requests to backend shards via DistributedDatastoreClient. Change-Id: I7a3485f414368728e71ab2746c84d7a0f83f1436 Signed-off-by: Tomas Cere <tcere@cisco.com>
BUG 2138: Introduce prefix based shards into ShardManager Adds the concept of shards rooted at a DOMDataTreeIdentifier (combination of YangInstanceIdentifier and LogicalDataStore) into the distributed datastore. Change-Id: I43a32556000092c7e7b2ee09b334f82f38ec865b Signed-off-by: Tomas Cere <tcere@cisco.com>
Fix warnings/javadocs in sal-distributed-datastore First off, I apologize for the size of this patch. There's a ton of classes in this project and I didn't even get to all of them (will follow-up). While a lot of files were touched, the changes were mostly small. Fixed a lot of checkstyle warnings and cleaned up javadocs. Most of the warnings/changes were for: - white space before if/for/while/catch - white space before beginning brace - line too long - illegal catching of Exception (suppressed) - variable name too short - indentation - missing period after first sentence in javadoc - missing first sentence in javadoc - missing <p/> in javadoc Change-Id: Id56d874a8fbcbbc9285279a71c0a5aba393653a9 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
BUG-4167: fall back to unknown module for empty YangInstanceIdentifier When we encounter an empyt YangInstanceIdentifier (for example during listener registration), we cannot extract a module name -- fallback to unknown, which will cause us to talk to the default shard. Change-Id: I2162884c5ce0d2c2f714bb66afd82f699c52d789 Signed-off-by: Robert Varga <rovarga@cisco.com>
Bug 4105: Add dynamic module/shard config for entity-owners shard Added a new method addModuleShardConfiguration to Configuration. I simplified the internals of ConfigurationImpl to make it easier to add a new module/shard config. I combined serveral of the maps into one moduleConfigMap and reduced the total # of fields to 3. For synchronization, I kept the maps/sets immutable and used copy-on-write semantics to update them as they will seldom change. I also made the fields volatile. I also removed the singleton nature of ShardStrategyFactory since each datastore's Configuration will now be different, ie only the operational datastore's Configuration will have the entity-owners module. The datastore's ShardStrategyFactory instance is not instantiated and owned by the ActorContext. To make things easier for unit tests, I abstracted the file-reading code in ConfigurationImpl to a new ModuleShardConfigProvider interface and FileModuleShardConfigProvider implementation in the config package. I also moved the inner classes to the config package. While I was at it I also moved Configuration and ConfigurationImpl to the config package for consistency. Change-Id: I1d6858d3ae68869ca6f61d4f5a5f0d319d93c485 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Bug 4105: Move Configuration classes to config package Change-Id: I863600727f5171eb0db3591a541848aa877a68de Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Use a singleton instance for DefaultShardStrategy Instead of instantiating the DefaultShardStrategy everywhere it is used, share a singleton instance. Change-Id: I24ebd4b1d713a09b4fc4161e9c8c69a088af5ac6 Signed-off-by: Robert Varga <rovarga@cisco.com>
Fix warnings in clustering Fixes the use of raw types. Change-Id: I06d7935e6686bfceb3c574c9465a76adff2c825c Signed-off-by: Robert Varga <rovarga@cisco.com>
Serialization/Deserialization and a host of other fixes - Hande Cluster MemberUp and MemberRemoved events in ShardManager - Cohort messages and close listener messages switched to use protobuff - Distributed Datastore switch messages to use protobuff CreateTransaction CreateTransactionReply CreateTransactionChain CreateTransactionChainReply distributed datastore messages switched to protobuff - ShardManager messages switch to protobuff - DataChanged and other messages switch to protobuf in distributed datastore - Fixed few things found during testing 1. ShardStrategy - setting of configuration 2. NodeToNormalizedNodeBuilder - leaf node/leafsetentry node checks 3. DataChanged event - passing of scope instanceidentifier used during deserialization - Introducing JMX MBeans for distributed datastore -Fixed issues which were preventing remote Shards from talking to each other - Fixed a number of issues related to deserialization - Add distributed datastore to the build - Switch from InstanceIdentifier to YangInstanceIdentifier Change-Id: I0d15dc482cb2b0fb2170b1344bad9fa3b421e8e0 Signed-off-by: Moiz Raja <moraja@cisco.com>
Implementation of ModuleShardStrategy ModuleShardStrategy finds a shard based on a module name only. This will allow it partition a single large DOM tree into multiple shards based on configuration Change-Id: I6e287fc48a08da58d261e80b59419d4311164aa3 Signed-off-by: Moiz Raja <moraja@cisco.com>
Introduce ShardStrategy and related code Change-Id: I0df1f18f7b3488acae440e3375e155ae7ee06abf Signed-off-by: Moiz Raja <moraja@cisco.com>