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 2021/02/24 07:23:22 UTC

[GitHub] [pulsar] Anonymitaet opened a new pull request #9692: [Doc] Add Pulsar isolation

Anonymitaet opened a new pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692


   Add docs for https://github.com/apache/pulsar/issues/3104


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582446309



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Jennifer88huang but http://pulsar.apache.org/tools/pulsar-admin/ does not refer to the specific command and users need to search, which is not convenient for users. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] sijie commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582118685



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       @eolivelli - `listbookies` serves a different purpose for people to list the available bookies. People don't use `listbookies` to get the list of bookies and then use `set-bookie-rack` to set rack for individual bookie. People should have a startup script to call `set-bookie-rack` when a bookie is starting up. See my other comments with @Anonymitaet. Let's avoid giving misleading information on how people should use `set-bookie-rack`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582700065



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       Hi @tuteng I've created an issue here: https://github.com/apache/pulsar/issues/9717




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581776472



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).

Review comment:
       @eolivelli thanks for your suggestion. While the Pulsar website itself [(Pulsar Admin CLI doc)](https://pulsar.apache.org/docs/en/next/pulsar-admin/#policies) does not contain this command and the information on the "Pulsar Admin CLI" page is far behind from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) where contains the latest information. 
   
   Seems that there was an issue (create automatic workflow) to sync contents from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) to the Pulsar website, but no more updates for a long time. I think right now the best choice is to point users to get the latest information and we can update the link once we have a better option.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582449666



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Jennifer88huang this variable might do not work, since for minor releases, for example, 2.6.3, http://pulsar.apache.org/tools/pulsar-admin/ does not have 2.6.3-SNAPSHOT, so I change the specific link (http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-) to a general link http://pulsar.apache.org/tools/pulsar-admin/
   
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] eolivelli commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581745683



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).

Review comment:
       we should not have a pointer to a specific version `2.8.0-SNAPSHOT`, probably for links to the Pulsar website itself we can use simply reletive references

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       we could cite this command
   `bin/pulsar-admin bookies list-bookies`
   
   that allows you to have the list of available bookies.
   
   otherwise it is not clear to the user where to pick the bookie identifiers
   
   this new command is available only from 2.8.0 anwards




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582448120



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       OK, I've changed them to general links.

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Jennifer88huang but http://pulsar.apache.org/tools/pulsar-admin/ does not refer to the specific command and users need to search, which is not convenient for users. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582400849



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       Sure, then I'll add explanations (`note`, `--bookie bookie-id (the bookie id is in <hostname>:<port> format)`, and `Explain what people should put in --primary.`) on [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces) rather than here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581776472



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).

