Search in sources :

Example 1 with YarnComponent

use of org.apache.metron.integration.components.YarnComponent in project metron by apache.

the class MaasIntegrationTest method setupBeforeClass.

@BeforeClass
public static void setupBeforeClass() throws Exception {
    UnitTestHelper.setJavaLoggingLevel(Level.SEVERE);
    LOG.info("Starting up YARN cluster");
    zkServerComponent = new ZKServerComponent();
    yarnComponent = new YarnComponent().withApplicationMasterClass(ApplicationMaster.class).withTestName(MaasIntegrationTest.class.getSimpleName());
    runner = new ComponentRunner.Builder().withComponent("yarn", yarnComponent).withComponent("zk", zkServerComponent).withMillisecondsBetweenAttempts(15000).withNumRetries(10).build();
    runner.start();
    String zookeeperUrl = zkServerComponent.getConnectionString();
    RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
    client = CuratorFrameworkFactory.newClient(zookeeperUrl, retryPolicy);
    client.start();
}
Also used : ExponentialBackoffRetry(org.apache.curator.retry.ExponentialBackoffRetry) ZKServerComponent(org.apache.metron.integration.components.ZKServerComponent) YarnComponent(org.apache.metron.integration.components.YarnComponent) RetryPolicy(org.apache.curator.RetryPolicy) BeforeClass(org.junit.BeforeClass)

Aggregations

RetryPolicy (org.apache.curator.RetryPolicy)1 ExponentialBackoffRetry (org.apache.curator.retry.ExponentialBackoffRetry)1 YarnComponent (org.apache.metron.integration.components.YarnComponent)1 ZKServerComponent (org.apache.metron.integration.components.ZKServerComponent)1 BeforeClass (org.junit.BeforeClass)1