org.apache.hadoop.mapreduce.v2.app.speculate.forecast

## Class SimpleExponentialSmoothing

- java.lang.Object
- - org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing

-     public class SimpleExponentialSmoothing
      extends Object

  Implementation of the static model for Simple exponential smoothing.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SimpleExponentialSmoothing` | `createForecast(long timeConstant, int skipCnt, long stagnatedWindow, long timeStamp)`
    `double` | `getForecast()`
    `AtomicReference<org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing.ForecastRecord>` | `getForecastRefEntry()`
    `double` | `getRawData()`
    `double` | `getSSE()`
    `long` | `getStartTime()`
    `long` | `getTimeStamp()`
    `void` | `incorporateReading(long timeStamp, double currRawData)`
    `boolean` | `isDataStagnated(long timeStamp)` checks if the task is hanging up.
    `boolean` | `isDefaultForecast(double value)`
    `boolean` | `isErrorWithinBound(double bound)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### createForecast

          public static SimpleExponentialSmoothing createForecast(long timeConstant,
                                                                  int skipCnt,
                                                                  long stagnatedWindow,
                                                                  long timeStamp)

    - #### isDataStagnated

          public boolean isDataStagnated(long timeStamp)

      checks if the task is hanging up.
      Parameters:
        `timeStamp` - current time of the scan.
      Returns:
        true if we have number of samples > kMinimumReads and the record timestamp has expired.

    - #### incorporateReading

          public void incorporateReading(long timeStamp,
                                         double currRawData)

    - #### getForecast

          public double getForecast()

    - #### isDefaultForecast

          public boolean isDefaultForecast(double value)

    - #### getSSE

          public double getSSE()

    - #### isErrorWithinBound

          public boolean isErrorWithinBound(double bound)

    - #### getRawData

          public double getRawData()

    - #### getTimeStamp

          public long getTimeStamp()

    - #### getStartTime

          public long getStartTime()

    - #### getForecastRefEntry

          public AtomicReference<org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing.ForecastRecord> getForecastRefEntry()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.