本文整理汇总了Java中org.apache.flink.test.util.MultipleProgramsTestBase类的典型用法代码示例。如果您正苦于以下问题:Java MultipleProgramsTestBase类的具体用法?Java MultipleProgramsTestBase怎么用?Java MultipleProgramsTestBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MultipleProgramsTestBase类属于org.apache.flink.test.util包,在下文中一共展示了MultipleProgramsTestBase类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: executeTask
import org.apache.flink.test.util.MultipleProgramsTestBase; //导入依赖的package包/类
private void executeTask(MapFunction<Long, Long> mapper, int retries) throws Exception {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(retries, 0));
List<Long> result = env.generateSequence(1, 9)
.map(mapper)
.collect();
MultipleProgramsTestBase.compareResultAsText(result, "1\n2\n3\n4\n5\n6\n7\n8\n9");
}
示例2: setup
import org.apache.flink.test.util.MultipleProgramsTestBase; //导入依赖的package包/类
@BeforeClass
public static void setup() throws Exception {
MultipleProgramsTestBase.setup();
File clusterDir = tmpFolder.newFolder(CLUSTER_1);
System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA);
conf = new HdfsConfiguration();
conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, clusterDir.getAbsolutePath());
cluster = new MiniDFSCluster.Builder(conf).build();
fs = FileSystem.get(conf);
String fromPath = LDBCToFlinkTest.class.getResource("/data").getPath();
fs.copyFromLocalFile(new Path(fromPath), new Path(HDFS_DATA_PATH));
}
示例3: tearDown
import org.apache.flink.test.util.MultipleProgramsTestBase; //导入依赖的package包/类
@AfterClass
public static void tearDown() throws Exception {
cluster.shutdown();
MultipleProgramsTestBase.teardown();
}