Skip to content

Conversation

@prashantwason
Copy link
Member

What is the purpose of the pull request

Fix generation of jacococ coverage reports after unit tests are run.

Brief change log

surefire plugin's argLine is moved into a property. This configuration allows jacoco plugin to modify the argLine to insert it's Java Agent's configuration during pre-unit-test stage.

Verify this pull request

This pull request is already covered by existing tests, such as (please describe tests).

Executed unit test and confirmed that coverage report is generated. See these logs:

mvn test -Dtest=TestHoodieActiveTimeline

10:33:33 [INFO] --- jacoco-maven-plugin:0.7.8:prepare-agent (pre-unit-test) @ hudi-common ---
10:33:33 [INFO] argLine set to -javaagent:/home/pwason/.m2/repository/org/jacoco/org.jacoco.agent/0.7.8/org.jacoco.agent-0.7.8-runtime.jar=destfile=/home/pwason/work/java/incubator-hudi/hudi-common/target/coverage-reports/jacoco-ut.exec -Xmx1024m -XX:MaxPermSize=256m

...
...

10:33:41 [INFO] --- jacoco-maven-plugin:0.7.8:report (post-unit-test) @ hudi-common ---
10:33:41 [INFO] Loading execution data file /home/pwason/work/java/incubator-hudi/hudi-common/target/coverage-reports/jacoco-ut.exec
10:33:42 [INFO] Analyzed bundle 'hudi-common' with 273 classes

ls -al hudi-common/target/coverage-reports/jacoco-ut.exec
-rw-rw-r-- 1 pwason pwason 49240 Jan 31 10:33 hudi-common/target/coverage-reports/jacoco-ut.exec

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

surefire plugin's argLine is moved into a property. This configuration allows jacoco plugin to modify the argLine to insert it's Java Agent's configuration during pre-unit-test stage.
<spark.bundle.hive.shade.prefix></spark.bundle.hive.shade.prefix>
<utilities.bundle.hive.scope>provided</utilities.bundle.hive.scope>
<utilities.bundle.hive.shade.prefix></utilities.bundle.hive.shade.prefix>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prashantwason this has a side effect of making the builds run slower. The reason is that when a build is submitted in travis, it needs to wait for resources to be available for the build to get triggered. My understanding is that if we ask for a larger JVM for non-IntegrationTest modules as well, this will make the process slower.
How much more memory is required for the coverage report ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think travis has the smarts to grok this and get the resource needs? We just get a VM with some fixed RAM https://docs.travis-ci.com/user/reference/overview/

-Xmx won't also grab the 1GB right off the bat.. do you see the builds slowing down? would be interesting to understand why..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not add this line. It was already part of the maven-surefire plugin's argLine. I just moved the definition to a property so that jacoco plugin can add its own java-agent config to it and the unit tests can execute with jacococ agent enabled.

This was added in the following commit 3 months ago:
#979

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense.

@vinothchandar I don't see it slowing down, just had a hunch, merging this as this does not seem to have any side-effect.

Copy link
Contributor

@n3nash n3nash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@n3nash n3nash merged commit d26dc0b into apache:master Feb 5, 2020
@prashantwason prashantwason deleted the pw_HUDI-587 branch September 4, 2020 22:37
vinishjail97 added a commit to vinishjail97/hudi that referenced this pull request Mar 26, 2025
…ableConfig.databaseName is null or empty (apache#1298)

Co-authored-by: Y Ethan Guo <ethan.guoyihua@gmail.com>
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.

3 participants