Java Code Examples for org.apache.flink.test.util.SecureTestEnvironment#populateFlinkSecureConfigurations()

The following examples show how to use org.apache.flink.test.util.SecureTestEnvironment#populateFlinkSecureConfigurations() . 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: RollingSinkSecuredITCase.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private static Configuration startSecureFlinkClusterWithRecoveryModeEnabled() {
	try {
		LOG.info("Starting Flink and ZK in secure mode");

		dfs.mkdirs(new Path("/flink/checkpoints"));
		dfs.mkdirs(new Path("/flink/recovery"));

		final Configuration result = new Configuration();

		result.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, false);
		result.setInteger(ConfigConstants.LOCAL_NUMBER_JOB_MANAGER, 3);
		result.setString(HighAvailabilityOptions.HA_MODE, "zookeeper");
		result.setString(CheckpointingOptions.STATE_BACKEND, "filesystem");
		result.setString(HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH, hdfsURI + "/flink/checkpoints");
		result.setString(HighAvailabilityOptions.HA_STORAGE_PATH, hdfsURI + "/flink/recovery");
		result.setString("state.backend.fs.checkpointdir", hdfsURI + "/flink/checkpoints");

		SecureTestEnvironment.populateFlinkSecureConfigurations(result);

		return result;
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}
 
Example 2
Source File: Kafka09SecuredRunITCase.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void prepare() throws ClassNotFoundException {
	LOG.info("-------------------------------------------------------------------------");
	LOG.info("    Starting Kafka09SecuredRunITCase ");
	LOG.info("-------------------------------------------------------------------------");

	SecureTestEnvironment.prepare(tempFolder);
	SecureTestEnvironment.populateFlinkSecureConfigurations(getFlinkConfiguration());

	startClusters(true, false);
}
 
Example 3
Source File: Kafka09SecuredRunITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void prepare() throws Exception {
	LOG.info("-------------------------------------------------------------------------");
	LOG.info("    Starting Kafka09SecuredRunITCase ");
	LOG.info("-------------------------------------------------------------------------");

	SecureTestEnvironment.prepare(tempFolder);
	SecureTestEnvironment.populateFlinkSecureConfigurations(getFlinkConfiguration());

	startClusters(true, false);
}
 
Example 4
Source File: Kafka010SecuredRunITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void prepare() throws Exception {
	LOG.info("-------------------------------------------------------------------------");
	LOG.info("    Starting Kafka010SecuredRunITCase ");
	LOG.info("-------------------------------------------------------------------------");

	SecureTestEnvironment.prepare(tempFolder);
	SecureTestEnvironment.populateFlinkSecureConfigurations(getFlinkConfiguration());

	startClusters(true, false);
}