Example usage for org.apache.spark.network TransportContext createClientFactory

List of usage examples for org.apache.spark.network TransportContext createClientFactory

Introduction

In this page you can find the example usage for org.apache.spark.network TransportContext createClientFactory.

Prototype

public TransportClientFactory createClientFactory() 

Source Link

Usage

From source file:org.apache.sysml.runtime.controlprogram.paramserv.rpc.PSRpcFactory.java

License:Apache License

public static SparkPSProxy createSparkPSProxy(SparkConf conf, int port, LongAccumulator aRPC)
        throws IOException {
    long rpcTimeout = conf.contains("spark.rpc.askTimeout") ? conf.getTimeAsMs("spark.rpc.askTimeout")
            : conf.getTimeAsMs("spark.network.timeout", "120s");
    String host = conf.get("spark.driver.host");
    TransportContext context = createTransportContext(conf, new LocalParamServer());
    return new SparkPSProxy(context.createClientFactory().createClient(host, port), rpcTimeout, aRPC);
}