[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Kimball updated MAPREDUCE-1038:
-------------------------------------

    Attachment: MAPREDUCE-1038.patch

Submitting patch to address the issue.

Interestingly, Mumak's build.xml already had an {{uptodate}} task in it for the 
weave-aspects. The task was somewhat useless, however, as it:
* includes all the main MapReduce {{src/java}} in its changeset
* and compared the source file mtimes vs. that of the 
mapreduce-$\{version\}-mumak.jar file, which isn't generated by the {{compile}} 
target.

I changed this to ignore the MapReduce source for uptodate-ness, (so you now 
have to explicitly {{ant clean}} if you want aspects rewoven after you change 
MapReduce but not mumak), and also to use a stamp file generated with the 
{{touch}} target.

No new unit tests because this is a buildfile tweak. I manually tested it in 
the following fashion:
{code}
cd $MAPREDUCE_HOME
ant clean # cleans state
ant test -Dtestcase=TestConfiguration # compile MapReduce, run a test. Note 
that weaving occurs.
ant test -Dtestcase=TestConfiguration # Observe that weaving does not occur.
touch src/java/org/apache/hadoop/mapred/JobClient.java # "change" a MapReduce 
file
ant test -Dtestcase=TestConfiguration # Observe that weaving does not occur.
touch src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorClock.java # 
"change" Mumak src
ant test -Dtestcase=TestConfiguration # Weaving occurs.
touch 
src/contrib/mumak/src/java/org/apache/hadoop/mapred/EagerTaskInitializationListenerAspects.aj
 # change mumak aspects
ant test -Dtestcase=TestConfiguration # Weaving occurs.
ant test -Dtestcase=TestConfiguration # No weaving required.
{code}


> Mumak's compile-aspects target weaves aspects even though there are no 
> changes to the Mumak's sources
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1038
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1038
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.21.0
>            Reporter: Vinod K V
>             Fix For: 0.21.0
>
>         Attachments: MAPREDUCE-1038.patch, MAPREDUCE-1038.patch, 
> MAPREDUCE-1038.patch
>
>
> This is particularly time consuming and is the bottle neck even for a simple 
> ant build. In the case where no files have been updated in Mumak, there is no 
> reason to recompile sources along with the aspects. compile-aspects should 
> skip this step in these cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to