Package org.apache.spark.network

Examples of org.apache.spark.network.ConnectionManager


  /**
   * Fixes the thread deadlock issue in {@link org.apache.spark.SparkContext#stop} where the {@link Selector} field
   * in {@link ConnectionManager} waits for an interrupt.
   */
  private static void sparkContextStopBugFixer() {
    ConnectionManager connectionManager = getConnectionManager(getSparkContext());
    if (!closeSelector(connectionManager)) {
      LOG.warn("Failed to get the Selector which can cause thread deadlock in SparkContext.stop()");
    }
  }
View Full Code Here


  /**
   * @return {@link ConnectionManager} from the {@link SparkContext}
   */
  private static ConnectionManager getConnectionManager(SparkContext sparkContext) {
    ConnectionManager connectionManager;
    if (isScalaProgram()) {
      connectionManager = ((org.apache.spark.SparkContext) sparkContext.getOriginalSparkContext()).env()
        .blockManager().connectionManager();
    } else {
      connectionManager = ((org.apache.spark.api.java.JavaSparkContext) sparkContext.getOriginalSparkContext())
View Full Code Here

TOP

Related Classes of org.apache.spark.network.ConnectionManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.