本文整理汇总了Java中com.datatorrent.api.LocalMode.runApp方法的典型用法代码示例。如果您正苦于以下问题:Java LocalMode.runApp方法的具体用法?Java LocalMode.runApp怎么用?Java LocalMode.runApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.datatorrent.api.LocalMode
的用法示例。
在下文中一共展示了LocalMode.runApp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testApplication
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@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);
}
}
示例2: validateNegativeMaxLengthTest
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@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);
}
示例3: main
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
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);
}
示例4: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@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);
}
示例5: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@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);
}
示例6: main
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
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);
}
示例7: main
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
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);
}
示例8: validateNothingWrongTest
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void validateNothingWrongTest()
{
ValidationTestApp validationTestApp = new ValidationTestApp(new File(testMeta.getDir()), null,
new SingleHDFSByteExactlyOnceWriter());
LocalMode.runApp(validationTestApp, 1);
}
示例9: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test()
{
try {
LocalMode.runApp(this, Integer.MAX_VALUE);
} catch (Exception ex) {
logger.warn("The dag seems to be not testable yet, if it's - remove this exception handling", ex);
}
}
示例10: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{
LocalMode.runApp(new AerospikeOutputBenchmarkApplication(), 10000);
}
示例11: testSomeMethod
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
LocalMode.runApp(new AccumuloApp(), 30000);
}
示例12: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{
LocalMode.runApp(new HBaseCsvMappingApplication(), 20000);
}
示例13: test
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{
LocalMode.runApp(new CassandraOutputBenchmarkApplication(), 10000);
}
示例14: testSomeMethod
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
LocalMode.runApp(new ApplicationWithScript(), 10000);
}
示例15: testSomeMethod
import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
LocalMode.runApp(new Application(), 15000);
}