jihoonson commented on a change in pull request #9553: fix Hadoop ingestion
fails due to error 'JavaScript is disabled' on certain config
URL: https://github.com/apache/druid/pull/9553#discussion_r396677290
##########
File path:
indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
##########
@@ -343,11 +338,18 @@ public static void injectDruidProperties(Configuration
configuration, List<Strin
}
}
- public static Configuration injectSystemProperties(Configuration conf)
+ public static Configuration injectSystemProperties(Configuration conf,
List<String> listOfAllowedPrefix)
{
for (String propName :
HadoopDruidIndexerConfig.PROPERTIES.stringPropertyNames()) {
if (propName.startsWith("hadoop.")) {
conf.set(propName.substring("hadoop.".length()),
HadoopDruidIndexerConfig.PROPERTIES.getProperty(propName));
+ } else {
+ for (String prefix : listOfAllowedPrefix) {
+ if (propName.equals(prefix) || propName.startsWith(prefix + ".")) {
+ conf.set(propName,
HadoopDruidIndexerConfig.PROPERTIES.getProperty(propName));
+ break;
+ }
+ }
Review comment:
`injectDruidProperties` has an almost same block with this. How about adding
a new method `HadoopDruidIndexerConfig.getAllowedProperties()` which returns a
map of a property name to a property? And this new method can be used both in
`injectDruidProperties()` and this method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]