Skip to content

Commit afb1802

Browse files
deps: make dropwizard metrics an optional dependency (#4224)
Change-Id: I708bc5dcb432f3516787d23cb7d769c8a1c678ab
1 parent 4064af8 commit afb1802

File tree

9 files changed

+13
-68
lines changed
  • bigtable-hbase-1.x-parent
  • bigtable-hbase-2.x-parent
  • hbase-migration-tools/mirroring-client/bigtable-hbase-mirroring-client-2.x-parent
    • bigtable-hbase-mirroring-client-1.x-2.x-integration-tests
    • bigtable-hbase-mirroring-client-2.x-integration-tests

9 files changed

+13
-68
lines changed

bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,6 @@ limitations under the License.
9191
<version>${reload4j.version}</version>
9292
<scope>runtime</scope>
9393
</dependency>
94-
<dependency>
95-
<groupId>io.dropwizard.metrics</groupId>
96-
<artifactId>metrics-core</artifactId>
97-
<version>${hbase1-metrics.version}</version>
98-
<exclusions>
99-
<!-- see slf4j notes below -->
100-
<exclusion>
101-
<groupId>org.slf4j</groupId>
102-
<artifactId>slf4j-api</artifactId>
103-
</exclusion>
104-
</exclusions>
105-
</dependency>
10694

10795
<!-- unlike hbase-shaded-client, hbase-client depends on slf4j 1.6.1.
10896
Which is older than the version requested by metrics-core. However,

bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,7 @@ limitations under the License.
191191
<artifactId>commons-logging</artifactId>
192192
<version>${commons-logging.version}</version>
193193
</dependency>
194-
<dependency>
195-
<groupId>io.dropwizard.metrics</groupId>
196-
<artifactId>metrics-core</artifactId>
197-
<version>${hbase1-metrics.version}</version>
198-
</dependency>
194+
199195
<!--needs to be declared as a dependency to be excluded from shading-->
200196
<dependency>
201197
<groupId>com.google.code.findbugs</groupId>
@@ -220,7 +216,7 @@ limitations under the License.
220216
<configuration>
221217
<excludedScopes>test,provided,system</excludedScopes>
222218
<!-- Should mirror the shade plugin exclusions-->
223-
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core|findbugs-annotations|htrace-core4|jsr305</excludedArtifacts>
219+
<excludedArtifacts>commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core|findbugs-annotations|htrace-core4|jsr305</excludedArtifacts>
224220
<excludedGroups>javax.annotation|org.checkerframework</excludedGroups>
225221
<generateBundle>true</generateBundle>
226222
</configuration>
@@ -268,7 +264,6 @@ limitations under the License.
268264
<artifactSet>
269265
<excludes>
270266
<!-- exclude user visible deps -->
271-
<exclude>io.dropwizard.metrics:metrics-core</exclude>
272267
<exclude>commons-logging:commons-logging</exclude>
273268
<exclude>ch.qos.reload4j:reload4j</exclude>
274269
<!-- exclude hbase-shaded-client & all of its dependencies -->

bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ limitations under the License.
100100
<groupId>com.google.guava</groupId>
101101
<artifactId>guava</artifactId>
102102
</dependency>
103-
<dependency>
104-
<groupId>io.dropwizard.metrics</groupId>
105-
<artifactId>metrics-core</artifactId>
106-
<version>${hbase1-metrics.version}</version>
107-
</dependency>
108103

109104
<!-- deps for metrics instrumentation, these should be removed once we expose more hooks in veneer metrics -->
110105
<dependency>
@@ -178,6 +173,12 @@ limitations under the License.
178173
<version>2.12.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
179174
<scope>test</scope>
180175
</dependency>
176+
<dependency>
177+
<groupId>io.dropwizard.metrics</groupId>
178+
<artifactId>metrics-graphite</artifactId>
179+
<version>${dropwizard-metrics.version}</version>
180+
<scope>test</scope>
181+
</dependency>
181182
<dependency>
182183
<groupId>com.google.truth</groupId>
183184
<artifactId>truth</artifactId>
@@ -193,7 +194,7 @@ limitations under the License.
193194
<dependency>
194195
<groupId>io.dropwizard.metrics</groupId>
195196
<artifactId>metrics-graphite</artifactId>
196-
<version>${hbase1-metrics.version}</version>
197+
<version>${dropwizard-metrics.version}</version>
197198
<scope>test</scope>
198199
</dependency>
199200
<dependency>

bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@ limitations under the License.
8484
<artifactId>commons-logging</artifactId>
8585
<version>${commons-logging.version}</version>
8686
</dependency>
87-
<dependency>
88-
<groupId>io.dropwizard.metrics</groupId>
89-
<artifactId>metrics-core</artifactId>
90-
<version>${hbase2-metrics.version}</version>
91-
<exclusions>
92-
<!-- see slf4j notes below -->
93-
<exclusion>
94-
<groupId>org.slf4j</groupId>
95-
<artifactId>slf4j-api</artifactId>
96-
</exclusion>
97-
</exclusions>
98-
</dependency>
9987

10088
<!-- unlike hbase-shaded-client, hbase-client depends on slf4j 1.6.1.
10189
Which is older than the version requested by metrics-core. However,

bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,6 @@ limitations under the License.
174174
<artifactId>commons-logging</artifactId>
175175
<version>${commons-logging.version}</version>
176176
</dependency>
177-
<dependency>
178-
<groupId>io.dropwizard.metrics</groupId>
179-
<artifactId>metrics-core</artifactId>
180-
<version>${hbase2-metrics.version}</version>
181-
</dependency>
182177

183178
<!-- needs to be declared as a dependency to be excluded from shading-->
184179
<dependency>
@@ -204,7 +199,7 @@ limitations under the License.
204199
<configuration>
205200
<excludedScopes>test,provided,system</excludedScopes>
206201
<!--Should match the exclusions of shade plugin-->
207-
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core4|audience-annotations|findbugs-annotations|jsr305</excludedArtifacts>
202+
<excludedArtifacts>commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core4|audience-annotations|findbugs-annotations|jsr305</excludedArtifacts>
208203
<excludedGroups>javax.annotation|org.checkerframework</excludedGroups>
209204
<generateBundle>true</generateBundle>
210205
</configuration>
@@ -252,7 +247,6 @@ limitations under the License.
252247
<artifactSet>
253248
<excludes>
254249
<!-- exclude user visible deps -->
255-
<exclude>io.dropwizard.metrics:metrics-core</exclude>
256250
<exclude>commons-logging:commons-logging</exclude>
257251
<!-- exclude hbase-shaded-client & all of its dependencies -->
258252
<exclude>org.apache.hbase:hbase-shaded-client</exclude>

bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ limitations under the License.
147147
<groupId>io.opencensus</groupId>
148148
<artifactId>opencensus-api</artifactId>
149149
</dependency>
150-
<dependency>
151-
<groupId>io.dropwizard.metrics</groupId>
152-
<artifactId>metrics-core</artifactId>
153-
<version>${hbase2-metrics.version}</version>
154-
</dependency>
155150
<dependency>
156151
<groupId>org.threeten</groupId>
157152
<artifactId>threetenbp</artifactId>
@@ -170,7 +165,7 @@ limitations under the License.
170165
<dependency>
171166
<groupId>io.dropwizard.metrics</groupId>
172167
<artifactId>metrics-graphite</artifactId>
173-
<version>${hbase2-metrics.version}</version>
168+
<version>${dropwizard-metrics.version}</version>
174169
<scope>test</scope>
175170
</dependency>
176171

hbase-migration-tools/mirroring-client/bigtable-hbase-mirroring-client-2.x-parent/bigtable-hbase-mirroring-client-1.x-2.x-integration-tests/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,6 @@ limitations under the License.
334334
<version>1.7.30</version>
335335
<scope>test</scope>
336336
</dependency>
337-
338-
<!-- Pinned to prevent Enforcer errors -->
339-
<dependency>
340-
<groupId>io.dropwizard.metrics</groupId>
341-
<artifactId>metrics-core</artifactId>
342-
<version>3.2.6</version>
343-
<scope>test</scope>
344-
</dependency>
345337
</dependencies>
346338

347339
<build>

hbase-migration-tools/mirroring-client/bigtable-hbase-mirroring-client-2.x-parent/bigtable-hbase-mirroring-client-2.x-integration-tests/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,6 @@ limitations under the License.
345345
<version>1.7.30</version>
346346
<scope>test</scope>
347347
</dependency>
348-
349-
<!-- Pinned to prevent Enforcer errors -->
350-
<dependency>
351-
<groupId>io.dropwizard.metrics</groupId>
352-
<artifactId>metrics-core</artifactId>
353-
<version>3.2.6</version>
354-
<scope>test</scope>
355-
</dependency>
356348
</dependencies>
357349

358350
<build>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ limitations under the License.
5959
<bigtable.version>2.28.0</bigtable.version>
6060
<google-cloud-bigtable-emulator.version>0.165.0</google-cloud-bigtable-emulator.version>
6161
<bigtable-metrics-api.version>1.29.2</bigtable-metrics-api.version>
62+
<!-- Optional dep for bigtable-metrics-api used for tests -->
63+
<dropwizard-metrics.version>4.2.21</dropwizard-metrics.version>
6264

6365
<!-- keeping at this version to align with hbase-->
6466
<slf4j.version>1.7.25</slf4j.version>
@@ -68,9 +70,7 @@ limitations under the License.
6870

6971
<!-- hbase dependency versions -->
7072
<hbase1.version>1.7.2</hbase1.version>
71-
<hbase1-metrics.version>3.1.2</hbase1-metrics.version>
7273
<hbase2.version>2.3.6</hbase2.version>
73-
<hbase2-metrics.version>3.2.6</hbase2-metrics.version>
7474

7575
<!-- bytebuddy dependency version for resolving hbase backward incompatible changes -->
7676
<byte.buddy.version>1.14.2</byte.buddy.version>

0 commit comments

Comments
 (0)