Java Code Examples for org.apache.flink.configuration.ConfigConstants#DEFAULT_FS_STREAM_OPENING_TIMEOUT

The following examples show how to use org.apache.flink.configuration.ConfigConstants#DEFAULT_FS_STREAM_OPENING_TIMEOUT . 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: FileInputFormat.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize defaults for input format. Needs to be a static method because it is configured for local
 * cluster execution.
 * @param configuration The configuration to load defaults from
 */
private static void initDefaultsFromConfiguration(Configuration configuration) {
	final long to = configuration.getLong(ConfigConstants.FS_STREAM_OPENING_TIMEOUT_KEY,
		ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
	if (to < 0) {
		LOG.error("Invalid timeout value for filesystem stream opening: " + to + ". Using default value of " +
			ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
		DEFAULT_OPENING_TIMEOUT = ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT;
	} else if (to == 0) {
		DEFAULT_OPENING_TIMEOUT = 300000; // 5 minutes
	} else {
		DEFAULT_OPENING_TIMEOUT = to;
	}
}
 
Example 2
Source File: FileInputFormat.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize defaults for input format. Needs to be a static method because it is configured for local
 * cluster execution.
 * @param configuration The configuration to load defaults from
 */
private static void initDefaultsFromConfiguration(Configuration configuration) {
	final long to = configuration.getLong(ConfigConstants.FS_STREAM_OPENING_TIMEOUT_KEY,
		ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
	if (to < 0) {
		LOG.error("Invalid timeout value for filesystem stream opening: " + to + ". Using default value of " +
			ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
		DEFAULT_OPENING_TIMEOUT = ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT;
	} else if (to == 0) {
		DEFAULT_OPENING_TIMEOUT = 300000; // 5 minutes
	} else {
		DEFAULT_OPENING_TIMEOUT = to;
	}
}
 
Example 3
Source File: FileInputFormat.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize defaults for input format. Needs to be a static method because it is configured for local
 * cluster execution.
 * @param configuration The configuration to load defaults from
 */
private static void initDefaultsFromConfiguration(Configuration configuration) {
	final long to = configuration.getLong(ConfigConstants.FS_STREAM_OPENING_TIMEOUT_KEY,
		ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
	if (to < 0) {
		LOG.error("Invalid timeout value for filesystem stream opening: " + to + ". Using default value of " +
			ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT);
		DEFAULT_OPENING_TIMEOUT = ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT;
	} else if (to == 0) {
		DEFAULT_OPENING_TIMEOUT = 300000; // 5 minutes
	} else {
		DEFAULT_OPENING_TIMEOUT = to;
	}
}