MCPcopy Create free account
hub / github.com/apache/storm / open

Method open

storm-client/src/jvm/org/apache/storm/spout/ShellSpout.java:92–116  ·  view source on GitHub ↗
(Map<String, Object> topoConf, TopologyContext context,
                     SpoutOutputCollector collector)

Source from the content-addressed store, hash-verified

90 }
91
92 @Override
93 public void open(Map<String, Object> topoConf, TopologyContext context,
94 SpoutOutputCollector collector) {
95 this.collector = collector;
96 this.context = context;
97
98 if (topoConf.containsKey(Config.TOPOLOGY_SUBPROCESS_TIMEOUT_SECS)) {
99 workerTimeoutMills = 1000 * ObjectReader.getInt(topoConf.get(Config.TOPOLOGY_SUBPROCESS_TIMEOUT_SECS));
100 } else {
101 workerTimeoutMills = 1000 * ObjectReader.getInt(topoConf.get(Config.SUPERVISOR_WORKER_TIMEOUT_SECS));
102 }
103
104 process = new ShellProcess(command);
105 if (!env.isEmpty()) {
106 process.setEnv(env);
107 }
108
109 Number subpid = process.launch(topoConf, context, changeDirectory);
110 LOG.info("Launched subprocess with pid " + subpid);
111
112 logHandler = ShellUtils.getLogHandler(topoConf);
113 logHandler.setUpContext(ShellSpout.class, process, this.context);
114
115 heartBeatExecutorService = MoreExecutors.getExitingScheduledExecutorService(new ScheduledThreadPoolExecutor(1));
116 }
117
118 @Override
119 public void close() {

Callers

nothing calls this directly

Calls 8

getIntMethod · 0.95
getLogHandlerMethod · 0.95
getMethod · 0.65
setUpContextMethod · 0.65
containsKeyMethod · 0.45
isEmptyMethod · 0.45
setEnvMethod · 0.45
launchMethod · 0.45

Tested by

no test coverage detected