storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Starace <pa...@sciamlab.com>
Subject Read timed out executing remote Trident DRPC call
Date Thu, 18 Feb 2016 08:58:08 GMT
Hi all
I'm quite new to Storm and I'm trying to execute a remote call to a Trident
DRPC topology.

This is the code of the topology:

public static void main(String[] args) throws Exception {

Config conf = new Config();

if (args != null && args.length > 0) {

conf.setNumWorkers(3);

StormSubmitter.submitTopologyWithProgressBar(args[0], conf,
buildTopology(null));

} else {

LocalDRPC drpc = new LocalDRPC();

LocalCluster cluster = new LocalCluster();

cluster.submitTopology("drpc-demo", conf, buildTopology(drpc));

String result = drpc.execute("words", "hello paolo");

System.out.println("Results for 'hello':" + result);

cluster.shutdown();

drpc.shutdown();

}

}
private static StormTopology buildTopology(LocalDRPC drpc) {

TridentTopology topology = new TridentTopology();
topology.newDRPCStream("words", drpc)

.each(new Fields("args"), new Split(), new Fields("word"))

.each(new Fields("word"), new Exclaim(), new Fields("exclaim1"))

.each(new Fields("exclaim1"), new Exclaim(), new Fields("exclaim2"));

return topology.build();

}

This is the code I'm using to call the remote DRPC server in a separated
project:

public static void main(String[] args) throws Exception {

Config conf = new Config();
// conf.setDebug(true);
conf.put("storm.thrift.transport",
"backtype.storm.security.auth.SimpleTransportPlugin");
conf.put(Config.STORM_NIMBUS_RETRY_TIMES, 3);
conf.put(Config.STORM_NIMBUS_RETRY_INTERVAL, 10);
conf.put(Config.STORM_NIMBUS_RETRY_INTERVAL_CEILING, 20);
conf.put(Config.DRPC_MAX_BUFFER_SIZE, 1213486160);

DRPCClient drpc = new DRPCClient(conf, "drpc.example.com", 3772, 5000);
String result = drpc.execute("words", "hello paolo");
System.out.println("Results for 'hello':" + result);

}

I started all nimbus, supervisors, ui and drpc servers.

[image: Inline image 1]

This is the error I get on the console of the client:
559  [main] INFO  b.s.u.Utils - Using defaults.yaml from resources
646  [main] INFO  b.s.u.StormBoundedExponentialBackoffRetry - The
baseSleepTimeMs [10] the maxSleepTimeMs [20] the maxRetries [3]
Exception in thread "main"
org.apache.thrift7.transport.TTransportException:
java.net.SocketTimeoutException: Read timed out

And this is the error I get on the server drpc.log:
2016-02-17 16:48:45.739 b.s.d.drpc [WARN] Timeout DRPC request id: 9 start
at 1455723520


The local cluster conf runs without errors.

Any idea about?

Thanks
Paolo

Mime
View raw message