You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by do...@apache.org on 2015/10/11 20:10:27 UTC

incubator-reef git commit: [REEF-752] Remove code obsoleted in REEF-735

Repository: incubator-reef
Updated Branches:
  refs/heads/master beff499dc -> 7fc52a417


[REEF-752] Remove code obsoleted in REEF-735

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

Pull request:
  This closes #549


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

Branch: refs/heads/master
Commit: 7fc52a417f33d511f184a972d6b91e16eb491eef
Parents: beff499
Author: Mariia Mykhailova <ma...@apache.org>
Authored: Wed Oct 7 16:37:07 2015 -0700
Committer: Dongjoon Hyun <do...@apache.org>
Committed: Mon Oct 12 02:55:48 2015 +0900

----------------------------------------------------------------------
 .../Bridge/ClrClientHelper.cs                   | 91 --------------------
 1 file changed, 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7fc52a41/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
index 72b740a..c0f90a9 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
@@ -32,97 +32,6 @@ namespace Org.Apache.REEF.Driver.Bridge
     {
         private static readonly Logger LOGGER = Logger.GetLogger(typeof(ClrClientHelper));
 
-        [Obsolete("please use ReefClient API")]
-        public static void Run(HashSet<string> appDlls, IConfiguration driverBridgeConfig,
-            DriverSubmissionSettings driverSubmissionSettings, string reefJar = Constants.JavaBridgeJarFileName,
-            string runCommand = "run.cmd", string clrFolder = ".", string className = Constants.BridgeLaunchClass)
-        {
-            using (LOGGER.LogFunction("ClrHandlerHelper::Run"))
-            {
-                if (driverSubmissionSettings.Submit)
-                {
-                    ClrHandlerHelper.CopyDllsToAppDirectory(appDlls);
-                    UpdateJarFileWithAssemblies(reefJar);
-                }
-
-                using (LOGGER.LogScope("ClrHandlerHelper::serialize driverBridgeConfig to clrRuntimeConfigFile"))
-                {
-                    var clrRuntimeConfigFile = Path.Combine(clrFolder, Constants.DriverBridgeConfiguration);
-                    new AvroConfigurationSerializer().ToFile(driverBridgeConfig, clrRuntimeConfigFile);
-                    LOGGER.Log(Level.Info, "CLR driver bridge configurations written to " + clrRuntimeConfigFile);
-                }
-
-                var startInfo = new ProcessStartInfo();
-                if (driverSubmissionSettings.RunOnYarn)
-                {
-                    startInfo.FileName = runCommand;
-                    startInfo.Arguments = className + " " + clrFolder +
-                                          driverSubmissionSettings.ToComamndLineArguments();
-                }
-                else
-                {
-                    startInfo.FileName = GetJavaBinary();
-                    var loggingPrefix = string.Empty;
-                    if (driverSubmissionSettings.JavaLogLevel == JavaLoggingSetting.VERBOSE_TO_CLR)
-                    {
-                        loggingPrefix = Constants.JavaToCLRLoggingConfig + " ";
-                    }
-                    else if (driverSubmissionSettings.JavaLogLevel == JavaLoggingSetting.VERBOSE)
-                    {
-                        loggingPrefix = Constants.JavaVerboseLoggingConfig + " ";
-                    }
-                    startInfo.Arguments = loggingPrefix + @"-classpath " + reefJar + " " + Constants.BridgeLaunchClass +
-                                          " " + clrFolder + " " + driverSubmissionSettings.ToComamndLineArguments();
-                }
-                startInfo.RedirectStandardOutput = true;
-                startInfo.UseShellExecute = false;
-                startInfo.CreateNoWindow = false;
-                LOGGER.Log(Level.Info, "Executing\r\n" + startInfo.FileName + "\r\n" + startInfo.Arguments);
-                using (var process = Process.Start(startInfo))
-                {
-                    process.WaitForExit();
-                }
-            }
-        }
-
-        [Obsolete("please use ReefClient API")]
-        public static void UpdateJarFileWithAssemblies(string reefJar)
-        {
-            using (LOGGER.LogFunction("ClrHandlerHelper::UpdateJarFileWithAssemblies"))
-            {
-                var assembliesList = ClrHandlerHelper.GetAssembliesListForReefDriverApp();
-                if (!File.Exists(reefJar))
-                {
-                    throw new InvalidOperationException("cannot find reef jar file: " + reefJar);
-                }
-                var startInfo = new ProcessStartInfo
-                {
-                    FileName = GetJarBinary(),
-                    Arguments = @"uf " + reefJar + " " + assembliesList,
-                    RedirectStandardOutput = true,
-                    RedirectStandardError = true,
-                    UseShellExecute = false,
-                    CreateNoWindow = true
-                };
-
-                LOGGER.Log(Level.Info, "updating jar file with \r\n" + startInfo.FileName + "\r\n" + startInfo.Arguments);
-                using (var process = Process.Start(startInfo))
-                {
-                    var outReader = process.StandardOutput;
-                    var errorReader = process.StandardError;
-                    var output = outReader.ReadToEnd();
-                    var error = errorReader.ReadToEnd();
-                    process.WaitForExit();
-                    if (process.ExitCode != 0)
-                    {
-                        throw new InvalidOperationException("Failed to update jar file with stdout :" + output +
-                                                            "and stderr:" + error);
-                    }
-                }
-                LOGGER.Log(Level.Info, "jar file updated.");
-            }
-        }
-
         public static void ExtractConfigfileFromJar(string reefJar, IList<string> configFiles, string dropFolder)
         {
             var configFileNames = string.Join(" ", configFiles.ToArray());