public void processComplete(OptimizingType processType, boolean success, long planTime) {
    processTotalCount.inc();
    Counter totalCounter = null;
    Counter failedCounter = null;
    switch (processType) {
      case MINOR:
        totalCounter = minorTotalCount;
        failedCounter = minorFailedCount;
        break;
      case MAJOR:
        totalCounter = majorTotalCount;
        failedCounter = majorFailedCount;
        break;
      case FULL:
        totalCounter = fullTotalCount;
        failedCounter = fullFailedCount;
        break;
    }
    if (success) {
      lastOptimizingTime(processType, planTime);
    }
    if (totalCounter != null) {
      totalCounter.inc();
    }
    if (!success && failedCounter != null) {
      failedCounter.inc();
    }
  }
Handle table self optimizing process completed event.

@param processType optimizing process type.
@param success is optimizing process success.
amoro-ams/src/main/java/org/apache/amoro/server/table/TableOptimizingMetrics.java