提交 322f3af9 编写于 作者: S Sijie Guo 提交者: Sijie Guo

Fix serviceUrl for functions cli (#267)

* Use `distributedlog-core-shaded` in pulsar worker

* revert to db ledger storage

* Include netty-all

* Fix serviceUrl for functions cli
上级 6652c5ac
......@@ -445,7 +445,7 @@ public class CmdFunctions extends CmdBase {
throw new RuntimeException("Missing arguments");
}
String serviceUrl = admin.getServiceUrl().toString();
String serviceUrl = ((PulsarFunctionsAdmin) admin).getClientConf().getConfigurationData().getServiceUrl();
if (brokerServiceUrl != null) {
serviceUrl = brokerServiceUrl;
}
......
......@@ -20,6 +20,7 @@ package org.apache.pulsar.admin.cli;
import java.net.URL;
import java.util.function.BiFunction;
import org.apache.commons.lang3.StringUtils;
import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.client.admin.PulsarFunctionsAdmin;
......@@ -36,6 +37,11 @@ public class FunctionsTool extends PulsarAdminTool {
FunctionsTool(Properties properties) throws Exception {
super(properties);
commandMap.put("functions", CmdFunctions.class);
// in pulsar functions tool, webServiceUrl points to functions rest endpoint,
// which can not be used for constructing pulsar client. we have to use
// `serviceUrl` defined in the properties file.
config.setServiceUrl(properties.getProperty("serviceUrl"));
}
public static void main(String[] args) throws Exception {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册