Changeset 69c4c699ba62a8a9245115601f9c6ea80bf39e36

Show
Ignore:
Timestamp:
04/19/11 01:36:38 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1303176998 -0400
git-parent:

[55a5979360515e22a04982c4397c7bbb8271a34b]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1303176998 -0400
Message:

upgrade to esper 4.1.0

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/Makefile.in

    rb4b7c74 r69c4c69  
    7878J_CLASS = $(J_JAVA:.java=*.class) 
    7979 
    80 R_SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar lib/esper-3.5.0.jar \ 
     80R_SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar lib/esper-4.1.0.jar \ 
    8181        lib/log4j-1.2.15.jar lib/spring-beans-2.5.5.jar lib/spring-context-2.5.5.jar \ 
    8282        lib/cglib-nodep-2.2.jar lib/commons-pool-1.4.jar lib/commons-dbcp-1.2.2.jar \ 
  • src/java/com/omniti/reconnoiter/esper/CounterViewFactory.java

    r54eb3fe r69c4c69  
    4646        valueExpression = validatedNodes[1]; 
    4747     
    48         if ((timestampExpression.getType() != long.class) &&  
    49             (timestampExpression.getType() != Long.class)) { 
     48        if ((timestampExpression.getExprEvaluator().getType() != long.class) &&  
     49            (timestampExpression.getExprEvaluator().getType() != Long.class)) { 
    5050            throw new ViewParameterException( 
    5151                "View requires long-typed timestamp values in parameter 1"); 
    5252        } 
    53         if ((valueExpression.getType() != double.class) &&  
    54             (valueExpression.getType() != Double.class) && 
    55             (valueExpression.getType() != long.class) &&  
    56             (valueExpression.getType() != Long.class)) { 
     53        if ((valueExpression.getExprEvaluator().getType() != double.class) &&  
     54            (valueExpression.getExprEvaluator().getType() != Double.class) && 
     55            (valueExpression.getExprEvaluator().getType() != long.class) &&  
     56            (valueExpression.getExprEvaluator().getType() != Long.class)) { 
    5757            throw new ViewParameterException( 
    5858                "View requires long-typed or double-typed values for in parameter 2"); 
  • src/java/com/omniti/reconnoiter/esper/DeriveView.java

    r8bce3fd r69c4c69  
    4949        this.expressionX = expressionX; 
    5050        this.expressionY = expressionY; 
    51         isDouble = (expressionY.getType() != double.class || expressionY.getType() != Double.class); 
     51        isDouble = (expressionY.getExprEvaluator().getType() != double.class || expressionY.getExprEvaluator().getType() != Double.class); 
    5252    } 
    5353 
     
    6464    public static EventType getEventType(com.espertech.esper.event.EventAdapterService eas) 
    6565    { 
    66         return eas.addBeanType(WeightedValueBean.class.getName(), WeightedValueBean.class, false); 
     66        return eas.addBeanType(WeightedValueBean.class.getName(), WeightedValueBean.class, true, true, true); 
    6767    } 
    6868 
     
    8888            for ( EventBean pointb : newData ) { 
    8989                EventBean eventsPerStream[] = { pointb }; 
    90                 Number NX = (Number) expressionX.evaluate(eventsPerStream, true, statementContext); 
     90                Number NX = (Number) expressionX.getExprEvaluator().evaluate(eventsPerStream, true, statementContext); 
    9191                if(NX == null) continue; 
    92                 Number NY = (Number) expressionY.evaluate(eventsPerStream, true, statementContext); 
     92                Number NY = (Number) expressionY.getExprEvaluator().evaluate(eventsPerStream, true, statementContext); 
    9393                if(NY == null) continue; 
    9494                NoitDerivePoint point = new NoitDerivePoint(); 
  • src/java/com/omniti/reconnoiter/esper/DeriveViewFactory.java

    r54eb3fe r69c4c69  
    4646        valueExpression = validatedNodes[1]; 
    4747     
    48         if ((timestampExpression.getType() != long.class) &&  
    49             (timestampExpression.getType() != Long.class)) { 
     48        if ((timestampExpression.getExprEvaluator().getType() != long.class) &&  
     49            (timestampExpression.getExprEvaluator().getType() != Long.class)) { 
    5050            throw new ViewParameterException( 
    5151                "View requires long-typed timestamp values in parameter 1"); 
    5252        } 
    53         if ((valueExpression.getType() != double.class) &&  
    54             (valueExpression.getType() != Double.class) && 
    55             (valueExpression.getType() != long.class) &&  
    56             (valueExpression.getType() != Long.class)) { 
     53        if ((valueExpression.getExprEvaluator().getType() != double.class) &&  
     54            (valueExpression.getExprEvaluator().getType() != Double.class) && 
     55            (valueExpression.getExprEvaluator().getType() != long.class) &&  
     56            (valueExpression.getExprEvaluator().getType() != Long.class)) { 
    5757            throw new ViewParameterException( 
    5858                "View requires long-typed or double-typed values for in parameter 2"); 
  • src/java/com/omniti/reconnoiter/esper/ExactBaseBivariateStatisticsView.java

    r54eb3fe r69c4c69  
    4545        this.expressionX = expressionX; 
    4646        this.expressionY = expressionY; 
    47         isDouble = (expressionY.getType() != double.class || expressionY.getType() != Double.class); 
     47        isDouble = (expressionY.getExprEvaluator().getType() != double.class || expressionY.getExprEvaluator().getType() != Double.class); 
    4848    } 
    4949 
     
    6666            { 
    6767                eventsPerStream[0] = newData[i]; 
    68                 BigDecimal X = new BigDecimal(((Number) expressionX.evaluate(eventsPerStream, true, statementContext)).toString()); 
     68                BigDecimal X = new BigDecimal(((Number) expressionX.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).toString()); 
    6969                BigDecimal Y; 
    7070                if(isDouble) 
    71                   Y = new BigDecimal(((Number) expressionY.evaluate(eventsPerStream, true, statementContext)).doubleValue()); 
     71                  Y = new BigDecimal(((Number) expressionY.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).doubleValue()); 
    7272                else 
    73                   Y = new BigDecimal(((Number) expressionY.evaluate(eventsPerStream, true, statementContext)).toString()); 
     73                  Y = new BigDecimal(((Number) expressionY.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).toString()); 
    7474                statisticsBean.addPoint(X, Y); 
    7575            } 
     
    8282            { 
    8383                eventsPerStream[0] = oldData[i]; 
    84                 BigDecimal X = new BigDecimal(((Number) expressionX.evaluate(eventsPerStream, true, statementContext)).toString()); 
     84                BigDecimal X = new BigDecimal(((Number) expressionX.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).toString()); 
    8585                BigDecimal Y; 
    8686                if(isDouble) 
    87                   Y = new BigDecimal(((Number) expressionY.evaluate(eventsPerStream, true, statementContext)).doubleValue()); 
     87                  Y = new BigDecimal(((Number) expressionY.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).doubleValue()); 
    8888                else 
    89                   Y = new BigDecimal(((Number) expressionY.evaluate(eventsPerStream, true, statementContext)).toString()); 
     89                  Y = new BigDecimal(((Number) expressionY.getExprEvaluator().evaluate(eventsPerStream, true, statementContext)).toString()); 
    9090                statisticsBean.removePoint(X, Y); 
    9191            } 
  • src/java/com/omniti/reconnoiter/esper/ExactRegressionLinestView.java

    r54eb3fe r69c4c69  
    3333    public static EventType getEventType(com.espertech.esper.event.EventAdapterService eas) 
    3434    { 
    35         return eas.addBeanType(ExactRegressionBean.class.getName(), ExactRegressionBean.class, false); 
     35        return eas.addBeanType(ExactRegressionBean.class.getName(), ExactRegressionBean.class, true, true, true); 
    3636    } 
    3737 
  • src/java/com/omniti/reconnoiter/esper/ExactStatViewFactory.java

    r54eb3fe r69c4c69  
    4646        valueExpression = validatedNodes[1]; 
    4747     
    48         if ((timestampExpression.getType() != long.class) &&  
    49             (timestampExpression.getType() != Long.class)) { 
     48        if ((timestampExpression.getExprEvaluator().getType() != long.class) &&  
     49            (timestampExpression.getExprEvaluator().getType() != Long.class)) { 
    5050            throw new ViewParameterException( 
    5151                "View requires long-typed timestamp values in parameter 1"); 
    5252        } 
    53         if ((valueExpression.getType() != double.class) &&  
    54             (valueExpression.getType() != Double.class) && 
    55             (valueExpression.getType() != long.class) &&  
    56             (valueExpression.getType() != Long.class)) { 
     53        if ((valueExpression.getExprEvaluator().getType() != double.class) &&  
     54            (valueExpression.getExprEvaluator().getType() != Double.class) && 
     55            (valueExpression.getExprEvaluator().getType() != long.class) &&  
     56            (valueExpression.getExprEvaluator().getType() != Long.class)) { 
    5757            throw new ViewParameterException( 
    5858                "View requires long-typed or double-typed values for in parameter 2"); 
  • src/java/com/omniti/reconnoiter/event/NoitMetric.java

    rd483232 r69c4c69  
    4141    logger.debug("sendEvent("+getUuid()+"-"+getName()+") took "+(nanos/1000)+"us"); 
    4242  } 
    43   public String getUuid() { 
    44     return (nmn != null) ? nmn.getUuid() : nmt.getUuid(); 
    45   } 
    46   public String getName() { 
    47     return (nmn != null) ? nmn.getName() : nmt.getName(); 
    48   } 
     43  public String getUuid() { return (nmn != null)?nmn.getUuid():nmt.getUuid(); } 
     44  public String getName() { return (nmn != null)?nmn.getName():nmt.getName(); } 
     45  public long getTime() { return (nmn != null)?nmn.getTime():nmt.getTime(); } 
     46  public String getNoit() { return (nmn != null)?nmn.getNoit():nmt.getNoit(); } 
     47  public String getCheck_target() { return (nmn != null)?nmn.getCheck_target():nmt.getCheck_target(); } 
     48  public String getCheck_module() { return (nmn != null)?nmn.getCheck_module():nmt.getCheck_module(); } 
     49  public String getCheck_name() { return (nmn != null)?nmn.getCheck_name():nmt.getCheck_name(); } 
     50 
    4951  public boolean isNumeric() { return nmn != null; } 
    5052  public boolean isText() { return nmt != null; } 
  • src/java/run-iep.sh.in

    rb4b7c74 r69c4c69  
    1212fi 
    1313JARS="reconnoiter.jar activemq-all-5.2.0.jar antlr-runtime-3.1.1.jar \ 
    14         esper-3.5.0.jar log4j-1.2.15.jar \ 
     14        esper-4.1.0.jar log4j-1.2.15.jar \ 
    1515        spring-beans-2.5.5.jar spring-context-2.5.5.jar \ 
    1616        cglib-nodep-2.2.jar commons-pool-1.4.jar commons-dbcp-1.2.2.jar \