From fc93b76a8d3f51531af730f9f6397e91fd6b91cb Mon Sep 17 00:00:00 2001 From: jialiang <2510095164@qq.com> Date: Tue, 30 Jan 2024 10:02:17 +0800 Subject: [PATCH] BIGTOP-4059: Add Documentation for Parallel Maven Compilation in Bigtop (#1232) Co-authored-by: jialiang --- README.md | 8 ++++++++ bigtop.bom | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 65f0de9ced..09581822af 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,15 @@ __On all systems, Building Apache Bigtop requires certain set of tools__ By default, the installation path of components will follow [Filesystem Hierarchy Standard](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html), but you can use `-PparentDir=/path` to add prefix to the path, in this example, prefix `/path/${bigtop_version}` will be added To avoid download wrong version of components when you have multiple repositories configured on your machine, you can use `-PpkgSuffix` to add bigtop version to package suffix, for example, package name `zookeeper` will be changed to `zookeeper_3_2_0` when using `Bigtop-3.2.0` + +* __Enabling Parallel Build for packages(BIGTOP-4044)__ + + Apache Bigtop defaults to non-parallel builds. Use -PbuildThreads=2C to activate Maven's parallel build feature and expedite compilation for compatible components. + Append a digit and 'C' to -PbuildThreads= to set the CPU core count for concurrent builds. + + Consult the bigtop.bom file to verify component compatibility with parallel builds; those marked with maven_parallel_build = true support this option. + * __Building local YUM/APT repositories__ : `gradle [yum|apt]` * __Recommended build environments__ diff --git a/bigtop.bom b/bigtop.bom index a027d71277..e3e45e3b67 100644 --- a/bigtop.bom +++ b/bigtop.bom @@ -86,7 +86,10 @@ packaging = 'rpm' // *optional* If this component can be built only as either // DEB or RPM, specify that packaging format explicitly. // If both formats are supported, omit this option. - maven_parallel_build = true + maven_parallel_build = true // *optional* maven_parallel_build indicates whether the component can be built in parallel. + // Components with this flag can have the Maven parallel build parameter -PbuildThreads=2C or -PbuildThreads=2 + // passed during compilation to enable parallel building and speed up the process. + } } }