Repository: incubator-reef Updated Branches: refs/heads/master e86b5b344 -> e6e7b3b65
[REEF-233] Resolving .Net test broken issue .Net test was broken after the last merge. It was caused by the duplicated jar file during file copy. This PR is to fix this issue. After the change, all the .Net tests passed. It also fixed REEF.Client binary drop location issue and Client test also passed. JIRA: [REEF-233] https://issues.apache.org/jira/browse/REEF-233 This Closes #130 Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/e6e7b3b6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/e6e7b3b6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/e6e7b3b6 Branch: refs/heads/master Commit: e6e7b3b6579e962337e6e0e17ca96b3128bc4b99 Parents: e86b5b3 Author: Julia Wang <[email protected]> Authored: Tue Mar 31 12:04:04 2015 -0700 Committer: Markus Weimer <[email protected]> Committed: Tue Mar 31 14:17:31 2015 -0700 ---------------------------------------------------------------------- .../Org.Apache.REEF.Client.csproj | 2 +- ...e-java-0.11.0-incubating-SNAPSHOT-shaded.jar | Bin 13268150 -> 12685493 bytes lang/cs/Org.Apache.REEF.sln | Bin 19860 -> 40506 bytes .../reef/runtime/local/client/FileSet.java | 3 ++- .../runtime/local/driver/ProcessContainer.java | 2 +- .../mesos/client/MesosJobSubmissionHandler.java | 4 ++-- 6 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj index c3c94d9..eb9f995 100644 --- a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj +++ b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj @@ -17,7 +17,6 @@ under the License. --> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <Import Project="$(SolutionDir)\build.props" /> <PropertyGroup> <ProjectGuid>{5094C35B-4FDB-4322-AC05-45D684501CBF}</ProjectGuid> <OutputType>Exe</OutputType> @@ -29,6 +28,7 @@ under the License. <RestorePackages>true</RestorePackages> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..</SolutionDir> </PropertyGroup> + <Import Project="$(SolutionDir)\build.props" /> <PropertyGroup> <BuildPackage>false</BuildPackage> </PropertyGroup> http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar b/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar index 24e8b02..533b250 100644 Binary files a/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar and b/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar differ http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/cs/Org.Apache.REEF.sln ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.sln b/lang/cs/Org.Apache.REEF.sln index 981b3ad..136b0a9 100644 Binary files a/lang/cs/Org.Apache.REEF.sln and b/lang/cs/Org.Apache.REEF.sln differ http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java index df3d5cd..1461bfc 100644 --- a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java +++ b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java @@ -23,6 +23,7 @@ import org.apache.reef.tang.formats.OptionalParameter; import java.io.File; import java.io.IOException; +import java.nio.file.CopyOption; import java.nio.file.Files; import java.util.HashSet; import java.util.Set; @@ -79,7 +80,7 @@ final class FileSet { final void copyTo(final File destinationFolder) throws IOException { for (final File f : this.theFiles) { final File destinationFile = new File(destinationFolder, f.getName()); - Files.copy(f.toPath(), destinationFile.toPath()); + Files.copy(f.toPath(), destinationFile.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING); } } http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ProcessContainer.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ProcessContainer.java b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ProcessContainer.java index cdd8b90..2497ed7 100644 --- a/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ProcessContainer.java +++ b/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ProcessContainer.java @@ -93,7 +93,7 @@ final class ProcessContainer implements Container { final Path linkTargetPath = Files.readSymbolicLink(sourceFile.toPath()); Files.createSymbolicLink(destinationFile.toPath(), linkTargetPath); } else { - Files.copy(sourceFile.toPath(), destinationFile.toPath()); + Files.copy(sourceFile.toPath(), destinationFile.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING); } } } http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e6e7b3b6/lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/client/MesosJobSubmissionHandler.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/client/MesosJobSubmissionHandler.java b/lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/client/MesosJobSubmissionHandler.java index d43a855..29e1c21 100644 --- a/lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/client/MesosJobSubmissionHandler.java +++ b/lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/client/MesosJobSubmissionHandler.java @@ -94,7 +94,7 @@ final class MesosJobSubmissionHandler implements JobSubmissionHandler { for (final FileResourceProto file : jobSubmissionProto.getLocalFileList()) { final Path src = new File(file.getPath()).toPath(); final Path dst = new File(driverFolder, this.fileNames.getLocalFolderPath() + "/" + file.getName()).toPath(); - Files.copy(src, dst); + Files.copy(src, dst, java.nio.file.StandardCopyOption.REPLACE_EXISTING); } final File globalFolder = new File(reefFolder, this.fileNames.getGlobalFolderName()); @@ -102,7 +102,7 @@ final class MesosJobSubmissionHandler implements JobSubmissionHandler { for (final FileResourceProto file : jobSubmissionProto.getGlobalFileList()) { final Path src = new File(file.getPath()).toPath(); final Path dst = new File(driverFolder, this.fileNames.getGlobalFolderPath() + "/" + file.getName()).toPath(); - Files.copy(src, dst); + Files.copy(src, dst, java.nio.file.StandardCopyOption.REPLACE_EXISTING); } final Configuration driverConfiguration =
