Search in sources :

Example 1 with LivyHeartbeatMonitor

use of com.thinkbiganalytics.kylo.spark.client.livy.LivyHeartbeatMonitor in project kylo by Teradata.

the class SparkLivyConfig method livyHeartbeatMonitor.

@Bean
public LivyHeartbeatMonitor livyHeartbeatMonitor() {
    // LivyHeartbeatMonitor gets it's own jersey client
    LivyProperties livyProperties = livyProperties();
    final JerseyClientConfig config = new JerseyClientConfig();
    config.setHost(livyProperties.getHostname());
    config.setPort(livyProperties.getPort());
    if (livyProperties().getTruststorePassword() != null) {
        config.setHttps(true);
        config.setTruststorePath(livyProperties.getTruststorePath());
        config.setTruststorePassword(livyProperties.getTruststorePassword());
        config.setTrustStoreType(livyProperties.getTruststoreType());
    }
    // end if
    // all clients will have kerberos
    LivyRestClient.setKerberosSparkProperties(kerberosSparkProperties());
    JerseyRestClient livyRestClient = new LivyRestClient(config);
    return new LivyHeartbeatMonitor(livyClient(), livyRestClient, livyServer(livyProperties()), livyProperties());
}
Also used : SparkLivyRestClient(com.thinkbiganalytics.kylo.spark.livy.SparkLivyRestClient) LivyRestClient(com.thinkbiganalytics.kylo.spark.client.jersey.LivyRestClient) JerseyClientConfig(com.thinkbiganalytics.rest.JerseyClientConfig) LivyHeartbeatMonitor(com.thinkbiganalytics.kylo.spark.client.livy.LivyHeartbeatMonitor) JerseyRestClient(com.thinkbiganalytics.rest.JerseyRestClient) Bean(org.springframework.context.annotation.Bean)

Aggregations

LivyRestClient (com.thinkbiganalytics.kylo.spark.client.jersey.LivyRestClient)1 LivyHeartbeatMonitor (com.thinkbiganalytics.kylo.spark.client.livy.LivyHeartbeatMonitor)1 SparkLivyRestClient (com.thinkbiganalytics.kylo.spark.livy.SparkLivyRestClient)1 JerseyClientConfig (com.thinkbiganalytics.rest.JerseyClientConfig)1 JerseyRestClient (com.thinkbiganalytics.rest.JerseyRestClient)1 Bean (org.springframework.context.annotation.Bean)1