This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 1aa88a1e348bd318a89de5bcbdfe6cf01d552453
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Apr 9 10:30:23 2025 +0300

    Pass -XX:ActiveProcessorCount=1 to reference doc generation so that 
defaults are based on 1 core
---
 contribute/release-process.md                               | 4 +++-
 tools/pytools/lib/execute/pulsar_admin_clidoc_generator.py  | 4 +++-
 tools/pytools/lib/execute/pulsar_client_clidoc_generator.py | 5 ++++-
 tools/pytools/lib/execute/pulsar_perf_clidoc_generator.py   | 5 ++++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/contribute/release-process.md b/contribute/release-process.md
index 4d857fdd082..2a60dbb2306 100644
--- a/contribute/release-process.md
+++ b/contribute/release-process.md
@@ -811,6 +811,7 @@ First, build swagger files from apache/pulsar repo at the 
released tag:
 ```shell
 # ensure the correct JDK version is used for building
 sdk u java $SDKMAN_JAVA_VERSION
+git checkout v$VERSION_WITHOUT_RC
 command mvn -ntp install -Pcore-modules,swagger,-main -DskipTests 
-DskipSourceReleaseAssembly=true -Dspotbugs.skip=true -Dlicense.skip=true
 PULSAR_PATH=$(pwd)
 ```
@@ -878,7 +879,8 @@ You can generate references of config and command-line tool 
by running the follo
 # build Pulsar distributions under /path/to/pulsar-3.X.Y
 cd tools/pytools
 poetry install
-poetry run bin/reference-doc-generator.py --master-path=$PULSAR_PATH 
--version=$VERSION_WITHOUT_RC
+# ensure that defaults using Runtime.getRuntime().availableProcessors() will 
be based on 1 as the number of CPUs
+_JAVA_OPTIONS=-XX:ActiveProcessorCount=1 poetry run 
bin/reference-doc-generator.py --master-path=$PULSAR_PATH 
--version=$VERSION_WITHOUT_RC
 ```
 
 ```shell
diff --git a/tools/pytools/lib/execute/pulsar_admin_clidoc_generator.py 
b/tools/pytools/lib/execute/pulsar_admin_clidoc_generator.py
index 7f1c8bf3b14..ba61cf99498 100644
--- a/tools/pytools/lib/execute/pulsar_admin_clidoc_generator.py
+++ b/tools/pytools/lib/execute/pulsar_admin_clidoc_generator.py
@@ -52,4 +52,6 @@ def execute(basedir: Path, version: str):
         p = (reference / f'{command}.md')
         p.parent.mkdir(exist_ok=True, parents=True)
         with p.open('w') as f:
-            run(str(admin.absolute()), 'documents', 'generate', command, 
stdout=f)
+            run(str(admin.absolute()), 'documents', 'generate', command, 
stdout=f, env={
+                **os.environ,
+            })
diff --git a/tools/pytools/lib/execute/pulsar_client_clidoc_generator.py 
b/tools/pytools/lib/execute/pulsar_client_clidoc_generator.py
index fdba56f1ac5..c1621f829db 100644
--- a/tools/pytools/lib/execute/pulsar_client_clidoc_generator.py
+++ b/tools/pytools/lib/execute/pulsar_client_clidoc_generator.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+import os
 from pathlib import Path
 
 from command import run
@@ -27,4 +28,6 @@ def execute(basedir: Path, version: str):
 
     reference.mkdir(exist_ok=True, parents=True)
     with (reference / 'pulsar-client.md').open('w') as f:
-        run(str(client.absolute()), 'generate_documentation', stdout=f)
+        run(str(client.absolute()), 'generate_documentation', stdout=f, env={
+                **os.environ,
+            })
diff --git a/tools/pytools/lib/execute/pulsar_perf_clidoc_generator.py 
b/tools/pytools/lib/execute/pulsar_perf_clidoc_generator.py
index d6450d3f848..15f25b615db 100644
--- a/tools/pytools/lib/execute/pulsar_perf_clidoc_generator.py
+++ b/tools/pytools/lib/execute/pulsar_perf_clidoc_generator.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+import os
 from pathlib import Path
 
 from command import run
@@ -27,4 +28,6 @@ def execute(basedir: Path, version: str):
 
     reference.mkdir(exist_ok=True, parents=True)
     with (reference / 'pulsar-perf.md').open('w') as f:
-        run(str(perf.absolute()), 'gen-doc', stdout=f)
+        run(str(perf.absolute()), 'gen-doc', stdout=f, env={
+                **os.environ,
+            })

Reply via email to