From 9eca032d5dfef9c0184ac0244f971c4f6b3dcf86 Mon Sep 17 00:00:00 2001 From: Shoothzj Date: Mon, 25 Oct 2021 20:01:02 +0800 Subject: [PATCH 1/9] add the pulsar java property doc --- site2/docs/client-libraries-java.md | 10 ++++++++++ site2/website-next/docs/client-libraries-java.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/site2/docs/client-libraries-java.md b/site2/docs/client-libraries-java.md index 55bb130f07012..10f7dfd03fabb 100644 --- a/site2/docs/client-libraries-java.md +++ b/site2/docs/client-libraries-java.md @@ -130,6 +130,16 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ > In addition to client-level configuration, you can also apply [producer](#configure-producer) and [consumer](#configure-consumer) specific configuration as described in sections below. +### client memory allocator settings +The client memory allocator parameters are config through java property.
+example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` +| Property | Type |
Description
| Default +|---|---|---|--- +`pulsar.allocator.pooled` | String | If set to true, the client use direct memory pool. False use the heap memory without pool | true +`pulsar.allocator.exit_on_oom` | String | Whether to exit the jvm when OOM happen | false +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled +`pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap + ## Producer In Pulsar, producers write messages to topics. Once you've instantiated a {@inject: javadoc:PulsarClient:/client/org/apache/pulsar/client/api/PulsarClient} object (as in the section [above](#client-configuration)), you can create a {@inject: javadoc:Producer:/client/org/apache/pulsar/client/api/Producer} for a specific Pulsar [topic](reference-terminology.md#topic). diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 8c4fda1465652..358e2b3177651 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -151,6 +151,16 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ > In addition to client-level configuration, you can also apply [producer](#configure-producer) and [consumer](#configure-consumer) specific configuration as described in sections below. +### client memory allocator settings +The client memory allocator parameters are config through java property.
+example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` +| Property | Type |
Description
| Default +|---|---|---|--- +`pulsar.allocator.pooled` | String | If set to true, the client use direct memory pool. False use the heap memory without pool | true +`pulsar.allocator.exit_on_oom` | String | Whether to exit the jvm when OOM happen | false +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled +`pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap + ## Producer In Pulsar, producers write messages to topics. Once you've instantiated a {@inject: javadoc:PulsarClient:/client/org/apache/pulsar/client/api/PulsarClient} object (as in the section [above](#client-configuration)), you can create a {@inject: javadoc:Producer:/client/org/apache/pulsar/client/api/Producer} for a specific Pulsar [topic](reference-terminology.md#topic). From c6598e66236f09764565d3ccf5ebe19308bde5b0 Mon Sep 17 00:00:00 2001 From: ZhangJian He Date: Tue, 26 Oct 2021 09:37:07 +0800 Subject: [PATCH 2/9] Update site2/website-next/docs/client-libraries-java.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/website-next/docs/client-libraries-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 358e2b3177651..897cc8f94f2ad 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -151,7 +151,7 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ > In addition to client-level configuration, you can also apply [producer](#configure-producer) and [consumer](#configure-consumer) specific configuration as described in sections below. -### client memory allocator settings +### Client memory allocator configuration The client memory allocator parameters are config through java property.
example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` | Property | Type |
Description
| Default From 9744cdffa6b06c0071af5ef51665abf68c094c30 Mon Sep 17 00:00:00 2001 From: ZhangJian He Date: Tue, 26 Oct 2021 09:37:23 +0800 Subject: [PATCH 3/9] Update site2/website-next/docs/client-libraries-java.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/website-next/docs/client-libraries-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 897cc8f94f2ad..830350ebe341d 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -152,7 +152,7 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ > In addition to client-level configuration, you can also apply [producer](#configure-producer) and [consumer](#configure-consumer) specific configuration as described in sections below. ### Client memory allocator configuration -The client memory allocator parameters are config through java property.
+You can set the client memory allocator configurations through Java properties.
example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` | Property | Type |
Description
| Default |---|---|---|--- From e4ee90ceb718cfa4bb4fddeaddd10db67eeecc62 Mon Sep 17 00:00:00 2001 From: ZhangJian He Date: Tue, 26 Oct 2021 09:41:01 +0800 Subject: [PATCH 4/9] Update site2/website-next/docs/client-libraries-java.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/website-next/docs/client-libraries-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 830350ebe341d..33e2b910f731e 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -156,7 +156,7 @@ You can set the client memory allocator configurations through Java properties.< example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` | Property | Type |
Description
| Default |---|---|---|--- -`pulsar.allocator.pooled` | String | If set to true, the client use direct memory pool. False use the heap memory without pool | true +`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | true `pulsar.allocator.exit_on_oom` | String | Whether to exit the jvm when OOM happen | false `pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled `pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap From 6d61e5e713039cdf083a4b2dd36b9c47c2ff3a8a Mon Sep 17 00:00:00 2001 From: ZhangJian He Date: Tue, 26 Oct 2021 09:41:07 +0800 Subject: [PATCH 5/9] Update site2/website-next/docs/client-libraries-java.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/website-next/docs/client-libraries-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 33e2b910f731e..35459e93daa79 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -157,7 +157,7 @@ example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -D | Property | Type |
Description
| Default |---|---|---|--- `pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | true -`pulsar.allocator.exit_on_oom` | String | Whether to exit the jvm when OOM happen | false +`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false `pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled `pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap From 5c492d469877b2b4aab1ef736cce1232d504a7b4 Mon Sep 17 00:00:00 2001 From: ZhangJian He Date: Tue, 26 Oct 2021 09:41:18 +0800 Subject: [PATCH 6/9] Update site2/website-next/docs/client-libraries-java.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/website-next/docs/client-libraries-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 35459e93daa79..64dc9e5cfd155 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -159,7 +159,7 @@ example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -D `pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | true `pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false `pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled -`pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap +`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | FallbackToHeap ## Producer From 8c5b4511136af66eae36ac15e20a1327f7965368 Mon Sep 17 00:00:00 2001 From: Shoothzj Date: Tue, 26 Oct 2021 09:55:41 +0800 Subject: [PATCH 7/9] add the pulsar java property doc --- .../docs/client-libraries-java.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index 64dc9e5cfd155..f27de5b4d6395 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -153,13 +153,21 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ ### Client memory allocator configuration You can set the client memory allocator configurations through Java properties.
-example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` -| Property | Type |
Description
| Default -|---|---|---|--- -`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | true -`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false -`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled -`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | FallbackToHeap + +| Property | Type |
Description
| Available values|Default +|---|---|---|---|--- +`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | - true
- false | true +`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | - true
- false | false +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | - Disabled
- Simple
- Advanced
- Paranoid | Disabled +`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | - ThrowException
- FallbackToHeap | FallbackToHeap + +**Example**: +``` +-Dpulsar.allocator.pooled=true +-Dpulsar.allocator.exit_on_oom=false +-Dpulsar.allocator.leak_detection=Disabled +-Dpulsar.allocator.out_of_memory_policy=ThrowException +``` ## Producer From c5eb7f7584210358caa4ab90b0218816cf9a093a Mon Sep 17 00:00:00 2001 From: Shoothzj Date: Tue, 26 Oct 2021 09:56:53 +0800 Subject: [PATCH 8/9] add the pulsar java property docs dir --- site2/docs/client-libraries-java.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/site2/docs/client-libraries-java.md b/site2/docs/client-libraries-java.md index 10f7dfd03fabb..4ccbb22e74b51 100644 --- a/site2/docs/client-libraries-java.md +++ b/site2/docs/client-libraries-java.md @@ -130,15 +130,23 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ > In addition to client-level configuration, you can also apply [producer](#configure-producer) and [consumer](#configure-consumer) specific configuration as described in sections below. -### client memory allocator settings -The client memory allocator parameters are config through java property.
-example: `-Dpulsar.allocator.pooled=true -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.leak_detection=Disabled -Dpulsar.allocator.out_of_memory_policy=ThrowException` -| Property | Type |
Description
| Default -|---|---|---|--- -`pulsar.allocator.pooled` | String | If set to true, the client use direct memory pool. False use the heap memory without pool | true -`pulsar.allocator.exit_on_oom` | String | Whether to exit the jvm when OOM happen | false -`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled -`pulsar.allocator.out_of_memory_policy` | String | When OOM, throw exception or fallback to heap | FallbackToHeap +### Client memory allocator configuration +You can set the client memory allocator configurations through Java properties.
+ +| Property | Type |
Description
| Available values|Default +|---|---|---|---|--- +`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | - true
- false | true +`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | - true
- false | false +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | - Disabled
- Simple
- Advanced
- Paranoid | Disabled +`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | - ThrowException
- FallbackToHeap | FallbackToHeap + +**Example**: +``` +-Dpulsar.allocator.pooled=true +-Dpulsar.allocator.exit_on_oom=false +-Dpulsar.allocator.leak_detection=Disabled +-Dpulsar.allocator.out_of_memory_policy=ThrowException +``` ## Producer From 986839f750af4dfe9c66dfae2364e33052970b76 Mon Sep 17 00:00:00 2001 From: Shoothzj Date: Tue, 26 Oct 2021 10:57:20 +0800 Subject: [PATCH 9/9] add the pulsar java property docs dir --- site2/docs/client-libraries-java.md | 10 +++++----- site2/website-next/docs/client-libraries-java.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/site2/docs/client-libraries-java.md b/site2/docs/client-libraries-java.md index 4ccbb22e74b51..a56f12d0b10f2 100644 --- a/site2/docs/client-libraries-java.md +++ b/site2/docs/client-libraries-java.md @@ -133,12 +133,12 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ ### Client memory allocator configuration You can set the client memory allocator configurations through Java properties.
-| Property | Type |
Description
| Available values|Default +| Property | Type |
Description
| Default | Available values |---|---|---|---|--- -`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | - true
- false | true -`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | - true
- false | false -`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | - Disabled
- Simple
- Advanced
- Paranoid | Disabled -`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | - ThrowException
- FallbackToHeap | FallbackToHeap +`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
If set to `false`, the client uses a heap memory without pool | true |
  • true
  • false
  • +`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false |
  • true
  • false
  • +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled |
  • Disabled
  • Simple
  • Advanced
  • Paranoid
  • +`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | FallbackToHeap |
  • ThrowException
  • FallbackToHeap
  • **Example**: ``` diff --git a/site2/website-next/docs/client-libraries-java.md b/site2/website-next/docs/client-libraries-java.md index f27de5b4d6395..dc54b794baf13 100644 --- a/site2/website-next/docs/client-libraries-java.md +++ b/site2/website-next/docs/client-libraries-java.md @@ -154,12 +154,12 @@ Check out the Javadoc for the {@inject: javadoc:PulsarClient:/client/org/apache/ ### Client memory allocator configuration You can set the client memory allocator configurations through Java properties.
    -| Property | Type |
    Description
    | Available values|Default +| Property | Type |
    Description
    | Default | Available values |---|---|---|---|--- -`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
    If set to `false`, the client uses a heap memory without pool | - true
    - false | true -`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | - true
    - false | false -`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | - Disabled
    - Simple
    - Advanced
    - Paranoid | Disabled -`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | - ThrowException
    - FallbackToHeap | FallbackToHeap +`pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool.
    If set to `false`, the client uses a heap memory without pool | true |
  • true
  • false
  • +`pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false |
  • true
  • false
  • +`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled |
  • Disabled
  • Simple
  • Advanced
  • Paranoid
  • +`pulsar.allocator.out_of_memory_policy` | String | When an OOM occurs, the client throws an exception or fallbacks to heap | FallbackToHeap |
  • ThrowException
  • FallbackToHeap
  • **Example**: ```