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();
}
Aggregations