public void TestStop() { var mockSparkSessionProxy = new Mock<ISparkSessionProxy>(); var sparkSession = new SparkSession(mockSparkSessionProxy.Object); sparkSession.Stop(); mockSparkSessionProxy.Verify(m => m.Stop(), Times.Once); }
public void TestRead() { var mockSparkSessionProxy = new Mock<ISparkSessionProxy>(); var sparkSession = new SparkSession(mockSparkSessionProxy.Object); var reader = sparkSession.Read(); mockSparkSessionProxy.Verify(m => m.Read(), Times.Once); }
internal SqlContext(SparkSession sparkSession, bool isRootContext) { this.sparkSession = sparkSession; this.sparkContext = sparkSession.SparkContext; this.sqlContextProxy = sparkSession.SparkSessionProxy.SqlContextProxy; this.isRootContext = isRootContext; if (instance == null) { instance = this; } }
/// <summary> /// Creates a HiveContext /// </summary> /// <param name="sparkContext"></param> public HiveContext(SparkContext sparkContext) : base(SparkSession.Builder().Config(sparkContext.SparkConf).EnableHiveSupport().GetOrCreate()) { }
internal SqlContext(SparkSession sparkSession) : this(sparkSession, true) { }