You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/03/04 17:40:08 UTC

[GitHub] merlimat commented on a change in pull request #1325: Rename pulsar function api from V1 to V2

merlimat commented on a change in pull request #1325: Rename pulsar function api from V1 to V2
URL: https://github.com/apache/incubator-pulsar/pull/1325#discussion_r172057211
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/WorkerServer.java
 ##########
 @@ -49,7 +55,17 @@ public WorkerServer(WorkerService workerService) {
     @Override
     public void run() {
         final Server server = new Server(this.workerConfig.getWorkerPort());
-        server.setHandler(WorkerService.newServletContextHandler("/", workerService));
+
+        List<Handler> handlers = new ArrayList<>(2);
+        handlers.add(WorkerService.newServletContextHandler("/admin", workerService));
+        handlers.add(WorkerService.newServletContextHandler("/admin/v2", workerService));
 
 Review comment:
   We shouldn't need to have 2 aliases for same API. Either have `/admin/v2/functions` or `/admin/functions`. I suggest the 1st one for consistency with `/admin/v2/namespaces/`.. 

----------------------------------------------------------------
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