示例#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);
 }