This is an automated email from the ASF dual-hosted git repository. jerrypeng pushed a commit to branch jerrypeng-patch-1 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 4a085ec4cb4c5dc3304a7b134135f1c1542a1a42 Author: Boyang Jerry Peng <jerry.boyang.p...@gmail.com> AuthorDate: Mon Jul 19 11:28:58 2021 -0700 Fix bug when check batch source config --- .../java/org/apache/pulsar/admin/cli/CmdSources.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java index 337847e..9b7a206 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java @@ -477,25 +477,6 @@ public class CmdSources extends CmdBase { if (isBlank(batchSourceConfig.getDiscoveryTriggererClassName())) { throw new IllegalArgumentException("Discovery Triggerer not specified"); } - - boolean isBatchSourceTriggerer = false; - - try { - Class<?>[] interfaces = Class.forName(batchSourceConfig.getDiscoveryTriggererClassName()).getInterfaces(); - int idx = 0; - - while (idx < interfaces.length && !isBatchSourceTriggerer) { - isBatchSourceTriggerer = interfaces[idx++].getName().equals("org.apache.pulsar.io.core.BatchSourceTriggerer"); - } - - if (!isBatchSourceTriggerer) { - throw new IllegalArgumentException("Invalid Discovery Triggerer specified"); - } - - } catch (ClassNotFoundException e) { - throw new IllegalArgumentException("Invalid Discovery Triggerer specified"); - } - } protected String validateSourceType(String sourceType) throws IOException {