@SuppressWarnings("unused") // called through reflection by RequestServer public RemoveAllV3 remove(int version, RemoveAllV3 u) { Log.info("Removing all objects"); Futures fs = new Futures(); for (Job j : Job.jobs()) { j.cancel(); j.remove(fs); } fs.blockForPending(); // Bulk brainless key removal. Completely wipes all Keys without regard. new MRTask() { @Override public byte priority() { return H2O.GUI_PRIORITY; } @Override public void setupLocal() { H2O.raw_clear(); water.fvec.Vec.ESPC.clear(); } }.doAllNodes(); Log.info("Finished removing objects"); return u; }
/** * Signal exceptional cancellation of this job. * * @param ex exception causing the termination of job. */ public void cancel(Throwable ex) { if (ex instanceof JobCancelledException || ex.getMessage() != null && ex.getMessage().contains("job was cancelled")) return; if (ex instanceof IllegalArgumentException || ex.getCause() instanceof IllegalArgumentException) { cancel("Illegal argument: " + ex.getMessage()); return; } StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); String stackTrace = sw.toString(); cancel( "Got exception '" + ex.getClass() + "', with msg '" + ex.getMessage() + "'\n" + stackTrace, JobState.FAILED); if (_fjtask != null && !_fjtask.isDone()) _fjtask.completeExceptionally(ex); }
public void cancel(Throwable ex){ ex.printStackTrace(); if(_fjtask != null && !_fjtask.isDone())_fjtask.completeExceptionally(ex); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); String stackTrace = sw.toString(); cancel("Got exception '" + ex.getClass() + "', with msg '" + ex.getMessage() + "'\n" + stackTrace); }
public void cancel() { cancel((String)null); }
@Override protected void onCancelled() { for (Job job : jobs) job.cancel(); }
public void cancel() { cancel(_self); }
/** * Signal exceptional cancellation of this job. * * @param msg cancellation message explaining reason for cancelation */ public void cancel(final String msg) { JobState js = msg == null ? JobState.CANCELLED : JobState.FAILED; cancel(msg, js); }
/** * Signal cancellation of this job. * * <p>The job will be switched to state {@link JobState#CANCELLED} which signals that the job was * cancelled by a user. */ public void cancel() { cancel((String) null, JobState.CANCELLED); }