metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From justinleet <...@git.apache.org>
Subject [GitHub] metron pull request #606: METRON-980: Short circuit operations for Stellar
Date Fri, 02 Jun 2017 11:02:56 GMT
Github user justinleet commented on a diff in the pull request:

    https://github.com/apache/metron/pull/606#discussion_r119831834
  
    --- Diff: metron-platform/metron-common/src/test/java/org/apache/metron/common/stellar/StellarTest.java
---
    @@ -33,19 +31,66 @@
     import org.reflections.Reflections;
     import org.reflections.util.ConfigurationBuilder;
     
    -import java.util.ArrayList;
    -import java.util.Arrays;
    -import java.util.Collection;
    -import java.util.HashMap;
    -import java.util.HashSet;
    -import java.util.Map;
    +import java.util.*;
     
     import static org.apache.metron.common.utils.StellarProcessorUtils.run;
     import static org.apache.metron.common.utils.StellarProcessorUtils.runPredicate;
     
     @SuppressWarnings("ALL")
     public class StellarTest {
     
    +  @Stellar(
    +          description="throw exception",
    +          name="THROW",
    +          params = {
    +           "message - exception message"
    +          },
    +          returns="nothing"
    +  )
    +  public static class Throw implements StellarFunction {
    +
    +    @Override
    +    public Object apply(List<Object> args, Context context) throws ParseException
{
    +      throw new IllegalStateException(Joiner.on(" ").join(args));
    +    }
    +
    +    @Override
    +    public void initialize(Context context) {
    +
    +    }
    +
    +    @Override
    +    public boolean isInitialized() {
    +      return true;
    +    }
    +  }
    +
    +  @Stellar(
    --- End diff --
    
    Could you change the description, params, and returns to not be what's in THROW?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message