use of water.Job in project h2o-2 by h2oai.
the class NeuralNetProgressPage method toHTML.
@Override
public boolean toHTML(StringBuilder sb) {
Job jjob = Job.findJob(job_key);
if (jjob == null)
return true;
NeuralNet.NeuralNetModel m = UKV.get(jjob.dest());
if (m != null)
m.generateHTML("NeuralNet Model", sb);
else
DocGen.HTML.paragraph(sb, "Pending...");
return true;
}
use of water.Job 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);
}
use of water.Job in project h2o-3 by h2oai.
the class RemoveAllHandler method remove.
// called through reflection by RequestServer
@SuppressWarnings("unused")
public RemoveAllV3 remove(int version, RemoveAllV3 u) {
Log.info("Removing all objects");
Futures fs = new Futures();
// Cancel and remove leftover running jobs
for (Job j : Job.jobs()) {
j.stop_requested();
j.remove(fs);
}
// Wipe out any and all session info
if (RapidsHandler.SESSIONS != null) {
for (String k : RapidsHandler.SESSIONS.keySet()) (RapidsHandler.SESSIONS.get(k)).endQuietly(null);
RapidsHandler.SESSIONS.clear();
}
fs.blockForPending();
// Bulk brainless key removal. Completely wipes all Keys without regard.
new MRTask(H2O.MIN_HI_PRIORITY) {
@Override
public void setupLocal() {
H2O.raw_clear();
water.fvec.Vec.ESPC.clear();
}
}.doAllNodes();
// Wipe the backing store without regard as well
H2O.getPM().getIce().cleanUp();
Log.info("Finished removing objects");
return u;
}
use of water.Job in project h2o-3 by h2oai.
the class SplitFrameHandler method run.
public SplitFrameV3 run(int version, SplitFrameV3 sf) {
SplitFrame splitFrame = sf.createAndFillImpl();
Job job = splitFrame.exec();
SplitFrameV3 spv3 = new SplitFrameV3(splitFrame);
spv3.key = new KeyV3.JobKeyV3(job._key);
return spv3;
}
use of water.Job in project h2o-2 by h2oai.
the class SpeeDRFProgressPage method toHTML.
@Override
public boolean toHTML(StringBuilder sb) {
Job jjob = Job.findJob(job_key);
if (jjob == null)
return true;
Value v = DKV.get(jjob.dest());
if (v != null) {
SpeeDRFModel m = v.get();
m.generateHTML("SpeeDRF", sb);
} else
sb.append("<b>No model yet.</b>");
return true;
}
Aggregations