Skip to content

Commit

Permalink
Move bookkeeper-stats and bookkeeper-stats-providers as submodules of…
Browse files Browse the repository at this point in the history
… stats

### Motiviations
Fix todo to make the project layout more reasonable and easier to fix bug/dev new feature
### Changes
move `bookkeeper-stats` and `bookkeeper-stats-providers` as submodules of `stats`

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Nicolò Boschi <boschi1997@gmail.com>, Andrey Yegorov <None>

This closes apache#3246 from Shoothzj/module-04-25
  • Loading branch information
ZhangJian He authored Apr 28, 2022
1 parent 4175088 commit 80ca1f8
Show file tree
Hide file tree
Showing 72 changed files with 48 additions and 53 deletions.
2 changes: 1 addition & 1 deletion bookkeeper-benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {

implementation project(':bookkeeper-common')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')

compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
Expand Down
2 changes: 1 addition & 1 deletion bookkeeper-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

dependencies {
implementation project(":bookkeeper-stats")
implementation project(":stats:bookkeeper-stats-api")
implementation project(":cpu-affinity")

implementation depLibs.errorprone
Expand Down
6 changes: 3 additions & 3 deletions bookkeeper-dist/all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ dependencies {
implementation project(':bookkeeper-http:http-server')
implementation project(':bookkeeper-http:vertx-http-server')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats-providers:codahale-metrics-provider')
implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stats:bookkeeper-stats-providers:codahale-metrics-provider')
implementation project(':stats:bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
implementation project(':bookkeeper-tools')
Expand Down
2 changes: 1 addition & 1 deletion bookkeeper-dist/bkctl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
exclude group: 'log4j', module: 'log4j'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
runtimeOnly (project(':bookkeeper-stats-providers:codahale-metrics-provider')) {
runtimeOnly (project(':stats:bookkeeper-stats-providers:codahale-metrics-provider')) {
exclude group: "io.dropwizard.metrics", module: "metrics-graphite"
exclude group: "io.dropwizard.metrics", module: "metrics-jvm"
}
Expand Down
6 changes: 3 additions & 3 deletions bookkeeper-dist/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ releaseArtifacts {

dependencies {
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':bookkeeper-tools')
implementation project(':stats:bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
implementation project(':bookkeeper-tools')
runtimeOnly depLibs.log4jSlf4jImpl
runtimeOnly depLibs.log4jCore
runtimeOnly (depLibs.zookeeperTest) {
Expand Down
4 changes: 2 additions & 2 deletions bookkeeper-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ dependencies {
implementation project(':bookkeeper-common-allocator')
implementation project(':bookkeeper-http:http-server')
implementation project(':bookkeeper-proto')
implementation project(':bookkeeper-stats')
implementation project(':bookkeeper-tools-framework')
implementation project(':circe-checksum')
implementation project(':cpu-affinity')
implementation project(':stats:bookkeeper-stats-api')

compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
Expand Down Expand Up @@ -58,7 +58,7 @@ dependencies {
runtimeOnly depLibs.snappy

testImplementation project(':testtools')
testImplementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
testImplementation project(':stats:bookkeeper-stats-providers:prometheus-metrics-provider')
testImplementation project(':bookkeeper-http:vertx-http-server')
testImplementation project(path: ':bookkeeper-common', configuration: 'testArtifacts')

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ allprojects {
def javadocProjects = [
":bookkeeper-common",
":bookkeeper-server",
":bookkeeper-stats",
":bookkeeper-stats-providers:prometheus-metrics-provider",
":bookkeeper-stats-providers:codahale-metrics-provider",
":stats:bookkeeper-stats-api",
":stats:bookkeeper-stats-providers:codahale-metrics-provider",
":stats:bookkeeper-stats-providers:prometheus-metrics-provider",
]

task generateApiJavadoc(type: Javadoc) {
Expand Down
2 changes: 1 addition & 1 deletion metadata-drivers/etcd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
dependencies {
implementation project(":bookkeeper-server")
implementation project(":bookkeeper-common")
implementation project(":bookkeeper-stats")
implementation project(":stats:bookkeeper-stats-api")
implementation depLibs.etcd
implementation depLibs.commonsConfiguration
implementation depLibs.commonsLang3
Expand Down
6 changes: 3 additions & 3 deletions microbenchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ plugins {
}

dependencies {
implementation project(":bookkeeper-stats-providers:codahale-metrics-provider")
implementation project(":bookkeeper-stats-providers:prometheus-metrics-provider")
implementation project(":bookkeeper-common")
implementation project(":bookkeeper-server")
implementation project(":bookkeeper-stats")
implementation project(":stats:bookkeeper-stats-api")
implementation project(":stats:bookkeeper-stats-providers:codahale-metrics-provider")
implementation project(":stats:bookkeeper-stats-providers:prometheus-metrics-provider")
implementation project(":bookkeeper-proto")
compileOnly depLibs.metricsCore
compileOnly depLibs.protobuf
Expand Down
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,9 @@
<module>bookkeeper-common</module>
<module>bookkeeper-common-allocator</module>
<module>stats</module>
<!-- TODO: move `bookkeeper-stats` and `bookkeeper-stats-providers` as submodules of `stats` -->
<module>bookkeeper-stats</module>
<module>bookkeeper-proto</module>
<module>bookkeeper-server</module>
<module>bookkeeper-benchmark</module>
<module>bookkeeper-stats-providers</module>
<module>bookkeeper-http</module>
<module>stream</module>
<module>tools</module>
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ include(':bookkeeper-benchmark',
'bookkeeper-server',
'shaded:bookkeeper-server-shaded',
'shaded:bookkeeper-server-tests-shaded',
'bookkeeper-stats',
'bookkeeper-stats-providers:prometheus-metrics-provider',
'bookkeeper-stats-providers:codahale-metrics-provider',
'buildtools',
'circe-checksum',
'circe-checksum:src:main:circe',
Expand All @@ -64,6 +61,9 @@ include(':bookkeeper-benchmark',
'microbenchmarks',
'metadata-drivers:etcd',
'shaded:distributedlog-core-shaded',
'stats:bookkeeper-stats-api',
'stats:bookkeeper-stats-providers:prometheus-metrics-provider',
'stats:bookkeeper-stats-providers:codahale-metrics-provider',
'stats:utils',
'stream:api',
'stream:clients:java:all',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>bookkeeper</artifactId>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper-stats-parent</artifactId>
<groupId>org.apache.bookkeeper.stats</groupId>
<version>4.16.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.bookkeeper.stats</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description = 'Apache BookKeeper :: Stats Providers :: Codahale Metrics'

dependencies {

implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')

implementation depLibs.commonsConfiguration
implementation depLibs.guava
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>bookkeeper</artifactId>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper-stats-providers</artifactId>
<groupId>org.apache.bookkeeper.stats</groupId>
<version>4.16.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.apache.bookkeeper.stats</groupId>
<artifactId>codahale-metrics-provider</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>bookkeeper</artifactId>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper-stats-parent</artifactId>
<groupId>org.apache.bookkeeper.stats</groupId>
<version>4.16.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
}

dependencies {
implementation project(":bookkeeper-stats")
implementation project(":stats:bookkeeper-stats-api")
implementation depLibs.commonsConfiguration
implementation depLibs.guava
implementation depLibs.jettyServlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>bookkeeper</artifactId>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper-stats-providers</artifactId>
<groupId>org.apache.bookkeeper.stats</groupId>
<version>4.16.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.apache.bookkeeper.stats</groupId>
<artifactId>prometheus-metrics-provider</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion stats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper</artifactId>
<version>4.16.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<packaging>pom</packaging>
<groupId>org.apache.bookkeeper.stats</groupId>
<artifactId>bookkeeper-stats-parent</artifactId>
<name>Apache BookKeeper :: Stats :: Parent</name>

<modules>
<module>bookkeeper-stats-api</module>
<module>bookkeeper-stats-providers</module>
<module>utils</module>
</modules>

Expand Down
2 changes: 1 addition & 1 deletion stats/utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ description = 'Apache BookKeeper :: Stats :: Utils'

dependencies {

implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')

compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
Expand Down
1 change: 0 additions & 1 deletion stats/utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<artifactId>bookkeeper-stats-parent</artifactId>
<groupId>org.apache.bookkeeper.stats</groupId>
<version>4.16.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.apache.bookkeeper.stats</groupId>
<artifactId>bookkeeper-stats-utils</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion stream/bk-grpc-name-resolver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
dependencies {
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stream:common')
implementation depLibs.grpc
implementation depLibs.guava
Expand Down
2 changes: 1 addition & 1 deletion stream/clients/java/base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stream:common')
implementation project(':stream:proto')

Expand Down
2 changes: 1 addition & 1 deletion stream/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {

dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation depLibs.grpc
runtimeOnly depLibs.googleHTTPClient
implementation depLibs.guava
Expand Down
2 changes: 1 addition & 1 deletion stream/distributedlog/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
compileOnly depLibs.lombok

implementation project(":bookkeeper-common")
implementation project(":bookkeeper-stats")
implementation project(":stats:bookkeeper-stats-api")

implementation depLibs.commonsConfiguration
implementation depLibs.commonsLang3
Expand Down
2 changes: 1 addition & 1 deletion stream/distributedlog/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stream:distributedlog:common')
implementation project(':stream:distributedlog:protocol')
implementation depLibs.commonsCli
Expand Down
4 changes: 2 additions & 2 deletions stream/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation project(':bookkeeper-common-allocator')
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stream:clients:java:all')
implementation project(':stream:clients:java:base')
implementation project(':stream:common')
Expand All @@ -43,7 +43,7 @@ dependencies {
implementation project(':stream:storage:api')
implementation project(':stream:storage:impl')

implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':stats:bookkeeper-stats-providers:prometheus-metrics-provider')
runtimeOnly project(':bookkeeper-tools-ledger')
runtimeOnly project(':bookkeeper-tools-stream')
runtimeOnly project(':bookkeeper-http:vertx-http-server')
Expand Down
2 changes: 1 addition & 1 deletion stream/storage/impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stream:api')
implementation project(':stream:clients:java:base')
implementation project(':stream:common')
Expand Down
2 changes: 1 addition & 1 deletion tests/backward-compat/recovery-no-password/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
testImplementation project(":bookkeeper-server")
testImplementation project(":bookkeeper-common")
testImplementation project(":bookkeeper-common-allocator")
testImplementation project(":bookkeeper-stats")
testImplementation project(":stats:bookkeeper-stats-api")
testImplementation depLibs.protobuf
testImplementation project(":bookkeeper-proto")
testImplementation depLibs.commonsConfiguration
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
testImplementation project(':stream:clients:java:base')
testImplementation project(':stream:clients:java:all')
testImplementation project(':bookkeeper-server')
testImplementation project(':bookkeeper-stats')
testImplementation project(':stats:bookkeeper-stats-api')
testImplementation project(':tests:integration-tests-topologies')
testImplementation project(':stream:clients:java:kv')
testImplementation project(':testtools')
Expand Down
2 changes: 1 addition & 1 deletion tools/ledger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies {
implementation depLibs.nettyCodecHTTP2
implementation depLibs.nettyCodecHTTP
implementation depLibs.nettyProxy
testImplementation project(":bookkeeper-stats")
testImplementation project(":stats:bookkeeper-stats-api")
testImplementation project(':testtools')
testCompileOnly depLibs.lombok
testImplementation depLibs.junit
Expand Down
6 changes: 3 additions & 3 deletions tools/perf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ plugins {
dependencies {

implementation project(":bookkeeper-common")
implementation project(':bookkeeper-common-allocator')
implementation project(':bookkeeper-tools-framework')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats')
implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-common-allocator')
implementation project(':stats:bookkeeper-stats-api')
implementation project(':stats:bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':stream:api')
implementation project(':stream:common')
implementation project(':stream:clients:java:base')
Expand Down

0 comments on commit 80ca1f8

Please sign in to comment.