You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by je...@apache.org on 2021/07/19 18:29:39 UTC

[pulsar] branch jerrypeng-patch-1 created (now 4a085ec)

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

jerrypeng pushed a change to branch jerrypeng-patch-1
in repository https://gitbox.apache.org/repos/asf/pulsar.git.


      at 4a085ec  Fix bug when check batch source config

This branch includes the following new commits:

     new 4a085ec  Fix bug when check batch source config

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[pulsar] 01/01: Fix bug when check batch source config

Posted by je...@apache.org.
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 <je...@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 {