当前位置: 首页>>代码示例>>Java>>正文


Java LocalMode.runApp方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:17,代码来源:BenchmarkTest.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:19,代码来源:AbstractFileOutputOperatorTest.java

示例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);
}
 
开发者ID:bbende,项目名称:nifi-streaming-examples,代码行数:10,代码来源:LogLevelApplicationRunner.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:12,代码来源:ApplicationDiscoveryTest.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:12,代码来源:ApplicationTest.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:8,代码来源:TestNiFiInputApplication.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:8,代码来源:TestNiFiOutputApplication.java

示例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);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:9,代码来源:AbstractFileOutputOperatorTest.java

示例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);
  }

}
 
开发者ID:DataTorrent,项目名称:Megh,代码行数:11,代码来源:ApplicationTest.java

示例10: test

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{

  LocalMode.runApp(new AerospikeOutputBenchmarkApplication(), 10000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:7,代码来源:AerospikeBenchmarkAppTest.java

示例11: testSomeMethod

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
  LocalMode.runApp(new AccumuloApp(), 30000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:6,代码来源:AccumuloAppTest.java

示例12: test

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{
  LocalMode.runApp(new HBaseCsvMappingApplication(), 20000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:6,代码来源:HBaseApplicationTest.java

示例13: test

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void test() throws Exception
{
  LocalMode.runApp(new CassandraOutputBenchmarkApplication(), 10000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:6,代码来源:CassandraApplicatonTest.java

示例14: testSomeMethod

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
  LocalMode.runApp(new ApplicationWithScript(), 10000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:6,代码来源:ApplicationWithScriptTest.java

示例15: testSomeMethod

import com.datatorrent.api.LocalMode; //导入方法依赖的package包/类
@Test
public void testSomeMethod() throws Exception
{
  LocalMode.runApp(new Application(), 15000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:6,代码来源:ApplicationTest.java


注:本文中的com.datatorrent.api.LocalMode.runApp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。