[GitHub] metron issue #938: METRON-1457: Move ASF links to main page in the Metron we...
Github user anandsubbu commented on the issue: https://github.com/apache/metron/pull/938 Thanks @justinleet for the pointer. I have made a change to use the Powered By logo instead of the foundation logo with feather, since I thought this looked better. I also added a direct link to the ASF press kit page, instead of storing the image on our local site. Let me know your thoughts. https://user-images.githubusercontent.com/20395490/36713710-ee7afc76-1bb4-11e8-9c06-a19bd20c17fd.png;> ---
[GitHub] metron issue #938: METRON-1457: Move ASF links to main page in the Metron we...
Github user justinleet commented on the issue: https://github.com/apache/metron/pull/938 The Apache logo image used is a bit outdated. Could you swap it with the latest? Looks like it's at https://www.apache.org/foundation/press/kit/#links. I can only find it from the press links, but if anyone knows a better place to grab it from, we can pull from there. ---
[GitHub] metron issue #942: METRON-1461: Modify the MIN, MAX Stellar methods to take ...
Github user MohanDV commented on the issue: https://github.com/apache/metron/pull/942 @nickwallen Thanks for the review, I have incorporated your comments. ---
[GitHub] metron issue #940: METRON-1460: Create a complementary non-split-join enrich...
Github user merrimanr commented on the issue: https://github.com/apache/metron/pull/940 I tested this in full dev and worked as expected. +1 ---
[GitHub] metron issue #934: METRON-1423: Ambari work to handle Solr configuration
Github user cestella commented on the issue: https://github.com/apache/metron/pull/934 +1 by inspection ---
[GitHub] metron issue #933: METRON-1452 Rebase Dev Environment on Latest CentOS 6
Github user nickwallen commented on the issue: https://github.com/apache/metron/pull/933 FYI - After the last commit, I spun-up the CentOS environment again; validated the Alerts UI is receiving data, ran the Metron Service Check successfully. All is well. ---
[GitHub] metron pull request #942: METRON-1461: Modify the MIN, MAX Stellar methods t...
Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/942#discussion_r170597762 --- Diff: metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/OrdinalFunctions.java --- @@ -37,17 +35,23 @@ * Return the maximum value of a list of input values in a Stellar list */ @Stellar(name = "MAX" - , description = "Returns the maximum value of a list of input values" - , params = {"list - List of arguments. The list may only contain objects that are mutually comparable / ordinal (implement java.lang.Comparable interface)" + + , description = "Returns the maximum value of a list of input values or from a statistics object" + , params = {"stats - The Stellar statistics object" + ,"list - List of arguments. The list may only contain objects that are mutually comparable / ordinal (implement java.lang.Comparable interface)" + " Multi type numeric comparisons are supported: MAX([10,15L,15.3]) would return 15.3, but MAX(['23',25]) will fail and return null as strings and numbers can't be compared."} - , returns = "The maximum value in the list, or null if the list is empty or the input values were not comparable.") + , returns = "The maximum value in the list or from stats, or null if the list is empty or the input values were not comparable.") public static class Max extends BaseStellarFunction { @Override public Object apply(List args) { if (args.size() < 1 || args.get(0) == null) { throw new IllegalStateException("MAX function requires at least a Stellar list of values"); } + Object firstArg = args.get(0); + if(firstArg instanceof Ordinal) { +Ordinal stats = convert(firstArg, Ordinal.class); +return stats.getMax(); + } Iterable list = (Iterable) args.get(0); --- End diff -- It would make sense to wrap the existing "iterable" handling code in an "else if". And also handle the possibility that the argument is not an Iterable nor an Ordinal. Perhaps like so... ``` Object firstArg = args.get(0); if(firstArg instanceof Ordinal) { } else if(firstArg instanceof Iterable) { } else { throw new IllegalStateException("MAX function expects either "); } ``` ---
[GitHub] metron pull request #942: METRON-1461: Modify the MIN, MAX Stellar methods t...
Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/942#discussion_r170595688 --- Diff: metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/OrdinalFunctions.java --- @@ -37,17 +35,23 @@ * Return the maximum value of a list of input values in a Stellar list */ @Stellar(name = "MAX" - , description = "Returns the maximum value of a list of input values" - , params = {"list - List of arguments. The list may only contain objects that are mutually comparable / ordinal (implement java.lang.Comparable interface)" + + , description = "Returns the maximum value of a list of input values or from a statistics object" + , params = {"stats - The Stellar statistics object" + ,"list - List of arguments. The list may only contain objects that are mutually comparable / ordinal (implement java.lang.Comparable interface)" + " Multi type numeric comparisons are supported: MAX([10,15L,15.3]) would return 15.3, but MAX(['23',25]) will fail and return null as strings and numbers can't be compared."} - , returns = "The maximum value in the list, or null if the list is empty or the input values were not comparable.") + , returns = "The maximum value in the list or from stats, or null if the list is empty or the input values were not comparable.") public static class Max extends BaseStellarFunction { @Override public Object apply(List args) { if (args.size() < 1 || args.get(0) == null) { throw new IllegalStateException("MAX function requires at least a Stellar list of values"); --- End diff -- With your changes, this error message is now incorrect. Can you update this? This only checks the number of args, so the error message should probably just say that we expect one argument or something to that effect. ---
[GitHub] metron pull request #942: METRON-1461: Modify the MIN, MAX Stellar methods t...
Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/942#discussion_r170598354 --- Diff: metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/Ordinal.java --- @@ -0,0 +1,24 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.metron.stellar.dsl.functions; + +public interface Ordinal { --- End diff -- Can you add javadocs for the class and each method? ---
[GitHub] metron issue #933: METRON-1452 Rebase Dev Environment on Latest CentOS 6
Github user nickwallen commented on the issue: https://github.com/apache/metron/pull/933 When creating the Ubuntu environment a while back, I created an Ansible role that enables swap space. (In the base Ubuntu image, swap space is not enabled.) It was easy enough to reuse that in the CentOS environment also. With the latest commit, the CentOS environment has a larger swap space as before, but without the burden of maintaining an image in Vagrant Cloud/Atlas. I think this is the best of both worlds. Let me know what you guys think. Would like to get reaffirmation on the +1s before merging this. @mmiklavc @cestella ---