You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by mo...@apache.org on 2017/11/30 22:25:40 UTC

reef git commit: [REEF-1963] Jar resource reef-bridge-client missing in reef/global directory

Repository: reef
Updated Branches:
  refs/heads/master 4296e20f2 -> 8d5f861ec


[REEF-1963] Jar resource reef-bridge-client missing in reef/global directory

This addressed the issue by
  * Manually Adding the file to the driver's reef/global directory in the DriverFolderPreparationHelper

JIRA:
  [REEF-1963](https://issues.apache.org/jira/browse/REEF-1963)

Pull request:
  This closes #1419


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/8d5f861e
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/8d5f861e
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/8d5f861e

Branch: refs/heads/master
Commit: 8d5f861ec4071252181f5707f007d71e4e132724
Parents: 4296e20
Author: RoganC <ro...@microsoft.com>
Authored: Fri Nov 17 16:33:38 2017 -0800
Committer: Sergiy Matusevych <mo...@apache.com>
Committed: Thu Nov 30 14:03:05 2017 -0800

----------------------------------------------------------------------
 .../Common/DriverFolderPreparationHelper.cs        | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/8d5f861e/lang/cs/Org.Apache.REEF.Client/Common/DriverFolderPreparationHelper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Common/DriverFolderPreparationHelper.cs b/lang/cs/Org.Apache.REEF.Client/Common/DriverFolderPreparationHelper.cs
index dfab211..229d9e5 100644
--- a/lang/cs/Org.Apache.REEF.Client/Common/DriverFolderPreparationHelper.cs
+++ b/lang/cs/Org.Apache.REEF.Client/Common/DriverFolderPreparationHelper.cs
@@ -56,6 +56,12 @@ namespace Org.Apache.REEF.Client.Common
         private readonly FileSets _fileSets;
         private readonly ISet<IConfigurationProvider> _driverConfigurationProviders;
 
+        /// <summary>
+        /// The folder in which we search for the client jar.
+        /// In the manner of JavaClientLauncher.cs.
+        /// </summary>
+        private const string JarFolder = "./";
+
         [Inject]
         internal DriverFolderPreparationHelper(
             REEFFileNames fileNames,
@@ -76,7 +82,7 @@ namespace Org.Apache.REEF.Client.Common
         /// <param name="driverFolderPath"></param>
         internal void PrepareDriverFolder(AppParameters appParameters, string driverFolderPath)
         {
-            Logger.Log(Level.Verbose, "Preparing Driver filesystem layout in " + driverFolderPath);
+            Logger.Log(Level.Verbose, "Preparing Driver filesystem layout in {0}", driverFolderPath);
 
             // Setup the folder structure
             CreateDefaultFolderStructure(appParameters, driverFolderPath);
@@ -84,13 +90,18 @@ namespace Org.Apache.REEF.Client.Common
             // Add the appParameters into that folder structure
             _fileSets.AddJobFiles(appParameters);
 
+            // Add the reef-bridge-client jar to the global files in the manner of JavaClientLauncher.cs.
+            _fileSets.AddToLocalFiles(Directory.GetFiles(JarFolder)
+                .Where(file => !string.IsNullOrWhiteSpace(file))
+                .Where(jarFile => Path.GetFileName(jarFile).ToLower().StartsWith(ClientConstants.ClientJarFilePrefix)));
+
             // Create the driver configuration
             CreateDriverConfiguration(appParameters, driverFolderPath);
 
             // Initiate the final copy
             _fileSets.CopyToDriverFolder(driverFolderPath);
 
-            Logger.Log(Level.Info, "Done preparing Driver filesystem layout in " + driverFolderPath);
+            Logger.Log(Level.Info, "Done preparing Driver filesystem layout in {0}", driverFolderPath);
         }
 
         /// <summary>
@@ -147,4 +158,4 @@ namespace Org.Apache.REEF.Client.Common
                 DefaultDriverConfigurationFileContents);
         }
     }
-}
\ No newline at end of file
+}