org.apache.flink.runtime.blob.BlobServerRecoveryTest Java Examples

The following examples show how to use org.apache.flink.runtime.blob.BlobServerRecoveryTest. 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: HDFSTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
/**
 * Tests that with {@link HighAvailabilityMode#ZOOKEEPER} distributed JARs are recoverable from any
 * participating BlobServer when talking to the {@link org.apache.flink.runtime.blob.BlobServer} directly.
 */
@Test
public void testBlobServerRecovery() throws Exception {
	org.apache.flink.configuration.Configuration
		config = new org.apache.flink.configuration.Configuration();
	config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER");
	config.setString(BlobServerOptions.STORAGE_DIRECTORY,
		temporaryFolder.newFolder().getAbsolutePath());
	config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, hdfsURI);

	BlobStoreService blobStoreService = BlobUtils.createBlobStoreFromConfig(config);

	try {
		BlobServerRecoveryTest.testBlobServerRecovery(config, blobStoreService);
	} finally {
		blobStoreService.closeAndCleanupAllData();
	}
}
 
Example #2
Source File: HDFSTest.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Tests that with {@link HighAvailabilityMode#ZOOKEEPER} distributed JARs are recoverable from any
 * participating BlobServer when talking to the {@link org.apache.flink.runtime.blob.BlobServer} directly.
 */
@Test
public void testBlobServerRecovery() throws Exception {
	org.apache.flink.configuration.Configuration
		config = new org.apache.flink.configuration.Configuration();
	config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER");
	config.setString(BlobServerOptions.STORAGE_DIRECTORY,
		temporaryFolder.newFolder().getAbsolutePath());
	config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, hdfsURI);

	BlobStoreService blobStoreService = BlobUtils.createBlobStoreFromConfig(config);

	try {
		BlobServerRecoveryTest.testBlobServerRecovery(config, blobStoreService);
	} finally {
		blobStoreService.closeAndCleanupAllData();
	}
}
 
Example #3
Source File: HDFSTest.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Tests that with {@link HighAvailabilityMode#ZOOKEEPER} distributed JARs are recoverable from any
 * participating BlobServer when talking to the {@link org.apache.flink.runtime.blob.BlobServer} directly.
 */
@Test
public void testBlobServerRecovery() throws Exception {
	org.apache.flink.configuration.Configuration
		config = new org.apache.flink.configuration.Configuration();
	config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER");
	config.setString(BlobServerOptions.STORAGE_DIRECTORY,
		temporaryFolder.newFolder().getAbsolutePath());
	config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, hdfsURI);

	BlobStoreService blobStoreService = BlobUtils.createBlobStoreFromConfig(config);

	try {
		BlobServerRecoveryTest.testBlobServerRecovery(config, blobStoreService);
	} finally {
		blobStoreService.closeAndCleanupAllData();
	}
}