當前位置: 首頁>>代碼示例>>Java>>正文


Java MultipleProgramsTestBase類代碼示例

本文整理匯總了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");
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:9,代碼來源:TaskFailureITCase.java

示例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));
}
 
開發者ID:s1ck,項目名稱:ldbc-flink-import,代碼行數:15,代碼來源:LDBCToFlinkHDFSTest.java

示例3: tearDown

import org.apache.flink.test.util.MultipleProgramsTestBase; //導入依賴的package包/類
@AfterClass
public static void tearDown() throws Exception {
  cluster.shutdown();
  MultipleProgramsTestBase.teardown();
}
 
開發者ID:s1ck,項目名稱:ldbc-flink-import,代碼行數:6,代碼來源:LDBCToFlinkHDFSTest.java


注:本文中的org.apache.flink.test.util.MultipleProgramsTestBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。