Java Code Examples for com.datatorrent.api.LocalMode#runApp()
The following examples show how to use
com.datatorrent.api.LocalMode#runApp() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BenchmarkTest.java From attic-apex-malhar with Apache License 2.0 | 6 votes |
@Test public void testApplication() throws IOException, Exception { for (final Locality l : Locality.values()) { logger.debug("Running the with {} locality", l); LocalMode.runApp(new Benchmark.AbstractApplication() { @Override public Locality getLocality() { return l; } }, 60000); } }
Example 2
Source File: AbstractFileOutputOperatorTest.java From attic-apex-malhar with Apache License 2.0 | 6 votes |
@Test public void validateNegativeMaxLengthTest() { ValidationTestApp validationTestApp = new ValidationTestApp(new File(testMeta.getDir()), -1L, new SingleHDFSByteExactlyOnceWriter()); boolean error = false; try { LocalMode.runApp(validationTestApp, 1); } catch (RuntimeException e) { if (e.getCause() instanceof ConstraintViolationException) { error = true; } } Assert.assertEquals("Max length validation not thrown with -1 max length", true, error); }
Example 3
Source File: LogLevelApplicationRunner.java From nifi-streaming-examples with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws Exception { StreamingApplication app = new LogLevelApplication(); Configuration conf = new Configuration(false); conf.addResource(app.getClass().getResourceAsStream( "/META-INF/properties-LogLevelCount.xml")); LocalMode.runApp(app, conf, 140000); }
Example 4
Source File: ApplicationDiscoveryTest.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
@Test public void test() { try { LocalMode.runApp(this, 10000); } catch (Exception ex) { logger.warn("The dag seems to be not testable yet, if it's - remove this exception handling", ex); } //flume source sequence generator is set to 10 in flume configuration going to two source -> 20 Assert.assertEquals(20, globalCount); }
Example 5
Source File: ApplicationTest.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
@Test public void test() { try { LocalMode.runApp(this, 10000); } catch (Exception ex) { logger.warn("The dag seems to be not testable yet, if it's - remove this exception handling", ex); } //flume source sequence generator is set to 10 in flume configuration Assert.assertEquals(10, globalCount); }
Example 6
Source File: TestNiFiInputApplication.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws Exception { StreamingApplication app = new TestNiFiInputApplication(); LocalMode.runApp(app, new Configuration(false), 10000); Thread.sleep(2000); System.exit(0); }
Example 7
Source File: TestNiFiOutputApplication.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws Exception { StreamingApplication app = new TestNiFiOutputApplication(); LocalMode.runApp(app, new Configuration(false), 10000); Thread.sleep(2000); System.exit(0); }
Example 8
Source File: AbstractFileOutputOperatorTest.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
@Test public void validateNothingWrongTest() { ValidationTestApp validationTestApp = new ValidationTestApp(new File(testMeta.getDir()), null, new SingleHDFSByteExactlyOnceWriter()); LocalMode.runApp(validationTestApp, 1); }
Example 9
Source File: AerospikeBenchmarkAppTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void test() throws Exception { LocalMode.runApp(new AerospikeOutputBenchmarkApplication(), 10000); }
Example 10
Source File: AccumuloAppTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void testSomeMethod() throws Exception { LocalMode.runApp(new AccumuloApp(), 30000); }
Example 11
Source File: HBaseApplicationTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void test() throws Exception { LocalMode.runApp(new HBaseCsvMappingApplication(), 20000); }
Example 12
Source File: CassandraApplicatonTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void test() throws Exception { LocalMode.runApp(new CassandraOutputBenchmarkApplication(), 10000); }
Example 13
Source File: ApplicationWithScriptTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void testSomeMethod() throws Exception { LocalMode.runApp(new ApplicationWithScript(), 10000); }
Example 14
Source File: ApplicationTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test public void testSomeMethod() throws Exception { LocalMode.runApp(new Application(), 15000); }
Example 15
Source File: ApplicationTest.java From attic-apex-malhar with Apache License 2.0 | 4 votes |
@Test @Ignore public void testSomeMethod() throws Exception { LocalMode.runApp(new Application(), 60000); }