Review comment:
       @eolivelli thanks for your suggestion. While the Pulsar website itself [(Pulsar Admin CLI doc)](https://pulsar.apache.org/docs/en/next/pulsar-admin/#policies) does not contain this command and the information on the "Pulsar Admin CLI" page is far behind from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) where contains the lastest information. 
   Seems that there was an issue (create automatic workflow) to sync contents from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) to the Pulsar website, but no more updates for a long time. I think right now the best choice is to point users to get the latest information and we can update the link once we have a better optipon.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] eolivelli commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581832172



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       >  The bookie can be found in many different ways
   the only alternative way I know is with `bin/bookkeeper shell listbookies -a`
   
   As I know how BK works it is easy for me to find a way to get the list of bookies, but I am not sure that the regular user knows how the Bookie identifies itself.
   
   I am saying this because I had to help users in the past to search for the actual bookie id in their cluster
   
   btw I have no strong opinion on this, we cannot cite that command. 
   Anyone who is using `pulsar-admin bookies`  will easily find  the 'list-bookies' command
   

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       >  The bookie can be found in many different ways
   
   the only alternative way I know is with `bin/bookkeeper shell listbookies -a`
   
   As I know how BK works it is easy for me to find a way to get the list of bookies, but I am not sure that the regular user knows how the Bookie identifies itself.
   
   I am saying this because I had to help users in the past to search for the actual bookie id in their cluster
   
   btw I have no strong opinion on this, we cannot cite that command. 
   Anyone who is using `pulsar-admin bookies`  will easily find  the 'list-bookies' command
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582401268



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       Hi @tuteng, we have the following bookie related commands but none of them are shown on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces), could you please take a look? thanks
   ![image](https://user-images.githubusercontent.com/50226895/108981061-4f8ad480-76c7-11eb-8f47-6bdb8dc145ec.png)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet merged pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet merged pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] sijie commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582116556



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       Those commands should show up. You might want to ping @tuteng to see why they don't show up.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581825197



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       @sijie thanks for your suggestions.
   
   I think your `note`, `--bookie bookie-id (the bookie id is in <hostname>:<port> format)`, and `Explain what people should put in --primary.` are "explanations" for the command `pulsar-admin bookies set-bookie-rack`, right?
   
   Currently, both `pulsar-admin bookies list-bookies` and `pulsar-admin bookies set-bookie-rack` are not available on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces), and it seems that we have the following bookie related commands but none of them are available on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces). 
   ![image](https://user-images.githubusercontent.com/50226895/108981061-4f8ad480-76c7-11eb-8f47-6bdb8dc145ec.png)
   
   Will these commands be shown on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces)? If so, I think the **explanations talked above** should be added to the command `pulsar-admin bookies set-bookie-rack`on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces) rather than here because users who want to use pulsar-admin commands would navigate to the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces) to see descriptions, notes, and flags. And **here are just example values**.
   
   For example, I [added the descriptions for `--primary-group` and `--secondary-group`](https://github.com/apache/pulsar/pull/9422/files) on the [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces) rather than every occurrence they are shown on Pulsar website docs.
   ![image](https://user-images.githubusercontent.com/50226895/108982618-f4f27800-76c8-11eb-9844-a0fdf2d06b45.png)
   
   Thoughts?
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Huanli-Meng commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Huanli-Meng commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581841948



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       I think it's better not to specify the specific version of pulsar-admin




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582445396



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Anonymitaet I have the same concern here, it's better not to specify the version. You can use the general one http://pulsar.apache.org/tools/pulsar-admin/
   or use variable for the version.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582448147



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       then you can use variable, like this
   http://pulsar.apache.org/tools/pulsar-admin/{{pulsar:version}}-SNAPSHOT/#-em-set-em-




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] sijie commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581787690



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name

Review comment:
       ```suggestion
   --primary 10.193.216.*  my-cluster policy-name
   ```
   
   Explain what people should put in `--primary`.

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \
+--hostname 127.0.0.1:3181 \

Review comment:
       ditto

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       ```suggestion
   --bookie 127.0.0.1:3181 \
   ```
   
   `127.0.0.1:3181` should be changed to bookie-id. The bookie id is in `<hostname>:<port>` format.

##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       Let's decouple the documentation change into two different pull requests. The documentation here can simply be copied to other releases to improve the documentation there. `bin/pulsar-admin bookies list-bookies` is a separate command introduced in 2.8.0. Let's not couple them together. 
   
   When people try to set bookie track, people already know which bookie to set the track information. The bookie can be found in many different ways. I don't think we should add `bookies list-bookies` to confuse people.
   
   One note that Yu can add is that the `set-bookie-rack` is to specify the track information for only one bookie. If people want to specify the track for all bookies, they have to run the command for individual bookie. But they can put a script when starting a bookie to set its rack.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582449666



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Jennifer88huang this variable does not work for all cases, since for minor releases, for example, 2.6.3, http://pulsar.apache.org/tools/pulsar-admin/ does not have 2.6.3-SNAPSHOT, so I change the specific link (http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-) to a general link http://pulsar.apache.org/tools/pulsar-admin/
   
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] eolivelli commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582125733



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \

