[ 
https://issues.apache.org/jira/browse/METRON-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16170647#comment-16170647
 ] 

ASF GitHub Bot commented on METRON-1188:
----------------------------------------

Github user mmiklavc commented on a diff in the pull request:

    https://github.com/apache/metron/pull/760#discussion_r139532867
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/cli/ConfigurationManager.java
 ---
    @@ -130,29 +201,39 @@ public void pull(CuratorFramework client, String 
outFileStr, final boolean force
           public void visit(ConfigurationType configurationType, String name, 
String data) {
             File out = getFile(outputDir, configurationType, name);
             if (!out.exists() || force) {
    -          if(!out.exists()) {
    +          if (!out.exists()) {
                 out.getParentFile().mkdirs();
               }
               try {
                 Files.write(data, out, Charset.defaultCharset());
               } catch (IOException e) {
                 throw new RuntimeException("Sorry, something bad happened 
writing the config to " + out.getAbsolutePath() + ": " + e.getMessage(), e);
               }
    -        }
    -        else if(out.exists() && !force) {
    +        } else if (out.exists() && !force) {
               throw new IllegalStateException("Unable to overwrite existing 
file (" + out.getAbsolutePath() + ") without the force flag (-f or --force) 
being set.");
             }
           }
         });
       }
     
       public void push(String inputDirStr, CuratorFramework client) throws 
Exception {
    -      final File inputDir = new File(inputDirStr);
    +    final File inputDir = new File(inputDirStr);
    --- End diff --
    
    That was actually me missing the "-i" parameter in the test script. I've 
modified the test accordingly. In general we should be better guarding user 
inputs, e.g. some may have noticed that help never actually worked without 
throwing an exception. I could add a check there also. I'm inclined to rewrite 
our configuration classes altogether as I think they can be greatly simplified.


> Ambari global configuration management broken
> ---------------------------------------------
>
>                 Key: METRON-1188
>                 URL: https://issues.apache.org/jira/browse/METRON-1188
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Michael Miklavcic
>            Assignee: Michael Miklavcic
>
> Ambari currently ignores values from the UI when managing the global.json 
> file. These values are hard-coded in the status_params.py file as part of the 
> mpack. In addition, Ambari restarts are clobbering configuration changes in 
> Zookeeper.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to