You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/02/08 22:53:41 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8169: Adding controller config for disabling Groovy in ingestionConfig

Jackie-Jiang commented on a change in pull request #8169:
URL: https://github.com/apache/pinot/pull/8169#discussion_r802124827



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
##########
@@ -251,6 +251,7 @@ private static long getRandomInitialDelayInSeconds() {
   private static final String DEFAULT_DIM_TABLE_MAX_SIZE = "200M";
 
   private static final String DEFAULT_PINOT_FS_FACTORY_CLASS_LOCAL = LocalPinotFS.class.getName();
+  public static final String DISABLE_GROOVY = "controller.disable.groovy";

Review comment:
       Let's make it explicit that this disables groovy for ingestion, e.g. `controller.disable.ingestion.groovy`

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
##########
@@ -251,6 +251,7 @@ private static long getRandomInitialDelayInSeconds() {
   private static final String DEFAULT_DIM_TABLE_MAX_SIZE = "200M";
 
   private static final String DEFAULT_PINOT_FS_FACTORY_CLASS_LOCAL = LocalPinotFS.class.getName();
+  public static final String DISABLE_GROOVY = "controller.disable.groovy";

Review comment:
       This is a legacy issue. Let's keep it the current way, and we can fix it all together in the future.

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
##########
@@ -841,6 +842,13 @@ public String getControllerResourcePackages() {
     return getProperty(CONTROLLER_RESOURCE_PACKAGES, DEFAULT_CONTROLLER_RESOURCE_PACKAGES);
   }
 
+  /**
+   * @return true if Groovy functions are disabled in controller config, otherwise returns false.
+   */
+  public boolean getDisableGroovy() {

Review comment:
       ```suggestion
     public boolean isDisableGroovy() {
   ```

##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/FunctionEvaluatorFactory.java
##########
@@ -96,6 +96,14 @@ public static FunctionEvaluator getExpressionEvaluator(FieldSpec fieldSpec) {
     return functionEvaluator;
   }
 
+  public static FunctionEvaluator getExpressionEvaluator(String transformExpression, boolean disableGroovy) {

Review comment:
       Let's add a method `isGroovyExpression()` instead of passing `disableGroovy` to the getter




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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