|
26 | 26 | import org.apache.kafka.common.Uuid;
|
27 | 27 | import org.apache.kafka.common.compress.Compression;
|
28 | 28 | import org.apache.kafka.common.errors.ReplicaNotAvailableException;
|
| 29 | +import org.apache.kafka.common.internals.Plugin; |
29 | 30 | import org.apache.kafka.common.metrics.KafkaMetric;
|
30 | 31 | import org.apache.kafka.common.metrics.Metrics;
|
31 | 32 | import org.apache.kafka.common.record.FileRecords;
|
@@ -245,11 +246,11 @@ void setUp() throws Exception {
|
245 | 246 | tp -> Optional.of(mockLog),
|
246 | 247 | (topicPartition, offset) -> currentLogStartOffset.set(offset),
|
247 | 248 | brokerTopicStats, metrics) {
|
248 |
| - public RemoteStorageManager createRemoteStorageManager() { |
249 |
| - return remoteStorageManager; |
| 249 | + public Plugin<RemoteStorageManager> createRemoteStorageManagerPlugin(Metrics metrics) { |
| 250 | + return Plugin.wrapInstance(remoteStorageManager, metrics, "mockRemoteStorageManager"); |
250 | 251 | }
|
251 |
| - public RemoteLogMetadataManager createRemoteLogMetadataManager() { |
252 |
| - return remoteLogMetadataManager; |
| 252 | + public Plugin<RemoteLogMetadataManager> createRemoteLogMetadataManagerPlugin(Metrics metrics) { |
| 253 | + return Plugin.wrapInstance(remoteLogMetadataManager, metrics, "mockRemoteStorageManager"); |
253 | 254 | }
|
254 | 255 | public RLMQuotaManager createRLMCopyQuotaManager() {
|
255 | 256 | return rlmCopyQuotaManager;
|
@@ -1752,8 +1753,8 @@ void testFetchOffsetByTimestampWithTieredStorageDoesNotFetchIndexWhenExistsLocal
|
1752 | 1753 | (topicPartition, offset) -> currentLogStartOffset.set(offset),
|
1753 | 1754 | brokerTopicStats, metrics) {
|
1754 | 1755 | @Override
|
1755 |
| - public RemoteLogMetadataManager createRemoteLogMetadataManager() { |
1756 |
| - return remoteLogMetadataManager; |
| 1756 | + public Plugin<RemoteLogMetadataManager> createRemoteLogMetadataManagerPlugin(Metrics metrics) { |
| 1757 | + return Plugin.wrapInstance(remoteLogMetadataManager, metrics, "mockRemoteLogMetadataManager"); |
1757 | 1758 | }
|
1758 | 1759 | @Override
|
1759 | 1760 | Optional<FileRecords.TimestampAndOffset> lookupTimestamp(RemoteLogSegmentMetadata rlsMetadata, long timestamp, long startingOffset) {
|
|
0 commit comments