Review comment:
       @sijie I am fine with not telling about this command here in this document
   
   For your interest  `pulsar-admin bookies list_bookies` and `bookkeeper shell listbookies -a `
   reports all of the existent bookies, in spite of their state.
   
   `bookkeeper shell listbookies -rw`  reports only the `available` bookies




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582400849



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin ns-isolation-policy set \
+--auto-failover-policy-type min_available \
+--auto-failover-policy-params min_limit=1,usage_threshold=80 \
+--namespaces my-tenant/my-namespace \
+--primary 10.193.216.*  my-cluster policy-name
+```
+
+<!--REST API-->
+
+[PUT /admin/v2/namespaces/{tenant}/{namespace}](https://pulsar.apache.org/admin-rest-api/?version=master&apiversion=v2#operation/createNamespace)
+
+<!--Java admin API-->
+
+For how to set namespace isolation policy using Java admin API, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java#L251).
+
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+## Bookie isolation
+
+A namespace can be isolated into user-defined groups of bookies, which guarantees all the data that belongs to the namespace is stored in desired bookies. The bookie affinity group uses the BookKeeper [rack-aware placement policy](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePlacementPolicy.html) and it is a way to feed rack information which is stored as JSON format in znode.
+
+You can set a bookie affinity group using one of the following methods.
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin namespaces set-bookie-affinity-group options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-bookie-affinity-group-em-).
+
+**Example**
+
+```shell
+bin/pulsar-admin bookies set-bookie-rack \
+--bookie 127.0.0.1:3181 \

Review comment:
       OK, then I'll add explanations (`note`, `--bookie bookie-id (the bookie id is in <hostname>:<port> format)`, and `Explain what people should put in --primary.`) on [pulsar-admin website](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#namespaces) rather than here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581844164



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       Thanks for your suggestion. While the Pulsar website itself (Pulsar Admin CLI doc) does not contain this command and the information on the "Pulsar Admin CLI" page is far behind from pulsar-admin where contains the latest information.
   
   Seems that there was an issue (create automatic workflow) to sync contents from pulsar-admin to the Pulsar website, but no more updates for a long time. I think right now the best choice is to point users to get the latest information and we can update the link once we have a better option.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r581844634



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Huanli-Meng thanks for your suggestion. While the Pulsar website itself [(Pulsar Admin CLI doc)](https://pulsar.apache.org/docs/en/next/pulsar-admin/#policies) does not contain this command and the information on the "Pulsar Admin CLI" page is far behind from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) where contains the latest information. 
   
   Seems that there was an issue (create automatic workflow) to sync contents from [pulsar-admin](http://pulsar.apache.org/tools/pulsar-admin/) to the Pulsar website, but no more updates for a long time. I think right now the best choice is to point users to get the latest information and we can update the link once we have a better option.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #9692: [Doc] Add Pulsar isolation

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9692:
URL: https://github.com/apache/pulsar/pull/9692#discussion_r582449666



##########
File path: site2/docs/administration-isolation.md
##########
@@ -0,0 +1,84 @@
+---
+id: administration-isolation
+title: Pulsar isolation
+sidebar_label: Pulsar isolation
+---
+
+In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid the resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to take resource isolation into consideration and weigh your intended actions against expected and unexpected consequences.
+
+To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (**broker** and **bookie**) for the namespace.
+
+## Broker isolation
+
+In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.
+
+You can set a namespace isolation policy for a cluster using one of the following methods. 
+
+<!--DOCUSAURUS_CODE_TABS-->
+
+<!--Admin CLI-->
+
+```
+pulsar-admin ns-isolation-policy set options
+```
+
+For more information about the command and descriptions, see [here](http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-).

Review comment:
       @Jennifer88huang this variable does not work for all cases, since for minor releases, for example, 2.6.3, http://pulsar.apache.org/tools/pulsar-admin/ does not have 2.6.3-SNAPSHOT, so I change the specific link (http://pulsar.apache.org/tools/pulsar-admin/2.8.0-SNAPSHOT/#-em-set-em-) to a general link http://pulsar.apache.org/tools/pulsar-admin/. PTAL.
   
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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