pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rdhabalia commented on a change in pull request #2114: Submit and run locally builtin connectors
Date Tue, 10 Jul 2018 18:35:49 GMT
rdhabalia commented on a change in pull request #2114: Submit and run locally builtin connectors
URL: https://github.com/apache/incubator-pulsar/pull/2114#discussion_r201450329
 
 

 ##########
 File path: pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java
 ##########
 @@ -368,16 +419,23 @@ protected FunctionDetails createSinkConfig(SinkConfig sinkConfig) throws
IOExcep
             // check if configs are valid
             validateSinkConfigs(sinkConfig);
 
-            String sinkClassName = ConnectorUtils.getIOSinkClass(sinkConfig.getArchive());
+            String sinkClassName = null;
+            String typeArg = null;
+
+            FunctionDetails.Builder functionDetailsBuilder = FunctionDetails.newBuilder();
+
+            boolean isBuiltin = sinkConfig.getArchive().startsWith(Utils.BUILTIN);
 
-            String typeArg;
-            try (NarClassLoader ncl = NarClassLoader.getFromArchive(new File(sinkConfig.getArchive()),
-                    Collections.emptySet())) {
-                typeArg = sinkConfig.getArchive().startsWith(Utils.FILE) ? null
-                        : Utils.getSinkType(sinkClassName, ncl).getName();
+            if (!isBuiltin) {
+                sinkClassName = ConnectorUtils.getIOSinkClass(sinkConfig.getArchive());
+
+                try (NarClassLoader ncl = NarClassLoader.getFromArchive(new File(sinkConfig.getArchive()),
 
 Review comment:
   at line #434, if archive is "file" url then we don't need to access nar at line#432. so,
should this line come after line#434?
   
   also here, we are assuming that archive packaging will be always `file://` or nar for connector.
so, should we document it at `--archive option`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message