piyushchauhan commented on code in PR #7081:
URL: https://github.com/apache/pinot/pull/7081#discussion_r1020841520
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java:
##########
@@ -127,6 +135,51 @@ public String getConfig(
Schema schema = _pinotHelixResourceManager.getSchema(tableName);
TableConfig offlineTableConfig =
_pinotHelixResourceManager.getOfflineTableConfig(tableName);
TableConfig realtimeTableConfig =
_pinotHelixResourceManager.getRealtimeTableConfig(tableName);
+
+ if (offlineTableConfig != null) {
+ IngestionConfig ingestionConfig =
offlineTableConfig.getIngestionConfig();
+ if (ingestionConfig != null) {
+ BatchIngestionConfig batchIngestionConfig =
ingestionConfig.getBatchIngestionConfig();
+ if (batchIngestionConfig != null) {
+ List<Map<String, String>> offlineBatchConfigMaps =
batchIngestionConfig.getBatchConfigMaps();
+ List<Map<String, String>> batchConfigs = new ArrayList<>();
+ for (Map<String, String> batchConfigMap : offlineBatchConfigMaps) {
+ BatchConfig batchObfuscatedConfig = new BatchConfig(tableName,
batchConfigMap, true);
+ batchConfigs.add(batchObfuscatedConfig.getBatchConfigMap());
+ }
+ batchIngestionConfig.setBatchConfigMaps(batchConfigs);
+ }
+ ingestionConfig.setBatchIngestionConfig(batchIngestionConfig);
+ }
+ offlineTableConfig.setIngestionConfig(ingestionConfig);
+ }
+
+ if (realtimeTableConfig != null) {
+ IngestionConfig ingestionConfig =
realtimeTableConfig.getIngestionConfig();
+ if (ingestionConfig != null) {
+ StreamIngestionConfig streamIngestionConfig =
ingestionConfig.getStreamIngestionConfig();
+ if (streamIngestionConfig != null) {
+ List<Map<String, String>> streamConfigMaps =
streamIngestionConfig.getStreamConfigMaps();
+ List<Map<String, String>> streamConfigs = new ArrayList<>();
+ for (Map<String, String> streamConfigMap : streamConfigMaps) {
+ StreamConfig streamObfuscatedConfig = new
StreamConfig(tableName, streamConfigMap, true);
+ streamConfigs.add(streamObfuscatedConfig.getStreamConfigsMap());
+ }
+ streamIngestionConfig.setStreamConfigMaps(streamConfigMaps);
+ }
+ ingestionConfig.setStreamIngestionConfig(streamIngestionConfig);
+ }
+ IndexingConfig indexingConfig =
realtimeTableConfig.getIndexingConfig();
+ if (indexingConfig != null){
+ Map <String, String> streamConfig =
indexingConfig.getStreamConfigs();
+ if (streamConfig != null) {
+ Map<String, String> obfuscatedStreamConfig =
indexingConfig.obfuscateStreamConfigs();
+ indexingConfig.setStreamConfigs(obfuscatedStreamConfig);
Review Comment:
I think making sensitive fields as transient would help. There will be no
need for setting the same config. It won't appear in the logs as it won't be
deserialized.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]