use of water.util.RemoveAllKeysTask in project h2o-2 by h2oai.
the class Cookbook method removeAllKeys.
@Before
public void removeAllKeys() {
Log.info("Removing all keys...");
RemoveAllKeysTask collector = new RemoveAllKeysTask();
collector.invokeOnAllNodes();
Log.info("Removed all keys.");
}
use of water.util.RemoveAllKeysTask in project h2o-2 by h2oai.
the class RemoveAll method serve.
@Override
protected Response serve() {
try {
Log.info("Removing all keys for the cluster");
// First cancel all jobs and wait for them to be done.
Log.info("Cancelling all jobs...");
for (Job job : Job.all()) {
job.cancel();
Job.waitUntilJobEnded(job.self());
}
Log.info("Finished cancelling all jobs");
RemoveAllKeysTask collector = new RemoveAllKeysTask();
collector.invokeOnAllNodes();
Log.info("Finished removing keys");
} catch (Throwable e) {
return Response.error(e);
}
JsonObject response = new JsonObject();
return Response.done(response);
}
Aggregations