This commit is contained in:
tawan 2015-11-11 17:20:01 +08:00
Родитель 2cc82bcc04 ce87d34f8e
Коммит 14351c0617
2 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -24,9 +24,9 @@ namespace Microsoft.Spark.CSharp.Samples
static void Main(string[] args)
{
ProcessArugments(args);
LoggerServiceFactory.SetLoggerService(Log4NetLoggerService.Instance); //this is optional - DefaultLoggerService will be used if not set
Logger = LoggerServiceFactory.GetLogger(typeof(SparkCLRSamples));
ProcessArugments(args);
SparkContext = CreateSparkContext();
SparkContext.SetCheckpointDir(Path.GetTempPath());
RunSamples();

Просмотреть файл

@ -35,25 +35,21 @@ object CSharpRunner {
var otherArgs: Array[String] = null
if (!runInDebugMode) {
if(args(0).toLowerCase().endsWith(".zip")) {
println("Unzipping driver!")
CSharpSparkUtils.unzip(new File(args(0)), new File(args(0)).getParentFile)
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
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
csharpExecutable = PythonRunner.formatPath(args(1)) //reusing windows-specific formatting in PythonRunner
otherArgs = args.slice(2, args.length)
}else {
} else {
csharpExecutable = PythonRunner.formatPath(args(0))
otherArgs = args.slice(1, args.length)
}
} else {
otherArgs = args.slice(1, args.length)
}
var processParameters = new java.util.ArrayList[String]()