Example #1
0
  @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;
  }
Example #2
0
 /**
  * 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);
 }
Example #3
0
 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);
 }
Example #4
0
 public void cancel() {
   cancel((String)null);
 }
Example #5
0
 @Override
 protected void onCancelled() {
   for (Job job : jobs) job.cancel();
 }
Example #6
0
File: Job.java Project: pwaila/h2o
 public void cancel() {
   cancel(_self);
 }
Example #7
0
 /**
  * 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);
 }
Example #8
0
 /**
  * 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);
 }