public void TestSignaturesV2_3_X() { SparkContext sc = SparkContext.GetOrCreate(new SparkConf()); Assert.IsType <SparkConf>(sc.GetConf()); Assert.IsType <int>(sc.DefaultParallelism); sc.SetJobDescription("job description"); sc.SetLogLevel("ALL"); sc.SetLogLevel("debug"); Assert.Throws <Exception>(() => sc.SetLogLevel("INVALID")); sc.SetJobGroup("group id", "description"); sc.SetJobGroup("group id", "description", true); sc.ClearJobGroup(); string filePath = $"{TestEnvironment.ResourceDirectory}people.txt"; sc.AddFile(filePath); sc.AddFile(filePath, true); using var tempDir = new TemporaryDirectory(); sc.SetCheckpointDir(TestEnvironment.ResourceDirectory); }
public RoslynScriptEngine(SparkContext sc, SqlContext sqlContext) { this.sc = sc; sparkConf = sc.GetConf(); host = new SparkCLRHost { sc = sc, sqlContext = sqlContext }; var sparkLocalDir = sparkConf.Get("spark.local.dir", Path.GetTempPath()); compilationDumpDirectory = Path.Combine(sparkLocalDir, Path.GetRandomFileName()); Directory.CreateDirectory(compilationDumpDirectory); options = new CSharpParseOptions(LanguageVersion.CSharp6, DocumentationMode.Parse, SourceCodeKind.Script); }
public void TestSignaturesV2_3_X() { SparkContext sc = SparkContext.GetOrCreate(new SparkConf()); _ = sc.GetConf(); _ = sc.DefaultParallelism; sc.SetJobDescription("job description"); sc.SetJobGroup("group id", "description"); sc.SetJobGroup("group id", "description", true); sc.ClearJobGroup(); string filePath = TestEnvironment.ResourceDirectory + "people.txt"; sc.AddFile(filePath); sc.AddFile(filePath, true); sc.SetCheckpointDir(TestEnvironment.ResourceDirectory); }