This commit is contained in:
Eric Pugh 2020-04-02 11:38:15 -04:00 committed by GitHub
parent f779bc632d
commit 927587d8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -245,9 +245,9 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
daemons.remove(daemonStream.getId()).close();
}
daemonStream.setDaemons(daemons);
daemonStream.open(); // This will start the deamonStream
daemonStream.open(); // This will start the daemonStream
daemons.put(daemonStream.getId(), daemonStream);
rsp.add("result-set", new DaemonResponseStream("Deamon:" + daemonStream.getId() + " started on " + coreName));
rsp.add("result-set", new DaemonResponseStream("Daemon:" + daemonStream.getId() + " started on " + coreName));
} else {
rsp.add("result-set", new TimerStream(new ExceptionStream(tupleStream)));
}
@ -269,14 +269,14 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
String id = params.get(ID);
DaemonStream d = daemons.get(id);
if (d == null) {
rsp.add("result-set", new DaemonResponseStream("Deamon:" + id + " not found on " + coreName));
rsp.add("result-set", new DaemonResponseStream("Daemon:" + id + " not found on " + coreName));
return;
}
switch (action) {
case "stop":
d.close();
rsp.add("result-set", new DaemonResponseStream("Deamon:" + id + " stopped on " + coreName));
rsp.add("result-set", new DaemonResponseStream("Daemon:" + id + " stopped on " + coreName));
break;
case "start":
@ -285,17 +285,17 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
} catch (IOException e) {
rsp.add("result-set", new DaemonResponseStream("Daemon: " + id + " error: " + e.getMessage()));
}
rsp.add("result-set", new DaemonResponseStream("Deamon:" + id + " started on " + coreName));
rsp.add("result-set", new DaemonResponseStream("Daemon:" + id + " started on " + coreName));
break;
case "kill":
daemons.remove(id);
d.close(); // we already found it in the daemons list, so we don't need to verify we removed it.
rsp.add("result-set", new DaemonResponseStream("Deamon:" + id + " killed on " + coreName));
rsp.add("result-set", new DaemonResponseStream("Daemon:" + id + " killed on " + coreName));
break;
default:
rsp.add("result-set", new DaemonResponseStream("Deamon:" + id + " action '"
rsp.add("result-set", new DaemonResponseStream("Daemon:" + id + " action '"
+ action + "' not recognized on " + coreName));
break;
}