-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Rename pulsar function api from V1 to V2 #1325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sijie
commented
Mar 4, 2018
- rename the V1 to V2
- change the way how the rest api was organized to allow it merged back to pulsar webservice and cli
- rename the V1 to V2 - change the way how the rest api was organized to allow it merged back to pulsar webservice and cli
/cc @srkukarni @jerrypeng |
|
||
List<Handler> handlers = new ArrayList<>(2); | ||
handlers.add(WorkerService.newServletContextHandler("/admin", workerService)); | ||
handlers.add(WorkerService.newServletContextHandler("/admin/v2", workerService)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason I did this because current function tools extends pulsar admin, pulsar admin still uses v1 api not v2 api. so if I only added in /admin/v2/functions
, the functions cli will be broken. so I temporarily add it to both v1 and v2 endpoints. we should remove the v1 endpoint after switching pulsar-admin to use v2 endpoints (#1278).
does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulsar-admin client cannot completely switch to just use v2 endpoint. Old topics/namespaces will still be using the old endpoint. The Java client will need to be able to use or the other accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, so we need to keep this at both /admin
and /admin/v2
, no? that would simplify the pulsar-admin client, and when we cut over from v1 to v2, we don't need to change any server side, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no possible cutover from v1 to v2, old topics will stay in same format and we cannot remove in the forseable future.
new topics will use v2 api. functiions, being a new feature will always use v2 api.
It's fine for now, I will fix when I'll do the v1/v2 choice in client.