Package org.apache.spark.network

Examples of org.apache.spark.network.TransportContext.createServer()


  @Before
  public void beforeEach() {
    RpcHandler handler = new SaslRpcHandler(new ExternalShuffleBlockHandler(),
      new TestSecretKeyHolder("my-app-id", "secret"));
    TransportContext context = new TransportContext(conf, handler);
    this.server = context.createServer();
  }

  @After
  public void afterEach() {
    if (server != null) {
View Full Code Here


    dataContext1.insertHashShuffleData(1, 0, exec1Blocks);

    conf = new TransportConf(new SystemPropertyConfigProvider());
    handler = new ExternalShuffleBlockHandler();
    TransportContext transportContext = new TransportContext(conf, handler);
    server = transportContext.createServer();
  }

  @AfterClass
  public static void afterAll() {
    dataContext0.cleanup();
View Full Code Here

    RpcHandler handler = new TestRpcHandler();
    TransportContext context = new TransportContext(conf, handler);
    clientFactory = context.createClientFactory(
      Lists.<TransportClientBootstrap>newArrayList(
        new SaslClientBootstrap(conf, "app-id", new TestSecretKeyHolder("key"))));
    TransportServer server = context.createServer();
    try {
      clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());
    } catch (Exception e) {
      assertTrue(e.getMessage(), e.getMessage().contains("Digest-challenge format violation"));
    } finally {
View Full Code Here

    int port = conf.getInt(
      SPARK_SHUFFLE_SERVICE_PORT_KEY, DEFAULT_SPARK_SHUFFLE_SERVICE_PORT);
    TransportConf transportConf = new TransportConf(new HadoopConfigProvider(conf));
    TransportContext transportContext = new TransportContext(transportConf, rpcHandler);
    shuffleServer = transportContext.createServer(port);
    String authEnabledString = authEnabled ? "enabled" : "not enabled";
    logger.info("Started YARN shuffle service for Spark on port {}. " +
      "Authentication is {}.", port, authEnabledString);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.