You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2019/06/17 21:33:26 UTC

[GitHub] [incubator-heron] rohanag12 commented on a change in pull request #3293: Bug: Read override config in Metrics Manager

rohanag12 commented on a change in pull request #3293: Bug: Read override config in Metrics Manager
URL: https://github.com/apache/incubator-heron/pull/3293#discussion_r294527361
 
 

 ##########
 File path: heron/metricsmgr/src/java/org/apache/heron/metricsmgr/MetricsSinksConfig.java
 ##########
 @@ -42,21 +42,33 @@
   private final Map<String, Map<String, Object>> sinksConfigs = new HashMap<>();
 
   @SuppressWarnings("unchecked")
-  public MetricsSinksConfig(String filename) throws FileNotFoundException {
-    FileInputStream fin = new FileInputStream(new File(filename));
+  public MetricsSinksConfig(String metricsSinksConfigFilename, String overrideConfigFilename)
+      throws FileNotFoundException {
+    FileInputStream sinkConfigStream = new FileInputStream(new File(metricsSinksConfigFilename));
+    FileInputStream overrideStream = new FileInputStream(new File(overrideConfigFilename));
     try {
       Yaml yaml = new Yaml();
-      Map<Object, Object> ret = (Map<Object, Object>) yaml.load(fin);
+      Map<Object, Object> sinkConfig = (Map<Object, Object>) yaml.load(sinkConfigStream);
+      Map<Object, Object> overrideConfig = (Map<Object, Object>) yaml.load(overrideStream);
 
-      if (ret == null) {
+      if (sinkConfig == null) {
         throw new RuntimeException("Could not parse metrics-sinks config file");
 
 Review comment:
   Done, thanks!

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