Skip to content

Commit

Permalink
More instances of scala/scala3#13572
Browse files Browse the repository at this point in the history
  • Loading branch information
jlprat committed Sep 21, 2021
1 parent 2cf0742 commit ccacb53
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 19 deletions.
1 change: 0 additions & 1 deletion core/src/test/java/kafka/testkit/KafkaClusterTestKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import kafka.server.KafkaConfig$;
import kafka.server.KafkaRaftServer;
import kafka.server.MetaProperties;
import kafka.server.Server;
import kafka.server.Server$;
import kafka.tools.StorageTool;
import kafka.utils.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.kafka.jmh.fetcher;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.cluster.BrokerEndPoint;
import kafka.cluster.DelayedOperations;
Expand Down Expand Up @@ -144,7 +143,7 @@ public void setup() throws IOException {
setFlushStartOffsetCheckpointMs(10000L).
setRetentionCheckMs(1000L).
setMaxPidExpirationMs(60000).
setInterBrokerProtocolVersion(ApiVersion.latestVersion()).
setInterBrokerProtocolVersion(ApiVersion$.MODULE$.latestVersion()).
setScheduler(scheduler).
setBrokerTopicStats(brokerTopicStats).
setLogDirFailureChannel(logDirFailureChannel).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import kafka.server.KafkaApis;
import kafka.server.KafkaConfig;
import kafka.server.KafkaConfig$;
import kafka.server.MetadataCache;
import kafka.server.MetadataCache$;
import kafka.server.ZkMetadataCache;
import kafka.server.QuotaFactory;
import kafka.server.ReplicaManager;
Expand Down Expand Up @@ -108,7 +108,7 @@ public class MetadataRequestBenchmark {
private KafkaZkClient kafkaZkClient = Mockito.mock(KafkaZkClient.class);
private Metrics metrics = new Metrics();
private int brokerId = 1;
private ZkMetadataCache metadataCache = MetadataCache.zkMetadataCache(brokerId);
private ZkMetadataCache metadataCache = MetadataCache$.MODULE$.zkMetadataCache(brokerId);
private ClientQuotaManager clientQuotaManager = Mockito.mock(ClientQuotaManager.class);
private ClientRequestQuotaManager clientRequestQuotaManager = Mockito.mock(ClientRequestQuotaManager.class);
private ControllerMutationQuotaManager controllerMutationQuotaManager = Mockito.mock(ControllerMutationQuotaManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.kafka.jmh.partition;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.cluster.DelayedOperations;
import kafka.cluster.IsrChangeListener;
Expand Down Expand Up @@ -111,7 +110,7 @@ public void setup() throws IOException {
setFlushStartOffsetCheckpointMs(10000L).
setRetentionCheckMs(1000L).
setMaxPidExpirationMs(60000).
setInterBrokerProtocolVersion(ApiVersion.latestVersion()).
setInterBrokerProtocolVersion(ApiVersion$.MODULE$.latestVersion()).
setScheduler(scheduler).
setBrokerTopicStats(brokerTopicStats).
setLogDirFailureChannel(logDirFailureChannel).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.kafka.jmh.partition;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.cluster.DelayedOperations;
import kafka.cluster.IsrChangeListener;
Expand Down Expand Up @@ -97,7 +96,7 @@ public void setUp() {
setFlushStartOffsetCheckpointMs(10000L).
setRetentionCheckMs(1000L).
setMaxPidExpirationMs(60000).
setInterBrokerProtocolVersion(ApiVersion.latestVersion()).
setInterBrokerProtocolVersion(ApiVersion$.MODULE$.latestVersion()).
setScheduler(scheduler).
setBrokerTopicStats(brokerTopicStats).
setLogDirFailureChannel(logDirFailureChannel).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
package org.apache.kafka.jmh.record;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.common.LongRef;
import kafka.log.AppendOrigin;
import kafka.log.LogValidator;
import kafka.message.CompressionCodec;
import kafka.message.CompressionCodec$;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.record.CompressionType;
import org.apache.kafka.common.record.MemoryRecords;
Expand Down Expand Up @@ -54,11 +54,11 @@ public void measureValidateMessagesAndAssignOffsetsCompressed(Blackhole bh) {
MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
LogValidator.validateMessagesAndAssignOffsetsCompressed(records, new TopicPartition("a", 0),
new LongRef(startingOffset), Time.SYSTEM, System.currentTimeMillis(),
CompressionCodec.getCompressionCodec(compressionType.id),
CompressionCodec.getCompressionCodec(compressionType.id),
CompressionCodec$.MODULE$.getCompressionCodec(compressionType.id),
CompressionCodec$.MODULE$.getCompressionCodec(compressionType.id),
false, messageVersion, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0,
new AppendOrigin.Client$(),
ApiVersion.latestVersion(),
ApiVersion$.MODULE$.latestVersion(),
brokerTopicStats,
requestLocal);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.apache.kafka.jmh.server;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.cluster.Partition;
import kafka.log.CleanerConfig;
import kafka.log.LogConfig;
Expand All @@ -26,6 +26,7 @@
import kafka.server.KafkaConfig;
import kafka.server.LogDirFailureChannel;
import kafka.server.MetadataCache;
import kafka.server.MetadataCache$;
import kafka.server.QuotaFactory;
import kafka.server.ReplicaManager;
import kafka.server.builders.ReplicaManagerBuilder;
Expand Down Expand Up @@ -107,11 +108,11 @@ public void setup() {
this.logManager = TestUtils.createLogManager(JavaConverters.asScalaBuffer(files),
LogConfig.apply(), new MockConfigRepository(), CleanerConfig.apply(1, 4 * 1024 * 1024L, 0.9d,
1024 * 1024, 32 * 1024 * 1024,
Double.MAX_VALUE, 15 * 1000, true, "MD5"), time, ApiVersion.latestVersion());
Double.MAX_VALUE, 15 * 1000, true, "MD5"), time, ApiVersion$.MODULE$.latestVersion());
scheduler.startup();
final BrokerTopicStats brokerTopicStats = new BrokerTopicStats();
final MetadataCache metadataCache =
MetadataCache.zkMetadataCache(this.brokerProperties.brokerId());
MetadataCache$.MODULE$.zkMetadataCache(this.brokerProperties.brokerId());
this.quotaManagers =
QuotaFactory.instantiate(this.brokerProperties,
this.metrics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.apache.kafka.jmh.server;

import kafka.api.ApiVersion;
import kafka.api.ApiVersion$;
import kafka.cluster.Partition;
import kafka.log.CleanerConfig;
import kafka.log.Defaults;
Expand Down Expand Up @@ -134,7 +134,7 @@ public void setup() {
setFlushStartOffsetCheckpointMs(10000L).
setRetentionCheckMs(1000L).
setMaxPidExpirationMs(60000).
setInterBrokerProtocolVersion(ApiVersion.latestVersion()).
setInterBrokerProtocolVersion(ApiVersion$.MODULE$.latestVersion()).
setScheduler(scheduler).
setBrokerTopicStats(brokerTopicStats).
setLogDirFailureChannel(failureChannel).
Expand Down

0 comments on commit ccacb53

Please sign in to comment.