This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 85cf696  Fixing the issue for realtime table creation with env 
variables in stream configs (#6373)
85cf696 is described below

commit 85cf696be3decb75fd8e0d9e5ec5ef0a32d8dd9b
Author: Xiang Fu <fx19880...@gmail.com>
AuthorDate: Mon Dec 21 13:37:55 2020 -0800

    Fixing the issue for realtime table creation with env variables in stream 
configs (#6373)
---
 .../pinot/controller/helix/core/PinotHelixResourceManager.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
 
b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
index 6d46a9f..6b5168f 100644
--- 
a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
+++ 
b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
@@ -110,6 +110,7 @@ import 
org.apache.pinot.controller.helix.core.rebalance.TableRebalancer;
 import org.apache.pinot.controller.helix.core.util.ZKMetadataUtils;
 import org.apache.pinot.controller.helix.starter.HelixConfig;
 import org.apache.pinot.core.segment.index.metadata.SegmentMetadata;
+import org.apache.pinot.spi.config.ConfigUtils;
 import org.apache.pinot.spi.config.instance.Instance;
 import org.apache.pinot.spi.config.table.IndexingConfig;
 import org.apache.pinot.spi.config.table.SegmentsValidationAndRetentionConfig;
@@ -1323,7 +1324,9 @@ public class PinotHelixResourceManager {
     }
   }
 
-  private void ensureRealtimeClusterIsSetUp(TableConfig realtimeTableConfig) {
+  private void ensureRealtimeClusterIsSetUp(TableConfig 
rawRealtimeTableConfig) {
+    // Need to apply environment variabls here to ensure the secrets used in 
stream configs are correctly applied.
+    TableConfig realtimeTableConfig = 
ConfigUtils.applyConfigWithEnvVariables(rawRealtimeTableConfig);
     String realtimeTableName = realtimeTableConfig.getTableName();
     StreamConfig streamConfig = new 
StreamConfig(realtimeTableConfig.getTableName(),
         IngestionConfigUtils.getStreamConfigMap(realtimeTableConfig));


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

Reply via email to