Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sijie
Copy link
Member

@sijie 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
@sijie sijie self-assigned this Mar 4, 2018
@sijie sijie requested a review from merlimat March 4, 2018 10:47
@sijie
Copy link
Member Author

sijie commented Mar 4, 2018

/cc @srkukarni @jerrypeng

@sijie
Copy link
Member Author

sijie commented Mar 4, 2018

This addresses an comment at #1314


List<Handler> handlers = new ArrayList<>(2);
handlers.add(WorkerService.newServletContextHandler("/admin", workerService));
handlers.add(WorkerService.newServletContextHandler("/admin/v2", workerService));
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@merlimat :

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?

Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

@merlimat merlimat added this to the 2.0.0-incubating milestone Mar 4, 2018
@merlimat merlimat merged commit fb97446 into apache:master Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants