RE: [DISCUSS] PIP-277: Clusters list API return clusters with local flag
May I make a proposal : adding `remote` flag also? #Concern : It seems like we are sort of allowing users to assume what the ones without `local` flag are (are called by the community). #Possible Benfit : Users will benefit from not having to think about what ` non-local` clusters are called. # Use-case : when someone automates counting how many remotes and clusters are there in list via shell-script, or simple String parser where the user will benefit more when grouping by `local` vs `remote`, rather than `local` vs `“”`. # Original Github Comment : https://github.com/apache/pulsar/pull/20614#issuecomment-1599025705 On 2023/06/20 06:00:29 guo jiwei wrote: > Hi community: > After configuring the geo-replication on Pulsar clusters, the `clusters > list` API will return multiple clusters, including the local Pulsar cluster > and remote clusters like > > ``` > bin/pulsar-admin clusters list > us-west > us-east > us-cent > ``` > But in this return, you can't distinguish the local and the remote cluster. > When you need to remove the geo-replication configuration, it will be hard > to decide which cluster should be removed on replicated tenants and > namespaces unless you record the cluster information. > > > ### Modification > Add `local` flag to distinguish clusters > ``` > bin/pulsar-admin clusters list > us-west(local) > us-east > us-cent > ``` > > PIP: https://github.com/apache/pulsar/pull/20614 > > > Regards > Jiwei Guo (Tboy) >
Re: [DISCUSS] PIP-277: Clusters list API return clusters with local flag
Thanks. addressed in the PIP Regards Jiwei Guo (Tboy) On Sun, Jun 25, 2023 at 6:05 PM PengHui Li wrote: > Hi Jiwei, > > Do you need to change the REST API? or will it just apply to the Admin CLI? > If it requires REST API changes, you should also reflect them in the > proposal. > > And yes, using the local and remote will be confusing because users can > have > multiple clusters without geo-replication. Maybe we should use the > --current option > to show which cluster are requesting. So that we will not introduce any > break changes. > If we don't have compatibility issue, I don't like the --current option :) > > With the --current option: > > ``` > bin/pulsar-admin clusters list --current > > us-west(*) > us-east > us-cent > ``` > > It looks like (*) is commonly used, e.g. kubectl config get-contexts ... > > Regards, > Penghui > > On Sun, Jun 25, 2023 at 3:53 PM Zixuan Liu wrote: > > > +1, this is a good improvement. > > > > In the proposal, I don't suggest you append the `local` to the cluster > > name: > > > > 1. It will be confusing when the original cluster name includes the > > `local` name > > 2. In some cases, it is not easy to distinguish between local and > > remote clusters > > > > so I suggest we should add the `local` and `remote` flags like: > > > > ``` > > # list remote clusters > > bin/pulsar-admin clusters list --remote > > us-east > > us-cent > > > > # list local clustes > > bin/pulsar-admin clusters list --local > > us-west > > > > # list all clusters > > bin/pulsar-admin clusters list > > us-east > > us-cent > > us-west > > ``` > > > > Thanks, > > Zixuan > > > > guo jiwei 于2023年6月20日周二 14:00写道: > > > > > > Hi community: > > > After configuring the geo-replication on Pulsar clusters, the > > `clusters > > > list` API will return multiple clusters, including the local Pulsar > > cluster > > > and remote clusters like > > > > > > ``` > > > bin/pulsar-admin clusters list > > > us-west > > > us-east > > > us-cent > > > ``` > > > But in this return, you can't distinguish the local and the remote > > cluster. > > > When you need to remove the geo-replication configuration, it will be > > hard > > > to decide which cluster should be removed on replicated tenants and > > > namespaces unless you record the cluster information. > > > > > > > > > ### Modification > > > Add `local` flag to distinguish clusters > > > ``` > > > bin/pulsar-admin clusters list > > > us-west(local) > > > us-east > > > us-cent > > > ``` > > > > > > PIP: https://github.com/apache/pulsar/pull/20614 > > > > > > > > > Regards > > > Jiwei Guo (Tboy) > > >
Re: [DISCUSS] PIP-277: Clusters list API return clusters with local flag
Hi Jiwei, Do you need to change the REST API? or will it just apply to the Admin CLI? If it requires REST API changes, you should also reflect them in the proposal. And yes, using the local and remote will be confusing because users can have multiple clusters without geo-replication. Maybe we should use the --current option to show which cluster are requesting. So that we will not introduce any break changes. If we don't have compatibility issue, I don't like the --current option :) With the --current option: ``` bin/pulsar-admin clusters list --current us-west(*) us-east us-cent ``` It looks like (*) is commonly used, e.g. kubectl config get-contexts ... Regards, Penghui On Sun, Jun 25, 2023 at 3:53 PM Zixuan Liu wrote: > +1, this is a good improvement. > > In the proposal, I don't suggest you append the `local` to the cluster > name: > > 1. It will be confusing when the original cluster name includes the > `local` name > 2. In some cases, it is not easy to distinguish between local and > remote clusters > > so I suggest we should add the `local` and `remote` flags like: > > ``` > # list remote clusters > bin/pulsar-admin clusters list --remote > us-east > us-cent > > # list local clustes > bin/pulsar-admin clusters list --local > us-west > > # list all clusters > bin/pulsar-admin clusters list > us-east > us-cent > us-west > ``` > > Thanks, > Zixuan > > guo jiwei 于2023年6月20日周二 14:00写道: > > > > Hi community: > > After configuring the geo-replication on Pulsar clusters, the > `clusters > > list` API will return multiple clusters, including the local Pulsar > cluster > > and remote clusters like > > > > ``` > > bin/pulsar-admin clusters list > > us-west > > us-east > > us-cent > > ``` > > But in this return, you can't distinguish the local and the remote > cluster. > > When you need to remove the geo-replication configuration, it will be > hard > > to decide which cluster should be removed on replicated tenants and > > namespaces unless you record the cluster information. > > > > > > ### Modification > > Add `local` flag to distinguish clusters > > ``` > > bin/pulsar-admin clusters list > > us-west(local) > > us-east > > us-cent > > ``` > > > > PIP: https://github.com/apache/pulsar/pull/20614 > > > > > > Regards > > Jiwei Guo (Tboy) >
Re: [DISCUSS] PIP-277: Clusters list API return clusters with local flag
+1, this is a good improvement. In the proposal, I don't suggest you append the `local` to the cluster name: 1. It will be confusing when the original cluster name includes the `local` name 2. In some cases, it is not easy to distinguish between local and remote clusters so I suggest we should add the `local` and `remote` flags like: ``` # list remote clusters bin/pulsar-admin clusters list --remote us-east us-cent # list local clustes bin/pulsar-admin clusters list --local us-west # list all clusters bin/pulsar-admin clusters list us-east us-cent us-west ``` Thanks, Zixuan guo jiwei 于2023年6月20日周二 14:00写道: > > Hi community: > After configuring the geo-replication on Pulsar clusters, the `clusters > list` API will return multiple clusters, including the local Pulsar cluster > and remote clusters like > > ``` > bin/pulsar-admin clusters list > us-west > us-east > us-cent > ``` > But in this return, you can't distinguish the local and the remote cluster. > When you need to remove the geo-replication configuration, it will be hard > to decide which cluster should be removed on replicated tenants and > namespaces unless you record the cluster information. > > > ### Modification > Add `local` flag to distinguish clusters > ``` > bin/pulsar-admin clusters list > us-west(local) > us-east > us-cent > ``` > > PIP: https://github.com/apache/pulsar/pull/20614 > > > Regards > Jiwei Guo (Tboy)
RE: [DISCUSS] PIP-277: Clusters list API return clusters with local flag
May I make a proposal : adding `remote` flag also? #Concern : It seems like we are sort of allowing users to assume what the ones without `local` flag are (are called by the community). #Possible Benfit : Users will benefit from not having to think about what ` non-local` clusters are called. # Use-case : when someone automates counting how many remotes and clusters are there in list via shell-script, or simple String parser where the user will benefit more when grouping by `local` vs `remote`, rather than `local` vs `“”`. # Original Github Comment : https://github.com/apache/pulsar/pull/20614#issuecomment-1599025705 On 2023/06/20 06:00:29 guo jiwei wrote: > Hi community: > After configuring the geo-replication on Pulsar clusters, the `clusters > list` API will return multiple clusters, including the local Pulsar cluster > and remote clusters like > > ``` > bin/pulsar-admin clusters list > us-west > us-east > us-cent > ``` > But in this return, you can't distinguish the local and the remote cluster. > When you need to remove the geo-replication configuration, it will be hard > to decide which cluster should be removed on replicated tenants and > namespaces unless you record the cluster information. > > > ### Modification > Add `local` flag to distinguish clusters > ``` > bin/pulsar-admin clusters list > us-west(local) > us-east > us-cent > ``` > > PIP: https://github.com/apache/pulsar/pull/20614 > > > Regards > Jiwei Guo (Tboy) >
[DISCUSS] PIP-277: Clusters list API return clusters with local flag
Hi community: After configuring the geo-replication on Pulsar clusters, the `clusters list` API will return multiple clusters, including the local Pulsar cluster and remote clusters like ``` bin/pulsar-admin clusters list us-west us-east us-cent ``` But in this return, you can't distinguish the local and the remote cluster. When you need to remove the geo-replication configuration, it will be hard to decide which cluster should be removed on replicated tenants and namespaces unless you record the cluster information. ### Modification Add `local` flag to distinguish clusters ``` bin/pulsar-admin clusters list us-west(local) us-east us-cent ``` PIP: https://github.com/apache/pulsar/pull/20614 Regards Jiwei Guo (Tboy)