Package org.apache.spark.network.server

Examples of org.apache.spark.network.server.TransportServer


    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 {
      server.close();
    }
  }
View Full Code Here


    return createClientFactory(Lists.<TransportClientBootstrap>newArrayList());
  }

  /** Create a server which will attempt to bind to a specific port. */
  public TransportServer createServer(int port) {
    return new TransportServer(this, port);
  }
View Full Code Here

    return new TransportServer(this, port);
  }

  /** Creates a new server, binding to any available ephemeral port. */
  public TransportServer createServer() {
    return new TransportServer(this, 0);
  }
View Full Code Here

TOP

Related Classes of org.apache.spark.network.server.TransportServer

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.