예제 #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;
  }
예제 #2
0
파일: Job.java 프로젝트: chouclee/h2o
 /**
  * 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);
 }
예제 #3
0
파일: Job.java 프로젝트: shjgiser/h2o
 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);
 }
예제 #4
0
파일: Job.java 프로젝트: shjgiser/h2o
 public void cancel() {
   cancel((String)null);
 }
예제 #5
0
 @Override
 protected void onCancelled() {
   for (Job job : jobs) job.cancel();
 }
예제 #6
0
파일: Job.java 프로젝트: pwaila/h2o
 public void cancel() {
   cancel(_self);
 }
예제 #7
0
파일: Job.java 프로젝트: chouclee/h2o
 /**
  * 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);
 }
예제 #8
0
파일: Job.java 프로젝트: chouclee/h2o
 /**
  * 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);
 }