You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/03/23 18:43:41 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #9553: fix Hadoop ingestion fails due to error 'JavaScript is disabled' on certain config

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org