Github user R-Rajkumar commented on a diff in the pull request:
https://github.com/apache/stratos/pull/382#discussion_r35234677
--- Diff:
extensions/cep/stratos-cep-extension/src/main/java/org/apache/stratos/cep/extension/CurveFinderWindowProcessor.java
---
@@ -0,0 +1,236 @@
+package org.apache.stratos.cep.extension;
+
+import org.apache.log4j.Logger;
+import org.wso2.siddhi.core.config.SiddhiContext;
+import org.wso2.siddhi.core.event.StreamEvent;
+import org.wso2.siddhi.core.event.in.InEvent;
+import org.wso2.siddhi.core.event.in.InListEvent;
+import org.wso2.siddhi.core.event.remove.RemoveEvent;
+import org.wso2.siddhi.core.event.remove.RemoveListEvent;
+import org.wso2.siddhi.core.persistence.ThreadBarrier;
+import org.wso2.siddhi.core.query.QueryPostProcessingElement;
+import org.wso2.siddhi.core.query.processor.window.RunnableWindowProcessor;
+import org.wso2.siddhi.core.query.processor.window.WindowProcessor;
+import
org.wso2.siddhi.core.util.collection.queue.scheduler.ISchedulerSiddhiQueue;
+import
org.wso2.siddhi.core.util.collection.queue.scheduler.SchedulerSiddhiQueue;
+import
org.wso2.siddhi.core.util.collection.queue.scheduler.SchedulerSiddhiQueueGrid;
+import org.wso2.siddhi.query.api.definition.AbstractDefinition;
+import org.wso2.siddhi.query.api.definition.Attribute;
+import org.wso2.siddhi.query.api.definition.Attribute.Type;
+import org.wso2.siddhi.query.api.expression.Expression;
+import org.wso2.siddhi.query.api.expression.Variable;
+import org.wso2.siddhi.query.api.expression.constant.IntConstant;
+import org.wso2.siddhi.query.api.expression.constant.LongConstant;
+import org.wso2.siddhi.query.api.extension.annotation.SiddhiExtension;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+@SiddhiExtension(namespace = "stratos", function = "curveFitting")
+public class CurveFinderWindowProcessor extends WindowProcessor implements
RunnableWindowProcessor{
+
+ static final Logger log =
Logger.getLogger(CurveFinderWindowProcessor.class);
+ /**
+ * alpha is used as the smoothing constant in exponential moving
average
+ */
+ public static final double ALPHA = 0.8000;
--- End diff --
make this ALPHA configurable.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---