Skip to content

BIGTOP-4543. hadoop: mvn site intermittently fails under parallel build#1403

Open
magnuma3 wants to merge 1 commit into
apache:masterfrom
magnuma3:fix-hadoop-mvn-site
Open

BIGTOP-4543. hadoop: mvn site intermittently fails under parallel build#1403
magnuma3 wants to merge 1 commit into
apache:masterfrom
magnuma3:fix-hadoop-mvn-site

Conversation

@magnuma3

Copy link
Copy Markdown

Description of PR

When Bigtop builds hadoop with Maven parallel mode (-T), the site goal intermittently fails:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.9.1:site (default-site) on project hadoop-aws: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.9.1:site failed: Cannot invoke "String.length()" because "s" is null -> [Help 1]

Root cause: the site mojo in maven-site-plugin 3.9.1 is not marked @threadsafe:

@Mojo( name = "site", requiresDependencyResolution = ResolutionScope.TEST, requiresReports = true )

With -T, Maven only warns about non-thread-safe plugins and still runs them in parallel. Concurrent site executions across modules race on shared components (Doxia SiteRenderer, Velocity, plexus), which surfaces as the NPE above. The failure is non-deterministic and the failing module varies between runs.

Fix: in the hadoop do-component-build, run the mvn site invocation with -T 1, keeping parallelism for the main build.

How was this patch tested?

Built the hadoop packages repeatedly on Navix 9 with parallel Maven builds. Before this patch, the site goal failed intermittently with the NPE above (failing module varied between runs). With the site invocation pinned to -T 1, repeated builds completed without failure.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'BIGTOP-3638. Your PR title ...')?
  • Make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant