Hi All,
We are stuck with running our topology on Remote Machine. We have be
able to run our topology on local machine which emits tuples. But when
we try to run it on Remote Machine it does not emit tuples. Whereas the
Formation of Topology is shown on STORM UI under TOPOLOGY SUMMARY.
TOPOLOGY STATS , SPOUTS and BOLTS are visible with ZERO emits.
The Code which we have used for Running Topology on REMOTE Machine is:
LIBRARIES IMPORTS ARE -
import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.utils.Utils;
import org.json.simple.JSONValue;
import backtype.storm.StormSubmitter;
import backtype.storm.generated.AlreadyAliveException;
import backtype.storm.generated.Nimbus.Client;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.utils.NimbusClient;
import java.util.Map;
------------------------------------------------------------------------
-------------------------------------------------
TOPOLOGY PROGRAM -
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("POCspout", new POCSpout(),3);
builder.setBolt("POCbolt", new
POCBolt(),3).shuffleGrouping("POCspout");
Config conf = new Config();
conf.put(Config.NIMBUS_HOST, "192.xxx.xx.x");
conf.setDebug(true);
conf.setNumWorkers(1);
conf.setMaxSpoutPending(5000);
conf.setNumAckers(1);
conf.setMaxTaskParallelism(10);
Map storm_conf = Utils.readStormConfig();
storm_conf.put("nimbus.host", "192.xxx.xx.x");
Client client =
NimbusClient.getConfiguredClient(storm_conf).getClient();
String inputJar =
"/root/SOIM_PaVan/target/SOIMTopology-1.0-SNAPSHOT.jar";
NimbusClient nimbus = new NimbusClient(storm_conf,
"192.xxx.xx.x",6627);
String uploadedJarLocation =
StormSubmitter.submitJar(storm_conf,inputJar);
try {
String jsonConf = JSONValue.toJSONString(storm_conf);
nimbus.getClient().submitTopology("TOPOLOGYPOC",uploadedJarLocation,json
Conf,builder.createTopology());
}
catch (AlreadyAliveException ae)
{
ae.printStackTrace();
}
For any Correction in code let us know.
Regards,
Sridhar
Believe in the impossible and remove the improbable
The information contained in this transmission may contain privileged and
confidential information of Microland Limited, including information protected
by privacy laws. It is intended only for the use of Microland Limited. If you
are not the intended recipient, you are hereby notified that any review,
dissemination, distribution, or duplication of this communication is strictly
prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.