I tried setting stormConfig.put(Config.WORKER_HEAP_MEMORY_MB, 1024); and now *all topologies* Assigned memory is 0MB. Does anyone know why it works this way? How do we assign memory to topologies in this situation?
On Wed, Jul 13, 2016 at 10:39 AM, Navin Ipe <navin....@searchlighthealth.com > wrote: > Hi, > > I have a program *MyProg.java* inside which I'm creating 5 topologies and > using *stormSubmitter* to submit it to Storm. The storm UI shows the > assigned memory for each topology as: > *Assigned Mem (MB)* > 832 > 0 > 832 > 832 > 832 > > One of the topologies was assigned 0MB. Assuming that it was because of > setting a single Config for all of them, I gave them separate configs (as > below), but nothing changed. > > *StormConfigFactory stormConfigFactory = new StormConfigFactory();* > > > > > > > *StormSubmitter.submitTopology(upTopologyName, > stormConfigFactory.GetNewConfig(), > upBuilder.createTopology());StormSubmitter.submitTopology(viTopologyName, > stormConfigFactory.GetNewConfig(), > viBuilder.createTopology());StormSubmitter.submitTopology(prTopologyName, > stormConfigFactory.GetNewConfig(), > prBuilder.createTopology());StormSubmitter.submitTopology(opTopologyName, > stormConfigFactory.GetNewConfig(), > opBuilder.createTopology());StormSubmitter.submitTopology(poTopologyName, > stormConfigFactory.GetNewConfig(), poBuilder.createTopology());* > > > > > > > > > > > > > > > > > > > > *And the StormConfigFactory class:public class StormConfigFactory { > public Config GetNewConfig() { Config stormConfig = new > Config(); stormConfig.setNumWorkers(1); > stormConfig.setNumAckers(1); > stormConfig.put(Config.TOPOLOGY_DEBUG, false); > stormConfig.put(Config.TOPOLOGY_TRANSFER_BUFFER_SIZE, 64); > stormConfig.put(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE, > 65536); > stormConfig.put(Config.TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE, > 65536); stormConfig.put(Config.TOPOLOGY_MAX_SPOUT_PENDING, > 50); stormConfig.put(Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS, > 60); stormConfig.put(Config.STORM_ZOOKEEPER_SERVERS, > Arrays.asList(new String[]{"localhost"})); > return stormConfig; }}* > > > *How do I allocate separate memory and workers for each topology?* > > -- > Regards, > Navin > -- Regards, Navin