Take the ServiceDataSource as an arg. In the above case, if someone intializes a hub without any service, then we end up getting everything from the respective datasource and there is no way for someone to init an empty hub.
While it may be reasonable to expect people to init a hub with services, in theory it may make sense to take in a serviceDataSource as the arg and default to the respective dataSource (http or zk) if service data source is null, in the case of an empty hub, then the clients can do a
new StaticDataSource(Set.of()) and the hub won't still scan the entire client's datasource.
Instead of taking the Collection in the AbstractRangerHubClient and building the serviceDataSource as follows.
Take the ServiceDataSource as an arg. In the above case, if someone intializes a hub without any service, then we end up getting everything from the respective datasource and there is no way for someone to init an empty hub.
While it may be reasonable to expect people to init a hub with services, in theory it may make sense to take in a serviceDataSource as the arg and default to the respective dataSource (http or zk) if service data source is null, in the case of an empty hub, then the clients can do a
new StaticDataSource(Set.of())
and the hub won't still scan the entire client's datasource.@santanusinha : FYI if this makes sense?