Skip to content

Commit

Permalink
Move ShimServiceProvider file re-init/truncate (#5599)
Browse files Browse the repository at this point in the history
This PR closes #5596 by moving truncate close to when shim service file
concatentation is about to generate a new list. 

The empty file for ShimServiceProvider created during init-properties is not populated via
concat in the conventional jar path, later overwriting the original file
from the aggregator jar. it's also bad practice to have side effects
while still initializing properties. This PR corrects these issues.

Signed-off-by: Gera Shegalov <gera@apache.org>
  • Loading branch information
gerashegalov authored May 24, 2022
1 parent 5f33368 commit ee6335b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/maven-antrun/build-parallel-worlds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<property name="shimServiceRsrc" value="META-INF/services/com.nvidia.spark.rapids.SparkShimServiceProvider"/>
<property name="shimServiceFile" value="${project.build.directory}/extra-resources/${shimServiceRsrc}"/>
<property name="aggregatorPrefix" value="${project.build.directory}/deps/${aggregatorArtifact}-${project.version}"/>
<truncate file="${shimServiceFile}" create="true" mkdirs="true"/>
<property name="aggregatorBuildDir" value="${project.basedir}/../aggregator/target"/>

<condition property="should.build.conventional.jar">
Expand Down Expand Up @@ -148,6 +147,7 @@
</sequential>
</ac:for>

<truncate file="${shimServiceFile}" create="true" mkdirs="true"/>
<concat destfile="${shimServiceFile}">
<fileset dir="${project.build.directory}/parallel-world" includes="spark*/${shimServiceRsrc}"/>
</concat>
Expand Down

0 comments on commit ee6335b

Please sign in to comment.