public void writeTaskIds(List<Integer> taskIds) throws IOException { writeMessage(taskIds); }
public void writeSpoutMsg(SpoutMsg msg) throws IOException { JSONObject obj = new JSONObject(); obj.put("command", msg.getCommand()); obj.put("id", msg.getId()); writeMessage(obj); }
public Number connect(Map<String, Object> conf, TopologyContext context) throws IOException, NoOutputException { JSONObject setupInfo = new JSONObject(); setupInfo.put("pidDir", context.getPIDDir()); setupInfo.put("conf", conf); setupInfo.put("context", context); writeMessage(setupInfo); Number pid = (Number) ((JSONObject) readMessage()).get("pid"); return pid; }
public void writeBoltMsg(BoltMsg boltMsg) throws IOException { JSONObject obj = new JSONObject(); obj.put("id", boltMsg.getId()); obj.put("comp", boltMsg.getComp()); obj.put("stream", boltMsg.getStream()); obj.put("task", boltMsg.getTask()); obj.put("tuple", boltMsg.getTuple()); writeMessage(obj); }
public void writeTaskIds(List<Integer> taskIds) throws IOException { writeMessage(taskIds); }
public void writeSpoutMsg(SpoutMsg msg) throws IOException { JSONObject obj = new JSONObject(); obj.put("command", msg.getCommand()); obj.put("id", msg.getId()); writeMessage(obj); }
public Number connect(Map conf, TopologyContext context) throws IOException, NoOutputException { JSONObject setupInfo = new JSONObject(); setupInfo.put("pidDir", context.getPIDDir()); setupInfo.put("conf", conf); setupInfo.put("context", context); writeMessage(setupInfo); Number pid = (Number) ((JSONObject) readMessage()).get("pid"); return pid; }
public void writeBoltMsg(BoltMsg boltMsg) throws IOException { JSONObject obj = new JSONObject(); obj.put("id", boltMsg.getId()); obj.put("comp", boltMsg.getComp()); obj.put("stream", boltMsg.getStream()); obj.put("task", boltMsg.getTask()); obj.put("tuple", boltMsg.getTuple()); writeMessage(obj); }