Merge branch 'master' of https://github.com/microsoft/SparkCLR
This commit is contained in:
Коммит
14351c0617
|
@ -24,9 +24,9 @@ namespace Microsoft.Spark.CSharp.Samples
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
ProcessArugments(args);
|
|
||||||
LoggerServiceFactory.SetLoggerService(Log4NetLoggerService.Instance); //this is optional - DefaultLoggerService will be used if not set
|
LoggerServiceFactory.SetLoggerService(Log4NetLoggerService.Instance); //this is optional - DefaultLoggerService will be used if not set
|
||||||
Logger = LoggerServiceFactory.GetLogger(typeof(SparkCLRSamples));
|
Logger = LoggerServiceFactory.GetLogger(typeof(SparkCLRSamples));
|
||||||
|
ProcessArugments(args);
|
||||||
SparkContext = CreateSparkContext();
|
SparkContext = CreateSparkContext();
|
||||||
SparkContext.SetCheckpointDir(Path.GetTempPath());
|
SparkContext.SetCheckpointDir(Path.GetTempPath());
|
||||||
RunSamples();
|
RunSamples();
|
||||||
|
|
|
@ -35,25 +35,21 @@ object CSharpRunner {
|
||||||
var otherArgs: Array[String] = null
|
var otherArgs: Array[String] = null
|
||||||
|
|
||||||
if (!runInDebugMode) {
|
if (!runInDebugMode) {
|
||||||
|
|
||||||
if(args(0).toLowerCase().endsWith(".zip")) {
|
if(args(0).toLowerCase().endsWith(".zip")) {
|
||||||
|
|
||||||
println("Unzipping driver!")
|
println("Unzipping driver!")
|
||||||
CSharpSparkUtils.unzip(new File(args(0)), new File(args(0)).getParentFile)
|
CSharpSparkUtils.unzip(new File(args(0)), new File(args(0)).getParentFile)
|
||||||
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
|
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
|
||||||
otherArgs = args.slice(2, args.length)
|
otherArgs = args.slice(2, args.length)
|
||||||
|
} else if(new File(args(0)).isDirectory) {
|
||||||
}else if(new File(args(0)).isDirectory){
|
|
||||||
// In local mode, there will no zip file generated if given a directory, skip uncompression in this case
|
// In local mode, there will no zip file generated if given a directory, skip uncompression in this case
|
||||||
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
|
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
|
||||||
otherArgs = args.slice(2, args.length)
|
otherArgs = args.slice(2, args.length)
|
||||||
|
} else {
|
||||||
}else {
|
|
||||||
|
|
||||||
csharpExecutable = PythonRunner.formatPath(args(0))
|
csharpExecutable = PythonRunner.formatPath(args(0))
|
||||||
otherArgs = args.slice(1, args.length)
|
otherArgs = args.slice(1, args.length)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
otherArgs = args.slice(1, args.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
var processParameters = new java.util.ArrayList[String]()
|
var processParameters = new java.util.ArrayList[String]()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче