Search in sources :

Example 81 with BulletConfig

use of com.yahoo.bullet.common.BulletConfig in project bullet-core by yahoo.

the class AdditiveTumblingTest method setup.

@BeforeMethod
private void setup() {
    strategy = new MockStrategy();
    config = new BulletConfig();
    addMetadata(config, ALL_METADATA);
}
Also used : MockStrategy(com.yahoo.bullet.aggregations.MockStrategy) BulletConfig(com.yahoo.bullet.common.BulletConfig) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 82 with BulletConfig

use of com.yahoo.bullet.common.BulletConfig in project bullet-core by yahoo.

the class BasicTest method setup.

@BeforeMethod
private void setup() {
    config = new BulletConfig();
    strategy = new MockStrategy();
}
Also used : BulletConfig(com.yahoo.bullet.common.BulletConfig) MockStrategy(com.yahoo.bullet.aggregations.MockStrategy) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 83 with BulletConfig

use of com.yahoo.bullet.common.BulletConfig in project bullet-core by yahoo.

the class ReactiveTest method setup.

@BeforeMethod
private void setup() {
    strategy = new MockStrategy();
    config = new BulletConfig();
    addMetadata(config, ALL_METADATA);
}
Also used : MockStrategy(com.yahoo.bullet.aggregations.MockStrategy) BulletConfig(com.yahoo.bullet.common.BulletConfig) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 84 with BulletConfig

use of com.yahoo.bullet.common.BulletConfig in project bullet-core by yahoo.

the class TumblingTest method setup.

@BeforeMethod
private void setup() {
    strategy = new MockStrategy();
    config = new BulletConfig();
    addMetadata(config, ALL_METADATA);
}
Also used : MockStrategy(com.yahoo.bullet.aggregations.MockStrategy) BulletConfig(com.yahoo.bullet.common.BulletConfig) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 85 with BulletConfig

use of com.yahoo.bullet.common.BulletConfig in project bullet-core by yahoo.

the class AggregationTest method testToString.

@Test
public void testToString() {
    Aggregation aggregation = new Aggregation();
    aggregation.configure(new BulletConfig());
    Assert.assertEquals(aggregation.toString(), "{size: 500, type: RAW, fields: null, attributes: null}");
    aggregation.setType(COUNT_DISTINCT);
    Assert.assertEquals(aggregation.toString(), "{size: 500, type: COUNT_DISTINCT, fields: null, attributes: null}");
    aggregation.setFields(singletonMap("field", "newName"));
    Assert.assertEquals(aggregation.toString(), "{size: 500, type: COUNT_DISTINCT, " + "fields: {field=newName}, attributes: null}");
    aggregation.setAttributes(singletonMap("foo", asList(1, 2, 3)));
    Assert.assertEquals(aggregation.toString(), "{size: 500, type: COUNT_DISTINCT, " + "fields: {field=newName}, attributes: {foo=[1, 2, 3]}}");
}
Also used : BulletConfig(com.yahoo.bullet.common.BulletConfig) Test(org.testng.annotations.Test)

Aggregations

BulletConfig (com.yahoo.bullet.common.BulletConfig)101 Test (org.testng.annotations.Test)87 Aggregation (com.yahoo.bullet.parsing.Aggregation)37 List (java.util.List)25 Query (com.yahoo.bullet.parsing.Query)20 QueryUtils.makeAggregationQuery (com.yahoo.bullet.parsing.QueryUtils.makeAggregationQuery)17 BulletError (com.yahoo.bullet.common.BulletError)16 BulletRecord (com.yahoo.bullet.record.BulletRecord)16 Arrays.asList (java.util.Arrays.asList)16 Clip (com.yahoo.bullet.result.Clip)14 Collections.singletonList (java.util.Collections.singletonList)12 QueryUtils.makeProjectionFilterQuery (com.yahoo.bullet.parsing.QueryUtils.makeProjectionFilterQuery)11 QueryUtils.makeRawFullQuery (com.yahoo.bullet.parsing.QueryUtils.makeRawFullQuery)11 Map (java.util.Map)11 AggregationUtils.makeAttributes (com.yahoo.bullet.parsing.AggregationUtils.makeAttributes)10 Window (com.yahoo.bullet.parsing.Window)10 Concept (com.yahoo.bullet.result.Meta.Concept)10 RecordBox (com.yahoo.bullet.result.RecordBox)10 ArrayList (java.util.ArrayList)10 IntStream (java.util.stream.IntStream)10