} else if (componentObject instanceof ShellComponent) { if (spouts.containsKey(component_id)) { rtn = new ShellSpout((ShellComponent) componentObject); } else { rtn = new ShellBolt((ShellComponent) componentObject);
public void ack(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("ack"); _spoutMsg.setId(msgId); querySubprocess(); }
setHeartbeat(); handleLog(shellMsg); } else if (command.equals("error")) { handleError(shellMsg.getMsg()); } else if (command.equals("emit")) { String stream = shellMsg.getStream(); handleMetrics(shellMsg); } else { throw new RuntimeException("Unknown command received: " + command);
@Override public void activate() { LOG.info("Start checking heartbeat..."); // prevent timer to check heartbeat based on last thing before activate setHeartbeat(); heartBeatExecutorService.scheduleAtFixedRate(new SpoutHeartbeatTimerTask(this), 1, 1, TimeUnit.SECONDS); }
@Override public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { super.open(conf, context, collector); CountShellMetric cMetric = new CountShellMetric(); context.registerMetric("my-custom-shellspout-metric", cMetric, 5); }
@Override public void activate() { LOG.info("Start checking heartbeat..."); // prevent timer to check heartbeat based on last thing before activate setHeartbeat(); heartBeatExecutorService.scheduleAtFixedRate(new SpoutHeartbeatTimerTask(this), 1, 1, TimeUnit.SECONDS); }
@Override public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { super.open(conf, context, collector); CountShellMetric cMetric = new CountShellMetric(); context.registerMetric("my-custom-shellspout-metric", cMetric, 5); }
public void nextTuple() { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("next"); _spoutMsg.setId(""); querySubprocess(); }
setHeartbeat(); handleLog(shellMsg); } else if (command.equals("error")) { handleError(shellMsg.getMsg()); } else if (command.equals("emit")) { String stream = shellMsg.getStream(); handleMetrics(shellMsg); } else { throw new RuntimeException("Unknown command received: " + command);
}else if (componentObject instanceof ShellComponent) { if (spouts.containsKey(component_id)) { rtn=new ShellSpout((ShellComponent) componentObject); } else { rtn= new ShellBolt((ShellComponent) componentObject);
public void fail(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("fail"); _spoutMsg.setId(msgId); querySubprocess(); }
} else if (componentObject instanceof ShellComponent) { if (spouts.containsKey(component_id)) { rtn = new ShellSpout((ShellComponent) componentObject); } else { rtn = new ShellBolt((ShellComponent) componentObject);
public void ack(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("ack"); _spoutMsg.setId(msgId); querySubprocess(); }
public void fail(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("fail"); _spoutMsg.setId(msgId); querySubprocess(); }
public void nextTuple() { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("next"); _spoutMsg.setId(""); querySubprocess(); }
public void fail(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("fail"); _spoutMsg.setId(msgId); querySubprocess(); }
public void ack(Object msgId) { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("ack"); _spoutMsg.setId(msgId); querySubprocess(); }
public void nextTuple() { if (_spoutMsg == null) { _spoutMsg = new SpoutMsg(); } _spoutMsg.setCommand("next"); _spoutMsg.setId(""); querySubprocess(); }