You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/05/20 05:58:00 UTC

[jira] [Commented] (HADOOP-11998) Jenkins has race conditions when reading the maven repo

    [ https://issues.apache.org/jira/browse/HADOOP-11998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14551767#comment-14551767 ] 

Allen Wittenauer commented on HADOOP-11998:
-------------------------------------------

It just so happens I did a bunch of research on this topic last week while working on the Docker patch.  End result: this isn't a Jenkins thing, this is a maven thing.  Maven doesn't lock the repo.

e.g., http://docs.codehaus.org/display/MAVEN/Local+repository+separation

Pretty much the ONLY way to solve this problem is to have every single spawned instance use a different local repo. In order to do this in a completely safe manner, it means a fresh repo stored in the workspace directory, which also means you've added 5-10 minutes to redownload the dependency tree every time.

There are less safe methods, but at that point you might as well just live with the risk of these collisions.

> Jenkins has race conditions when reading the maven repo
> -------------------------------------------------------
>
>                 Key: HADOOP-11998
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11998
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Haohui Mai
>
> Jenkins builds have race conditions when accessing the directory of the maven repo:
> {noformat}
> Error Message
> org.xml.sax.SAXParseException; systemId: jar:file:/home/jenkins/.m2/repository/org/apache/hadoop/hadoop-common/3.0.0-SNAPSHOT/hadoop-common-3.0.0-SNAPSHOT.jar!/core-default.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
> Stacktrace
> java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: jar:file:/home/jenkins/.m2/repository/org/apache/hadoop/hadoop-common/3.0.0-SNAPSHOT/hadoop-common-3.0.0-SNAPSHOT.jar!/core-default.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
> {noformat}
> More details can be found in https://builds.apache.org/job/PreCommit-HDFS-Build/11050/testReport/org.apache.hadoop.hdfs.server.datanode/TestDataNodeHotSwapVolumes/testAddOneNewVolume/
> What it looks like here is that there is another build that triggers {{mvn clean}} when {{mvn test}} is still running.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)