Code clean up
This commit is contained in:
Родитель
7e879e1180
Коммит
13a27e3eb6
|
@ -1,16 +1,19 @@
|
|||
using System.Reflection;
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("shell")]
|
||||
[assembly: AssemblyTitle("Microsoft.Spark.CSharp.Repl")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("shell")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation")]
|
||||
[assembly: AssemblyProduct("Microsoft Mobius")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +35,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.6.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.1.0")]
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using System.Reflection;
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -6,11 +9,11 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ReplTest")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyDescription("Tests for REPL implementation in Mobius")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ReplTest")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation")]
|
||||
[assembly: AssemblyProduct("Microsoft Mobius")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +35,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.6.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.1.0")]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
VisualStudioVersion = 12.0.30501.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adapter", "Adapter\Microsoft.Spark.CSharp\Adapter.csproj", "{CE999A96-F42B-4E80-B208-709D7F49A77C}"
|
||||
EndProject
|
||||
|
|
|
@ -83,9 +83,10 @@ namespace Microsoft.Spark.CSharp
|
|||
// can't initialize logger early because in MultiThreadWorker mode, JVM will read C#'s stdout via
|
||||
// pipe. When initialize logger, some unwanted info will be flushed to stdout. But we can still
|
||||
// use stderr
|
||||
Console.Error.WriteLine("input args: [{0}]", string.Join(" ", args));
|
||||
Console.Error.WriteLine("input args: [{0}] SocketWrapper: [{1}]",
|
||||
string.Join(" ", args), SocketFactory.SocketWrapperType);
|
||||
|
||||
if (args.Count() != 2)
|
||||
if (args.Length != 2)
|
||||
{
|
||||
Console.Error.WriteLine("Wrong number of args: {0}, will exit", args.Count());
|
||||
Environment.Exit(-1);
|
||||
|
@ -93,6 +94,14 @@ namespace Microsoft.Spark.CSharp
|
|||
|
||||
if ("pyspark.daemon".Equals(args[1]))
|
||||
{
|
||||
if (SocketFactory.SocketWrapperType == SocketWrapperType.Rio)
|
||||
{
|
||||
// In daemon mode, the socket will be used as server.
|
||||
// Use ThreadPool to retrieve RIO socket results has good performance
|
||||
// than a single thread.
|
||||
RioNative.SetUseThreadPool(true);
|
||||
}
|
||||
|
||||
var multiThreadWorker = new MultiThreadWorker();
|
||||
multiThreadWorker.Run();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
pushd %~dp0
|
||||
rem Copyright (c) Microsoft. All rights reserved.
|
||||
rem Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
set MICROSOFT_NET_COMPILERS_VERSION=1.1.1
|
||||
|
||||
sparkclr-submit.cmd --conf spark.local.dir=%temp% --name SparkCLR_REPL %* --exe Repl.exe %SPARKCLR_HOME%\repl
|
||||
|
||||
popd
|
||||
%SPARKCLR_HOME%\scripts\sparkclr-submit.cmd --name MobiusShell %* --exe Repl.exe %SPARKCLR_HOME%\repl
|
Загрузка…
Ссылка в новой задаче