Search in sources :

Example 1 with IdleMonitorService

use of com.thinkbiganalytics.spark.service.IdleMonitorService in project kylo by Teradata.

the class SparkShellApp method idleMonitorService.

/**
 * Creates a service to stop this app after a period of inactivity.
 */
@Bean
public IdleMonitorService idleMonitorService(final SparkShellOptions parameters) {
    final IdleMonitorService idleMonitorService = new IdleMonitorService(parameters.getIdleTimeout(), TimeUnit.SECONDS);
    idleMonitorService.startAsync();
    return idleMonitorService;
}
Also used : IdleMonitorService(com.thinkbiganalytics.spark.service.IdleMonitorService) Bean(org.springframework.context.annotation.Bean)

Example 2 with IdleMonitorService

use of com.thinkbiganalytics.spark.service.IdleMonitorService in project kylo by Teradata.

the class KyloShellConfig method idleMonitorService.

/**
 * Creates a service to stop this app after a period of inactivity.
 */
@Bean
public IdleMonitorService idleMonitorService(final SparkShellOptions parameters) {
    final IdleMonitorService idleMonitorService = new IdleMonitorService(parameters.getIdleTimeout(), TimeUnit.SECONDS);
    idleMonitorService.startAsync();
    return idleMonitorService;
}
Also used : IdleMonitorService(com.thinkbiganalytics.spark.service.IdleMonitorService) Bean(org.springframework.context.annotation.Bean)

Aggregations

IdleMonitorService (com.thinkbiganalytics.spark.service.IdleMonitorService)2 Bean (org.springframework.context.annotation.Bean)2