NIFI-5494 - Added ExpressionLanguage support to 'Hive Configuration Resources'

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #2946.
This commit is contained in:
zenfenan 2018-08-12 20:23:02 +05:30 committed by Pierre Villard
parent 7bbb5a823a
commit 82c5126f3c
2 changed files with 4 additions and 2 deletions

View File

@ -182,6 +182,7 @@ public class PutHiveStreaming extends AbstractSessionFactoryProcessor {
+ "Please see the Hive documentation for more details.")
.required(false)
.addValidator(HiveUtils.createMultipleFilesExistValidator())
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
.build();
public static final PropertyDescriptor DB_NAME = new PropertyDescriptor.Builder()
@ -424,7 +425,7 @@ public class PutHiveStreaming extends AbstractSessionFactoryProcessor {
ComponentLog log = getLogger();
final Integer heartbeatInterval = context.getProperty(HEARTBEAT_INTERVAL).evaluateAttributeExpressions().asInteger();
final String configFiles = context.getProperty(HIVE_CONFIGURATION_RESOURCES).getValue();
final String configFiles = context.getProperty(HIVE_CONFIGURATION_RESOURCES).evaluateAttributeExpressions().getValue();
hiveConfig = hiveConfigurator.getConfigurationFromFiles(configFiles);
// If more than one concurrent task, force 'hcatalog.hive.client.cache.disabled' to true

View File

@ -133,6 +133,7 @@ public class PutHive3Streaming extends AbstractProcessor {
+ "Please see the Hive documentation for more details.")
.required(false)
.addValidator(HiveUtils.createMultipleFilesExistValidator())
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
.build();
static final PropertyDescriptor DB_NAME = new PropertyDescriptor.Builder()
@ -301,7 +302,7 @@ public class PutHive3Streaming extends AbstractProcessor {
ComponentLog log = getLogger();
rollbackOnFailure = context.getProperty(ROLLBACK_ON_FAILURE).asBoolean();
final String configFiles = context.getProperty(HIVE_CONFIGURATION_RESOURCES).getValue();
final String configFiles = context.getProperty(HIVE_CONFIGURATION_RESOURCES).evaluateAttributeExpressions().getValue();
hiveConfig = hiveConfigurator.getConfigurationFromFiles(configFiles);
// If more than one concurrent task, force 'hcatalog.hive.client.cache.disabled' to true