diff --git a/ksqldb-engine/src/test/java/io/confluent/ksql/internal/StorageUtilizationMetricsReporterTest.java b/ksqldb-engine/src/test/java/io/confluent/ksql/internal/StorageUtilizationMetricsReporterTest.java index f0596f2e5744..9299654eea67 100644 --- a/ksqldb-engine/src/test/java/io/confluent/ksql/internal/StorageUtilizationMetricsReporterTest.java +++ b/ksqldb-engine/src/test/java/io/confluent/ksql/internal/StorageUtilizationMetricsReporterTest.java @@ -57,10 +57,10 @@ public void setUp() throws IOException { a -> new MetricName(a.getArgument(0), a.getArgument(1), "", a.getArgument(2))); when(metrics.metricName(any(), any())).thenAnswer( a -> new MetricName(a.getArgument(0), a.getArgument(1), "", Collections.emptyMap())); - final File f = new File("/tmp/cat/"); + final File f = new File("/tmp/storage-test/"); f.getParentFile().mkdirs(); f.createNewFile(); - listener.configure(ImmutableMap.of("state.dir", "/tmp/cat/")); + listener.configure(ImmutableMap.of("state.dir", "/tmp/storage-test/")); } @After @@ -95,7 +95,7 @@ public void shouldOnlyAddNodeMetricsOnce() { // Given: // When: - listener.configure(ImmutableMap.of("state.dir", "/tmp/cat/")); + listener.configure(ImmutableMap.of("state.dir", "/tmp//")); // Then: // did not throw error for duplicate metrics diff --git a/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestApplication.java b/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestApplication.java index b4bf3f125c8d..14b82dc170a1 100644 --- a/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestApplication.java +++ b/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestApplication.java @@ -125,7 +125,6 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -135,7 +134,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -702,12 +700,6 @@ static KsqlRestApplication buildApplication( final SpecificQueryIdGenerator specificQueryIdGenerator = new SpecificQueryIdGenerator(); - final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1, - new ThreadFactoryBuilder() - .setNameFormat("ksql-csu-metrics-reporter-%d") - .build() - ); - final KsqlEngine ksqlEngine = new KsqlEngine( serviceContext, processingLogContext, @@ -715,7 +707,7 @@ static KsqlRestApplication buildApplication( ServiceInfo.create(ksqlConfig, metricsPrefix), specificQueryIdGenerator, new KsqlConfig(restConfig.getKsqlConfigProperties()), - new ArrayList<>() + Collections.emptyList() ); UserFunctionLoader.newInstance(ksqlConfig, functionRegistry, ksqlInstallDir).load();