Example #1
0
 /// <summary>
 /// Creates a Builder object for SparkSession.
 /// </summary>
 /// <returns>Builder object</returns>
 public static Builder Builder()
 {
     // We could try to detect if we don't have jvm bridge,
     // call the helper to launch jvm bridge process.
     if ((s_jvmbridge == null) &&
         (JVMBridgeHelper.IsDotnetBackendPortUsing() == false))
     {
         s_jvmbridge = new JVMBridgeHelper();
     }
     return(new Builder());
 }
Example #2
0
        /// <summary>
        /// Stops the underlying SparkContext.
        /// </summary>
        public void Stop()
        {
            _jvmObject.Invoke("stop");

            // if we have created the jvm bridge process, dispose it now.
            if (s_jvmbridge != null)
            {
                s_jvmbridge.Dispose();
                s_jvmbridge = null;
            }
        }