You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/02/18 09:18:27 UTC

[flink] branch master updated: [FLINK-26192][pulsar] Remove call to Runtime#halt

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new b3cdfda  [FLINK-26192][pulsar] Remove call to Runtime#halt
b3cdfda is described below

commit b3cdfda518c023b92893bc522853adfc0275af9e
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Feb 17 10:04:03 2022 +0100

    [FLINK-26192][pulsar] Remove call to Runtime#halt
---
 .../testutils/runtime/embedded/PulsarEmbeddedRuntime.java   | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/testutils/runtime/embedded/PulsarEmbeddedRuntime.java b/flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/testutils/runtime/embedded/PulsarEmbeddedRuntime.java
index d598e97..cf080b8 100644
--- a/flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/testutils/runtime/embedded/PulsarEmbeddedRuntime.java
+++ b/flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/testutils/runtime/embedded/PulsarEmbeddedRuntime.java
@@ -23,7 +23,6 @@ import org.apache.flink.connector.pulsar.testutils.runtime.PulsarRuntimeOperator
 import org.apache.flink.util.FileUtils;
 
 import org.apache.bookkeeper.conf.ServerConfiguration;
-import org.apache.logging.log4j.LogManager;
 import org.apache.pulsar.broker.PulsarService;
 import org.apache.pulsar.broker.ServiceConfiguration;
 import org.apache.pulsar.client.admin.PulsarAdmin;
@@ -33,7 +32,6 @@ import org.apache.pulsar.common.naming.TopicName;
 import org.apache.pulsar.common.policies.data.ClusterData;
 import org.apache.pulsar.common.policies.data.TenantInfo;
 import org.apache.pulsar.common.policies.data.TenantInfoImpl;
-import org.apache.pulsar.functions.worker.WorkerConfig;
 import org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -171,16 +169,7 @@ public class PulsarEmbeddedRuntime implements PulsarRuntime {
         config.setConfigurationStoreServers(zkConnect);
         config.setRunningStandalone(true);
 
-        this.pulsarService =
-                new PulsarService(
-                        config,
-                        new WorkerConfig(),
-                        Optional.empty(),
-                        (exitCode) -> {
-                            LOG.info("Halting standalone process with code {}", exitCode);
-                            LogManager.shutdown();
-                            Runtime.getRuntime().halt(exitCode);
-                        });
+        this.pulsarService = new PulsarService(config);
 
         // Start Pulsar Broker.
         pulsarService.start();