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 2021/07/04 08:23:32 UTC

[GitHub] [incubator-pinot] kriti-sc commented on a change in pull request #7081: [#6823] Obfuscation of sensitive config

kriti-sc commented on a change in pull request #7081:
URL: https://github.com/apache/incubator-pinot/pull/7081#discussion_r663467127



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/BatchConfig.java
##########
@@ -27,41 +27,49 @@
  * Provides all config related to the batch data source, as configured in the table config's ingestion config
  */
 public class BatchConfig {
-  private final Map<String, String> _batchConfigMap;
-  private final String _tableNameWithType;
-
-  private final FileFormat _inputFormat;
-  private final String _inputDirURI;
-  private final String _inputFsClassName;
-  private final Map<String, String> _inputFsProps;
-
-  private final String _outputDirURI;
-  private final String _outputFsClassName;
-  private final Map<String, String> _outputFsProps;
-  private final boolean _overwriteOutput;
-
-  private final String _recordReaderClassName;
-  private final String _recordReaderConfigClassName;
-  private final Map<String, String> _recordReaderProps;
-
-  private final String _segmentNameGeneratorType;
-  private final Map<String, String> _segmentNameGeneratorConfigs;
-  private final String _segmentName;
-  private final String _segmentNamePrefix;
-  private final String _segmentNamePostfix;
-  private final boolean _excludeSequenceId;
-  private final String _sequenceId;
-
-  private final String _pushMode;
-  private final int _pushAttempts;
-  private final int _pushParallelism;
-  private final long _pushIntervalRetryMillis;
-  private final String _pushSegmentURIPrefix;
-  private final String _pushSegmentURISuffix;
-  private final String _pushControllerURI;
-  private final String _outputSegmentDirURI;
+  private Map<String, String> _batchConfigMap;
+  private String _tableNameWithType;
+
+  private FileFormat _inputFormat;
+  private String _inputDirURI;
+  private String _inputFsClassName;
+  private Map<String, String> _inputFsProps;
+
+  private String _outputDirURI;
+  private String _outputFsClassName;
+  private Map<String, String> _outputFsProps;
+  private boolean _overwriteOutput;
+
+  private String _recordReaderClassName;
+  private String _recordReaderConfigClassName;
+  private Map<String, String> _recordReaderProps;
+
+  private String _segmentNameGeneratorType;
+  private Map<String, String> _segmentNameGeneratorConfigs;
+  private String _segmentName;
+  private String _segmentNamePrefix;
+  private String _segmentNamePostfix;
+  private boolean _excludeSequenceId;
+  private String _sequenceId;
+
+  private String _pushMode;
+  private int _pushAttempts;
+  private int _pushParallelism;
+  private long _pushIntervalRetryMillis;
+  private String _pushSegmentURIPrefix;
+  private String _pushSegmentURISuffix;
+  private String _pushControllerURI;
+  private String _outputSegmentDirURI;
 
   public BatchConfig(String tableNameWithType, Map<String, String> batchConfigsMap) {
+    indexConfigKeys(tableNameWithType, batchConfigsMap, false);
+  }
+
+  public BatchConfig(String tableNameWithType, Map<String, String> batchConfigsMap, boolean obfuscateConfig) {
+    indexConfigKeys(tableNameWithType, batchConfigsMap, true);
+  }
+
+  public void indexConfigKeys(String tableNameWithType, Map<String, String> batchConfigsMap, boolean obfuscateConfig) {

Review comment:
       this is done

##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/BatchConfig.java
##########
@@ -27,41 +27,49 @@
  * Provides all config related to the batch data source, as configured in the table config's ingestion config
  */
 public class BatchConfig {
-  private final Map<String, String> _batchConfigMap;
-  private final String _tableNameWithType;
-
-  private final FileFormat _inputFormat;
-  private final String _inputDirURI;
-  private final String _inputFsClassName;
-  private final Map<String, String> _inputFsProps;
-
-  private final String _outputDirURI;
-  private final String _outputFsClassName;
-  private final Map<String, String> _outputFsProps;
-  private final boolean _overwriteOutput;
-
-  private final String _recordReaderClassName;
-  private final String _recordReaderConfigClassName;
-  private final Map<String, String> _recordReaderProps;
-
-  private final String _segmentNameGeneratorType;
-  private final Map<String, String> _segmentNameGeneratorConfigs;
-  private final String _segmentName;
-  private final String _segmentNamePrefix;
-  private final String _segmentNamePostfix;
-  private final boolean _excludeSequenceId;
-  private final String _sequenceId;
-
-  private final String _pushMode;
-  private final int _pushAttempts;
-  private final int _pushParallelism;
-  private final long _pushIntervalRetryMillis;
-  private final String _pushSegmentURIPrefix;
-  private final String _pushSegmentURISuffix;
-  private final String _pushControllerURI;
-  private final String _outputSegmentDirURI;
+  private Map<String, String> _batchConfigMap;

Review comment:
       this is done




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