Search in sources :

Example 41 with Window

use of com.yahoo.bullet.query.Window in project bullet-core by yahoo.

the class TumblingTest method make.

private Tumbling make(int length, int minimumWindow) {
    config.set(BulletConfig.WINDOW_MIN_EMIT_EVERY, minimumWindow);
    config.validate();
    Window window = makeTumblingWindow(length);
    return new Tumbling(strategy, window, config);
}
Also used : Window(com.yahoo.bullet.query.Window)

Example 42 with Window

use of com.yahoo.bullet.query.Window in project bullet-core by yahoo.

the class TumblingTest method testNotClosedOnStrategyClosed.

@Test
public void testNotClosedOnStrategyClosed() {
    Window window = makeTumblingWindow(Integer.MAX_VALUE);
    ClosableStrategy strategy = new ClosableStrategy();
    Tumbling tumbling = new Tumbling(strategy, window, config);
    Assert.assertFalse(tumbling.isClosed());
    Assert.assertFalse(tumbling.isClosedForPartition());
    strategy.setClosed(true);
    Assert.assertFalse(tumbling.isClosed());
    Assert.assertFalse(tumbling.isClosedForPartition());
}
Also used : Window(com.yahoo.bullet.query.Window) Test(org.testng.annotations.Test)

Aggregations

Window (com.yahoo.bullet.query.Window)42 Test (org.testng.annotations.Test)34 Projection (com.yahoo.bullet.query.Projection)28 Query (com.yahoo.bullet.query.Query)28 Raw (com.yahoo.bullet.query.aggregations.Raw)26 BulletConfigTest (com.yahoo.bullet.common.BulletConfigTest)17 FieldExpression (com.yahoo.bullet.query.expressions.FieldExpression)12 BinaryExpression (com.yahoo.bullet.query.expressions.BinaryExpression)11 ValueExpression (com.yahoo.bullet.query.expressions.ValueExpression)11 BulletConfig (com.yahoo.bullet.common.BulletConfig)10 Expression (com.yahoo.bullet.query.expressions.Expression)10 ListExpression (com.yahoo.bullet.query.expressions.ListExpression)10 UnaryExpression (com.yahoo.bullet.query.expressions.UnaryExpression)10 BulletRecord (com.yahoo.bullet.record.BulletRecord)7 Field (com.yahoo.bullet.query.Field)6 Metadata (com.yahoo.bullet.pubsub.Metadata)5 RecordBox (com.yahoo.bullet.result.RecordBox)5 Map (java.util.Map)4 CountDistinct (com.yahoo.bullet.query.aggregations.CountDistinct)3 GroupAll (com.yahoo.bullet.query.aggregations.GroupAll)3