private Status run(JavaSparkContext sc, PrintWriter reportWriter, AlluxioConfiguration conf) {
    // Check whether Spark driver can recognize Alluxio classes and filesystem
    Status driverStatus = CheckerUtils.performIntegrationChecks();
    String driverAddress = sc.getConf().get("spark.driver.host");
    switch (driverStatus) {
      case FAIL_TO_FIND_CLASS:
        reportWriter.printf("Spark driver: %s failed to recognize Alluxio classes.%n%n",
            driverAddress);
        return driverStatus;
      case FAIL_TO_FIND_FS:
        reportWriter.printf("Spark driver: %s failed to recognize Alluxio filesystem.%n%n",
            driverAddress);
        return driverStatus;
      default:
        reportWriter.printf("Spark driver: %s can recognize Alluxio filesystem.%n%n",
            driverAddress);
        break;
    }

    if (!CheckerUtils.supportAlluxioHA(reportWriter, conf)) {
      return Status.FAIL_TO_SUPPORT_HA;
    }

    return runSparkJob(sc, reportWriter);
  }
private Status run ( JavaSparkContext sc , PrintWriter reportWriter , AlluxioConfiguration conf ) { Status driverStatus = CheckerUtils . performIntegrationChecks ( ) ; String driverAddress = sc . getConf ( ) . get ( "spark.driver.host" ) ; switch ( driverStatus ) { case FAIL_TO_FIND_CLASS : reportWriter . printf ( "Spark driver: %s failed to recognize Alluxio classes.%n%n" , driverAddress ) ; return driverStatus ; case FAIL_TO_FIND_FS : reportWriter . printf ( "Spark driver: %s failed to recognize Alluxio filesystem.%n%n" , driverAddress ) ; return driverStatus ; default : reportWriter . printf ( "Spark driver: %s can recognize Alluxio filesystem.%n%n" , driverAddress ) ; break ; } if ( ! CheckerUtils . supportAlluxioHA ( reportWriter , conf ) ) { return Status . FAIL_TO_SUPPORT_HA ; } return runSparkJob ( sc , reportWriter ) ; }
Implements Spark with Alluxio integration checker.

@param sc current JavaSparkContext
@param reportWriter save user-facing messages to a generated file
@return performIntegrationChecks results