Refactor odl-mdsal-distributed-datastore 16/81916/3
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 6 May 2019 18:04:10 +0000 (20:04 +0200)
committerStephen Kitt <skitt@redhat.com>
Tue, 7 May 2019 08:09:26 +0000 (08:09 +0000)
odl-mdsal-distributed-datastore forms the baseline for supporting
akka-based cluster. This refactors it to pull its dependencies in
so it can be properly tested.

This also moves CommitStatsMXBean, so we do not depend on controller's
broker at all.

Finally we co-locate all configuration files into this feature, so
it can boot up.

JIRA: CONTROLLER-1584
Change-Id: I9319de78d61d63e3c49825e940af5c8c70657185
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
features/mdsal/odl-mdsal-broker/pom.xml
features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml [deleted file]
features/mdsal/odl-mdsal-distributed-datastore/pom.xml
features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/CommitStatsMXBean.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/jmx/CommitStatsMXBean.java with 95% similarity]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/CommitStatsMXBeanImpl.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/jmx/CommitStatsMXBeanImpl.java with 96% similarity]
opendaylight/md-sal/sal-distributed-datastore/src/main/resources/OSGI-INF/blueprint/clustered-datastore.xml
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/CommitStatsMXBeanImplTest.java [moved from opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/jmx/CommitStatsMXBeanImplTest.java with 94% similarity]

index 9c4f959..8c7d1e6 100644 (file)
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
-        <dependency>
-            <!-- finalname="configuration/initial/akka.conf" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-            <version>${project.version}</version>
-            <type>xml</type>
-            <classifier>akkaconf</classifier>
-        </dependency>
-        <dependency>
-            <!-- finalname="configuration/factory/akka.conf" override="true" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-            <version>${project.version}</version>
-            <type>xml</type>
-            <classifier>factoryakkaconf</classifier>
-        </dependency>
-        <dependency>
-            <!-- finalname="configuration/initial/module-shards.conf" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-            <version>${project.version}</version>
-            <type>xml</type>
-            <classifier>moduleshardconf</classifier>
-        </dependency>
-        <dependency>
-            <!-- finalname="configuration/initial/modules.conf" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-            <version>${project.version}</version>
-            <type>xml</type>
-            <classifier>moduleconf</classifier>
-        </dependency>
-        <dependency>
-            <!-- finalname="etc/org.opendaylight.controller.cluster.datastore.cfg" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-            <version>${project.version}</version>
-            <type>cfg</type>
-            <classifier>datastore</classifier>
-        </dependency>
     </dependencies>
 </project>
diff --git a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml
deleted file mode 100644 (file)
index 8474cc9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright © 2016, 2017 Red Hat, Inc. and others.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
- -->
-<features name="odl-mdsal-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
-    <feature name="odl-mdsal-broker" version="${project.version}">
-        <configfile finalname="configuration/initial/akka.conf">
-            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf
-        </configfile>
-        <configfile finalname="configuration/factory/akka.conf" override="true">
-            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/factoryakkaconf
-        </configfile>
-        <configfile finalname="configuration/initial/module-shards.conf">
-            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleshardconf
-        </configfile>
-        <configfile finalname="configuration/initial/modules.conf">
-            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleconf
-        </configfile>
-        <configfile finalname="etc/org.opendaylight.controller.cluster.datastore.cfg">
-            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/cfg/datastore
-        </configfile>
-    </feature>
-</features>
index 636ca4e..435f68a 100644 (file)
     <version>1.10.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
-    <properties>
-        <!-- CONTROLLER-1584 -->
-        <skip.karaf.featureTest>true</skip.karaf.featureTest>
-    </properties>
+    <name>OpenDaylight :: Controller :: Clustered Datastore</name>
+    <description>Controller Clustered Datastore (akka-based)</description>
 
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yangtools-artifacts</artifactId>
+                <version>3.0.0</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>4.0.0</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
 
     <dependencies>
         <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>odl-mdsal-broker-local</artifactId>
+            <groupId>org.opendaylight.odlparent</groupId>
+            <artifactId>odl-apache-commons-text</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
-            <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl-apache-commons-text</artifactId>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>odl-yangtools-codec</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>odl-mdsal-eos-dom</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>odl-mdsal-dom-broker</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>odl-mdsal-binding-dom-adapter</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>odl-controller-blueprint</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>cds-access-api</artifactId>
             <groupId>${project.groupId}</groupId>
             <artifactId>sal-cluster-admin-impl</artifactId>
         </dependency>
+
+        <dependency>
+            <!-- finalname="configuration/initial/akka.conf" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-clustering-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>akkaconf</classifier>
+        </dependency>
+        <dependency>
+            <!-- finalname="configuration/factory/akka.conf" override="true" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-clustering-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>factoryakkaconf</classifier>
+        </dependency>
+        <dependency>
+            <!-- finalname="configuration/initial/module-shards.conf" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-clustering-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>moduleshardconf</classifier>
+        </dependency>
+        <dependency>
+            <!-- finalname="configuration/initial/modules.conf" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-clustering-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>moduleconf</classifier>
+        </dependency>
+        <dependency>
+            <!-- finalname="etc/org.opendaylight.controller.cluster.datastore.cfg" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-clustering-config</artifactId>
+            <version>${project.version}</version>
+            <type>cfg</type>
+            <classifier>datastore</classifier>
+        </dependency>
     </dependencies>
 </project>
index 96d8ffe..8da6637 100644 (file)
@@ -9,5 +9,23 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-distributed-datastore" version="${project.version}">
         <feature version="[5,6)">odl-apache-commons-text</feature>
+        <feature version="[3,4)">odl-yangtools-codec</feature>
+        <feature version="[4,5)">odl-mdsal-eos-dom</feature>
+        <feature version="[4,5)">odl-mdsal-dom-broker</feature>
+        <configfile finalname="configuration/initial/akka.conf">
+            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf
+        </configfile>
+        <configfile finalname="configuration/factory/akka.conf" override="true">
+            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/factoryakkaconf
+        </configfile>
+        <configfile finalname="configuration/initial/module-shards.conf">
+            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleshardconf
+        </configfile>
+        <configfile finalname="configuration/initial/modules.conf">
+            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleconf
+        </configfile>
+        <configfile finalname="etc/org.opendaylight.controller.cluster.datastore.cfg">
+            mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/cfg/datastore
+        </configfile>
     </feature>
 </features>
index 13515cd..36e768a 100644 (file)
 
   <!-- JMX beans for the data broker -->
 
-  <bean id="commitStatsMXBean" class="org.opendaylight.controller.md.sal.dom.broker.impl.jmx.CommitStatsMXBeanImpl"
+  <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
           init-method="register" destroy-method="unregister">
     <argument ref="commitStatsTracker"/>
     <argument value="DOMDataBroker"/>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.